Fund Yield Plotter

Prashant Kumar
22 Feb 2015

Motivation

How do we compare returns between stocks and bonds? Bond have yields, but what is the yield of stock?

You can go on Yahoo or Morningstar and see the chart of prices, but wouldn't comparing the yields be a more direct comparison?

How does volatility impact long-term returns? How does the variability of stock returns compare with the variability of bond returns?

Fund Yield Plotter!

Brought to you by the power of Shiny and quantmod, you can quickly explore and answer these questions yourself!

Ready to use Vanguard fund return data from Yahoo, or any other stock or fund ticker you wish you examine.

Example

How would we compare the S&P 500 returns to investing in long-term treasury bonds?

  • Select a lookback period (say, 10 years)
  • Select “S&P 500” as Fund 1
  • Select “Long-term Treasury” as Fund 2
  • The plot updates and shows you the results over time

Example Output

plot of chunk unnamed-chunk-2

Points to Explore

  • What is a reasonable range of returns from stocks and bonds?
  • How much can the return of stocks and bonds vary?
  • How does a longer holding period affect the variability of returns? What does this suggest about time horizons?
  • How does market capitalization of stocks (large/mid/small) affect returns?
  • How does bond duration (short/intermediate/long) affect returns?
  • How did bonds behave in the 2008 stock market crash? 2001? What does this suggest about diversification?
  • Explore this often quoted advice:

Past performance is not a guarantee of future results.