November 21, 2016

Stock ETF and bond ETF performance Analysis

Objective: In this project I want to compare two mutual funds I bought last year at December.

Step:

  1. load data

  2. convert market price to yield of each fund with $10,000 original capital investment.

  3. draw the plot using plot_ly

Load data

  • voo is the Vanguard 500 Index fund

  • bnd is the Vanguard Total Bond Market ETF

##         Date   Open   High    Low  Close  Volume Adj.Close
## 1 2016-10-21 195.54 196.57 195.38 196.47 1376300    196.47
## 2 2016-10-20 196.37 196.97 195.70 196.42 1309600    196.42
## 3 2016-10-19 196.49 197.08 196.13 196.74 1041300    196.74
##         Date  Open  High   Low Close  Volume Adj.Close
## 1 2016-10-21 83.60 83.65 83.53 83.64 1018800     83.64
## 2 2016-10-20 83.63 83.68 83.53 83.57 1283200     83.57
## 3 2016-10-19 83.51 83.62 83.50 83.62 1546400     83.62

Draw the plot

This is the plot of yiled with $10,000 investment at December of 2015 and withdraw today at November, 21, 2016.