pdfetch_YAHOO: Fetch data from Yahoo Finance

Description Usage Arguments Value See Also Examples

View source: R/pdfetch.R

Description

Fetch data from Yahoo Finance

Usage

1
2
3
pdfetch_YAHOO(identifiers, fields = c("open", "high", "low", "close",
  "adjclose", "volume"), from = as.Date("2007-01-01"), to = Sys.Date(),
  interval = "1d")

Arguments

identifiers

a vector of Yahoo Finance tickers

fields

can be any of "open", "high", "low", "close", "volume", or "adjclose"

from

a Date object or string in YYYY-MM-DD format. If supplied, only data on or after this date will be returned

to

a Date object or string in YYYY-MM-DD format. If supplied, only data on or before this date will be returned

interval

the frequency of the return data, can be '1d', '1wk', or '1mo'

Value

a xts object

See Also

https://finance.yahoo.com/

Examples

1
2
3
4
5
## Not run: 
pdfetch_YAHOO(c("^gspc","^ixic"))
pdfetch_YAHOO(c("^gspc","^ixic"), "adjclose")

## End(Not run)

abielr/pdfetch documentation built on July 31, 2019, 4:53 p.m.