US large cap market returns.
- The data are from Yahoo
- Almost all of the S&P 500 stocks are used (as implied by Wikipedia on 2013 January 5)
- The initial post was “Replacing market indices”
- The R code is in marketportrait_funs.R
The R commands to get the data were:
require(XML) wikisptab <- readHTMLTable( "http://en.wikipedia.org/wiki/List_of_S%26P_500_companies") sp5df <- wikisptab[] sp2013sector <- sp5df[, 'GICS Sector'] names(sp2013sector) <- sp5df[, 'Ticker symbol']
A few of the names were removed because of lack of data in Yahoo.