Assignment 6 - Mutual Fund Analysis with class

due February 27th

The purpose of this assignment is to give you practice using using classes.


Program Overview

In this assignment you will create a MutualFund class to hold data for two different mutual funds.  That includes the "ticker" and historical closing prices.  Your program will read and store the historical data for each mutual fund and then perform analysis on the fund.


Program Requirements

VBMFX.csv

Date,Open,High,Low,Close,Adj Close,Volume
2016-12-08,10.660000,10.660000,10.660000,10.660000,10.373352,0
2016-12-09,10.620000,10.620000,10.620000,10.620000,10.334426,0
2016-12-12,10.620000,10.620000,10.620000,10.620000,10.334426,0
2016-12-13,10.630000,10.630000,10.630000,10.630000,10.344158,0
2016-12-14,10.570000,10.570000,10.570000,10.570000,10.285771,0
2016-12-15,10.550000,10.550000,10.550000,10.550000,10.266310,0
2016-12-16,10.560000,10.560000,10.560000,10.560000,10.276041,0
2016-12-19,10.590000,10.590000,10.590000,10.590000,10.305233,0
2016-12-20,10.580000,10.580000,10.580000,10.580000,10.295504,0
2016-12-21,10.590000,10.590000,10.590000,10.590000,10.310109,0
...


VTSMX.csv

Date,Open,High,Low,Close,Adj Close,Volume
2016-12-08,56.700001,56.700001,56.700001,56.700001,55.402664,0
2016-12-09,56.970001,56.970001,56.970001,56.970001,55.666489,0
2016-12-12,56.840000,56.840000,56.840000,56.840000,55.539459,0
2016-12-13,57.169998,57.169998,57.169998,57.169998,55.861912,0
2016-12-14,56.669998,56.669998,56.669998,56.669998,55.373348,0
2016-12-15,56.900002,56.900002,56.900002,56.900002,55.598091,0
2016-12-16,56.820000,56.820000,56.820000,56.820000,55.519920,0
2016-12-19,56.619999,56.619999,56.619999,56.619999,55.653599,0
2016-12-20,56.860001,56.860001,56.860001,56.860001,55.889507,0
2016-12-21,56.700001,56.700001,56.700001,56.700001,55.732235,0
...
int main()
{
    MutualFund vbmfx;
    vbmfx.assignTicker("VBMFX");
    vbmfx.readHistoryFile("c:/temp/vbmfx.csv");  // You may change the input file location.
    vbmfx.report();

    MutualFund vtsmx;
    vtsmx.assignTicker("VTSMX");
    vtsmx.readHistoryFile("c:/temp/vtsmx.csv");
    vtsmx.report();
}

Program Output

Your output should look quite similar to the following.  Note: the values will be different when you use current mutual fund history

Output produced 2/20/18 (contains Mutual Fund data through 2/16/18)

Fund: VBMFX
Analysis Date: 2/16/18
Latest Close: $10.49
Minimum for the last year = $10.47
Maximum for the last year = $10.90
50 day moving average = $10.66
200 day moving average = $10.76
% gain over 200 Day Moving Avg: -2.5%
Recommendation: Hold

Fund: VTSMX
Analysis Date: 2/16/18
Latest Close: $68.18
Minimum for the last year = $58.17
Maximum for the last year = $71.48
50 day moving average = $67.96
200 day moving average = $63.62
% gain over 200 Day Moving Avg: 7.2%
Recommendation: Sell




Program Notes

Buy if the % Gain is < -5%,
Sell if the % Gain is > 5%,
otherwise Hold.