Consider a portfolio with four stocks - Apple, Microsoft, Facebook and Tesla during the two-year period between the beginning of 2016 and the end of 2017. You want to find how much you would have made if you invested $1 million at the beginning of the given period. Find the answer by revising the given code and by answering the five questions.

Q1 Which of the four stocks performed the best on the day of 2017-12-28?

Tesla, they had the highest return for the day of 1.19%

## [1] "AAPL" "MSFT" "TSLA" "FB"
## NULL
##            TSLA.Adjusted AAPL.Adjusted MSFT.Adjusted FB.Adjusted
## 2015-12-31        240.01     100.92790      52.57194      104.66
## 2016-01-04        223.41     101.01419      51.92759      102.22
## 2016-01-05        223.43      98.48285      52.16449      102.73
## 2016-01-06        219.04      96.55557      51.21690      102.97
## 2016-01-07        215.65      92.48048      49.43545       97.92
## 2016-01-08        211.00      92.96950      49.58706       97.33
##            TSLA.Adjusted AAPL.Adjusted MSFT.Adjusted FB.Adjusted
## 2015-12-31        240.01     100.92790      52.57194      104.66
## 2016-01-04        223.41     101.01419      51.92759      102.22
## 2016-01-05        223.43      98.48285      52.16449      102.73
## 2016-01-06        219.04      96.55557      51.21690      102.97
## 2016-01-07        215.65      92.48048      49.43545       97.92
## 2016-01-08        211.00      92.96950      49.58706       97.33
##            TSLA.Adjusted AAPL.Adjusted MSFT.Adjusted FB.Adjusted
## 2016-12-22        208.45      113.9848      61.87136      117.40
## 2016-12-23        213.34      114.2102      61.56956      117.27
## 2016-12-27        219.53      114.9356      61.60849      118.01
## 2016-12-28        219.74      114.4455      61.32616      116.92
## 2016-12-29        214.68      114.4161      61.23854      116.35
## 2016-12-30        213.69      113.5241      60.49861      115.05
##            TSLA.Adjusted AAPL.Adjusted MSFT.Adjusted  FB.Adjusted
## 2015-12-31            NA            NA            NA           NA
## 2016-01-04 -6.916375e-02  0.0008549568  -0.012256576 -0.023313615
## 2016-01-05  8.947227e-05 -0.0250592711   0.004562141  0.004989258
## 2016-01-06 -1.964821e-02 -0.0195697425  -0.018165422  0.002336202
## 2016-01-07 -1.547662e-02 -0.0422045172  -0.034782503 -0.049043439
## 2016-01-08 -2.156269e-02  0.0052877535   0.003066929 -0.006025286
##            TSLA.Adjusted AAPL.Adjusted MSFT.Adjusted  FB.Adjusted
## 2016-12-22  0.0036109774 -0.0065778275  0.0001573835 -0.013776873
## 2016-12-23  0.0234588586  0.0019776757 -0.0048779270 -0.001107368
## 2016-12-27  0.0290147329  0.0063509365  0.0006322767  0.006310267
## 2016-12-28  0.0009566164 -0.0042639710 -0.0045826963 -0.009236539
## 2016-12-29 -0.0230272681 -0.0002569869 -0.0014287541 -0.004875128
## 2016-12-30 -0.0046114730 -0.0077957566 -0.0120827348 -0.011173142

Q2 What’s portfolio return on the day of 2017-12-28? Interpret.

0.369 % return on 2017-12-28 for the portfolio

