View source: R/yahoo.get.hist.quote.R
yahoo.get.hist.quote | R Documentation |
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")
instrument |
Ticker symbol as character string. |
destfile |
Temporary file for storage |
start |
Date to start. Specified as "2005-12-31" |
end |
Date to end |
quote |
Any/All of "Open", "High", "Low", "Close" |
adjusted |
Adjust for stock splits, dividends. Defaults to TRUE |
download |
Download the data |
origin |
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". |
compression |
Passed to yahoo |
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.
A multiple time series with time measureing the number of days since the value specified to origin.
Daniel Herlemont <dherlemont@yats.com>
This function was found on the mailling list for R-SIG finance
yahoo.get.hist.quote in the tseries package
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.