View source: R/quantmod_data.R
| fetch_quantmod_OHLC | R Documentation |
Returns a standardized OHLCV data.table with common market-schema columns:
source, symbol, interval, datetime, date, open, high, low,
close, and volume.
fetch_quantmod_OHLC(
ticker,
label = ticker,
from,
to,
src = "yahoo",
raw_data = FALSE,
max_attempts = 3L,
retry_delay_seconds = 1,
fallback_source = NULL,
fallback_ticker = ticker,
require_start_coverage = FALSE
)
ticker |
Market symbol passed to |
label |
Optional label to store in the standardized |
from |
Start date. |
to |
End date. |
src |
quantmod source, default |
raw_data |
Logical. If |
max_attempts |
Maximum bounded attempts for a transient source failure. |
retry_delay_seconds |
Initial retry delay in seconds; delays use exponential backoff. |
fallback_source |
Optional explicitly configured fallback provider.
Currently supports |
fallback_ticker |
Optional provider-specific fallback identifier. |
require_start_coverage |
Logical. Require material coverage from |
A row is usable only if open, high, low, and close are finite. Isolated invalid rows are discarded. A window is materially incomplete when its end is more than seven calendar days behind the requested end, or, for an instrument with valid local history, when its start is more than seven calendar days late or fewer than half of the requested weekdays are present. The start rule is not applied to a newly listed instrument, and the calendar-day grace prevents weekend and market-holiday false positives.
data.table or raw xts object when raw_data = TRUE.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.