Downloads stock data from Yahoo!
yahoo.get.hist.quote(instrument = "^gspc",
destfile = paste(instrument, ".csv", sep = ""),
start, end, quote = c("Open", "High", "Low", "Close"),
adjusted = TRUE, download = TRUE,
origin = "1970-01-01", compression = "d")
Ticker symbol as character string.
Temporary file for storage
Date to start. Specified as "2005-12-31"
Date to end
Any/All of "Open", "High", "Low", "Close"
Adjust for stock splits, dividends. Defaults to TRUE
Download the data
Dates are recorded in the number of days since the origin. A value of "1970-01-01" is the default. This was changed from "1899-12-30".
Passed to yahoo
A multiple time series with time measureing the number of days since the value specified to origin.
Goes to chart.yahoo.com and downloads the stock data. By default returns a multiple time series of class mts with missing days padded by NAs.
This function was found on the mailling list for R-SIG finance
yahoo.get.hist.quote in the tseries package