##            portfolio.returns
## 2016-01-04     -0.0259697457
## 2016-01-05     -0.0040086655
## 2016-01-06     -0.0136884504
## 2016-01-07     -0.0357001111
## 2016-01-08     -0.0046826019
## 2016-01-11      0.0008085032
##            portfolio.returns
## 2016-12-22      -0.004595965
## 2016-12-23       0.003636625
## 2016-12-27       0.009459020
## 2016-12-28      -0.004540854
## 2016-12-29      -0.006574170
## 2016-12-30      -0.009166389
##            portfolio.returns
## 2016-01-04     -0.0259697457
## 2016-01-05     -0.0040086655
## 2016-01-06     -0.0136884504
## 2016-01-07     -0.0357001111
## 2016-01-08     -0.0046826019
## 2016-01-11      0.0008085032
##            portfolio.returns
## 2016-12-22      -0.003959293
## 2016-12-23       0.005157989
## 2016-12-27       0.010968179
## 2016-12-28      -0.004085606
## 2016-12-29      -0.007835281
## 2016-12-30      -0.008788129

Q3 Which of the two strategies would have netted a bigger return?

The monthly rebalancing strategy would net a bigger return because it reduces the amount risk and capital losses, leading to a larger overall return.

Q4 Which of the four stocks performed the best during the study period? Hint: See the performance of the buy-and-hold portfolio.

When comparing the stocks during the study period, Apple performed the best during the study period because on average they had the highest returns compared to Microsoft, Facebook and Tesla.

Q5 Which of the four stocks performed the best during the last month of the study period? Hint: See the performance of the rebalanced portfolio. Note that the portfolio is rebalanced monthly.

Tesla, they had the highest return percentages during the last month.

##            TSLA.Adjusted AAPL.Adjusted MSFT.Adjusted FB.Adjusted
## 2016-01-04     0.2389136     0.2568850     0.2535197   0.2506817
## 2016-01-05     0.2398966     0.2514556     0.2557013   0.2529464
## 2016-01-06     0.2384471     0.2499562     0.2545407   0.2570561
## 2016-01-07     0.2434478     0.2482702     0.2547829   0.2534991
## 2016-01-08     0.2393191     0.2507572     0.2567666   0.2531571
## 2016-01-11     0.2355559     0.2546117     0.2564121   0.2534204
##            TSLA.Adjusted AAPL.Adjusted MSFT.Adjusted FB.Adjusted
## 2016-12-22     0.2021430     0.2628584     0.2739187   0.2610799
## 2016-12-23     0.2061354     0.2624239     0.2715949   0.2598458
## 2016-12-27     0.2101287     0.2616159     0.2692201   0.2590353
## 2016-12-28     0.2112892     0.2616887     0.2692088   0.2578134
## 2016-12-29     0.2077898     0.2633527     0.2706031   0.2582543
## 2016-12-30     0.2087450     0.2637170     0.2698066   0.2577313
## [1] 1 1 1 1 1 1
## [1] 1 1 1 1 1 1
##            TSLA.Adjusted AAPL.Adjusted MSFT.Adjusted FB.Adjusted
## 2016-01-04     0.2389136     0.2568850     0.2535197   0.2506817
## 2016-01-05     0.2398966     0.2514556     0.2557013   0.2529464
## 2016-01-06     0.2384471     0.2499562     0.2545407   0.2570561
## 2016-01-07     0.2434478     0.2482702     0.2547829   0.2534991
## 2016-01-08     0.2393191     0.2507572     0.2567666   0.2531571
## 2016-01-11     0.2355559     0.2546117     0.2564121   0.2534204
##            TSLA.Adjusted AAPL.Adjusted MSFT.Adjusted FB.Adjusted
## 2016-12-22     0.2621197     0.2505989     0.2511679   0.2361135
## 2016-12-23     0.2668921     0.2498060     0.2486602   0.2346417
## 2016-12-27     0.2716563     0.2486651     0.2461179   0.2335606
## 2016-12-28     0.2730317     0.2486206     0.2459951   0.2323526
## 2016-12-29     0.2688510     0.2505196     0.2475835   0.2330459
## 2016-12-30     0.2699839     0.2507704     0.2467606   0.2324851
## [1] 1 1 1 1 1 1
## [1] 1 1 1 1 1 1