2.7 Comparing Performance of Multiple Securities: Total Returns

AAPL replaced YHOO in the textbook. The shares of what used to be known as Yahoo under the ticker symbol YHOO started trading Monday as Altaba (think alternative Alibaba) and trade under the symbol AAPL.Jun 19, 2017.

# See what objects are in the R memory
ls()
## character(0)
# Delete all these objects
rm(list = ls())
ls()
## character(0)
# Compare total returns of multiple securities - NDAQ, MSFT, AAPL, ^GSPC
# Which of these investments performed better from 12/31/2010 to 12/31/2013
# Pay dividends: MSFT
# Don't pay: NDAQ, AAPL, ^GSPC

Apple was the best performer during the period. If you had invested $1 in Microsoft on December 31, 2010 it would have almost tripled by the end of June 2017.