yahoo.get.hist.quote: Download stock data from Yahoo!

View source: R/yahoo.get.hist.quote.R

yahoo.get.hist.quoteR Documentation

Download stock data from Yahoo!

Description

Downloads stock data from Yahoo!

Usage

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")

Arguments

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

Details

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.

Value

A multiple time series with time measureing the number of days since the value specified to origin.

Author(s)

Daniel Herlemont <dherlemont@yats.com>

References

This function was found on the mailling list for R-SIG finance

See Also

yahoo.get.hist.quote in the tseries package


UsingR documentation built on March 18, 2022, 7:32 p.m.