tseries (version 0.7-1)

get.hist.quote: Download Historical Finance Data

Description

Download historical financial data from a given data provider over the WWW.

Usage

get.hist.quote (instrument = "^gdax", start, end,
                quote = c("Open", "High", "Low", "Close", "Volume"),
                provider = "yahoo",
                method = "auto")

Arguments

instrument
the name of the quote symbol to download. See the web page of the data provider for information about the quote symbols.
start, end
strings representing the start and end date of the period to download. The format is "mm dd yyyy". Default values are "1 2 1991" and yesterday.
quote
download opening-, high-, low-, closing-quotes, or volume?
provider
the name of the data provider. Currently implemented is "yahoo". See http://quote.yahoo.com/ for more information.
method
tool to be used for downloading the data. See download.file for the available download methods.

Value

  • A time series containing the data in physical time, i.e., weekends, holidays, and missing days are filled with NAs. The time scale is given in Julian dates.

See Also

ts, chron, download.file, http://quote.yahoo.com/

Examples

Run this code
x <- get.hist.quote (instrument = "^spc", start = "1 1 1998",
                     quote = "Close")
plot (x)

Run the code above in your browser using DataCamp Workspace