getSymbols and using lapply, Cl, and merge to extract close prices
- by algotr8der
I've been messing around with this for some time. I recently started using the quantmod package to perform analytics on stock prices.
I have a ticker vector that looks like the following:
> tickers
[1] "SPY" "DIA" "IWM" "SMH" "OIH" "XLY" "XLP" "XLE" "XLI" "XLB" "XLK" "XLU" "XLV"
[14] "QQQ"
> str(tickers)
chr [1:14] "SPY" "DIA"…