[R] Download multiple stock quotes in a loop

Owe Jessen jessen at econinfo.de
Thu Jul 26 12:43:40 CEST 2007

Hi all,

this should be a simple question, but I haven't been able to do it 
right. I am trying to download multiple stock quotes in a loop, so that 
every timeseries is safed with the symbol of the stock. Can anybody help 
me out? Here's the code:

startd <- "2000-06-01"
stocks <- c("bmw.de", "vow.de", "dte.de")
for(stock in stocks)
stock <- as.timeSeries(get.hist.quote(instrument=stock, start=startd, 
quote="Close", compress="d"))

Thanks in advance,

Owe Jessen
Hanssenstraße 17
24106 Kiel

jessen at econinfo.de

More information about the R-help mailing list