Set of Needed R Packages

You can paste this into the RStudio console:

install.packages(c("quantmod", "IBrokers", "EIAdata", "rmarkdown", "caTools", "htmltools", "shiny", "knitr", "yaml", "tools", "utils", "grDevices", "testthat", "digest"), repo = "")

FIN 376: Spreadsheet to Experiment with Price and Value Weighted Indices

Here is a spreadsheet I created to test the effect of various stock prices and market caps on price and value weighted indices.  You should create a similar spreadsheet (though formatted better -- the first sheet should be a summary with a description of what you are doing and the important results, i.e. the correlations).  You can also add in interesting charts and possibly an equally-weighted index.

Note, by pressing 'F9' you'll recalculate the '=RAND()' functions, which will give you entirely new correlations.  You could hit 'F9' many times, recording the resulting correlations, and get a Monte Carlo estimate of the correlation distributions.  A macro may be effective in doing this.