Base class for Ticker and Index classes.
Methods
Method get_history()
Retrieves historical pricing data from the Yahoo Finance chart API.
**Intraday lookback limits** (imposed by Yahoo Finance):
"1m": max 7 days"5m","15m","30m": max 60 days"1h": max 730 days
Arguments
periodLength of time. Defaults to
'ytd'. Valid values:"1d","5d","1mo","3mo","6mo","1y","2y","5y","10y","ytd","max". Ignored whenstartis provided.intervalTime between data points. Defaults to
'1d'. Valid values:"1m","2m","5m","15m","30m","60m","90m","1h","1d","5d","1wk","1mo","3mo".startSpecific starting date.
StringorDateobject in"YYYY-MM-DD"format.endSpecific ending date.
StringorDateobject in"YYYY-MM-DD"format. Defaults to today whenstartis provided butendisNULL.
Returns
A tibble with 8 columns:
symbolCharacter. Ticker symbol.
datePOSIXct. Timestamp of the data point (UTC).
openNumeric. Opening price.
highNumeric. Period high.
lowNumeric. Period low.
closeNumeric. Closing price.
adj_closeNumeric. Split- and dividend-adjusted close. Falls back to
closewhen the API omits adjusted data.volumeNumeric. Trading volume.
Returns invisible(NULL) on network failure or invalid symbol.