Skip to content
Prev 5135 / 15274 Next

[QuantMod] Load all stock symbols

Hello everybody,

I was wondering how to load all the symbols at once using Quantmod.

I am trying to load them, so I will be able to test a set of parameters 
for each one.

For example, if the S&P where to have only 3 symbols, I could just write 
this...
 > getSymbols("KO;PEP;SBUX")
 > test(KO)
 > test(PEP)
 > test(SBUX)

but, how can I try this over all the S&P?
btw, test is a made-up function to illustrate the idea.

Thanks you