Description Usage Arguments Details Value See Also Examples
A custom wrapper for getSymbol calls. Switches between different sources depending on server status, and ticker classification. Negates need for local storage of price data between calls. Optimized to increase speed of subsequent calls dramatically.
1 | getSymbols.SMIF(tickers, full = F, try.av = F, ret = T)
|
tickers |
Character; a string or a vector of strings specifying the data which is required |
full |
Logical; should function return "full" data? If |
try.av |
Logical; should program attempt to get data from Alpha Vantage? Defaults to |
ret |
Logical; should results be returned to user. If |
Uses tryCatch
and global options to determine and store current server status for premium
data provider Alpha Vantage. Retrieves data based on status of AV's server (if down, data is
retrieved from Google). Retrieved data is stored in a private environment and returned.
This makes subsequent calls to the function with the same or similar arguments practically
instantaneous. full
data currently unavailable for tickers
which contain "RFR".
Either a list
of OHLC
objects (if isTRUE(full)
) or a xts
of
Adjusted price data for each ticker (if !isTRUE(full)
)
.getTo
, .getFrom
: used to determine date boundries for data
retrieval
Other data retrieval functions: getHoldings.SMIF
,
getSectorETF
, getStockInfo
1 2 3 4 | ## Not run:
getSymbols.SMIF(c("NVDA", "SPY", "RFR"), full = FALSE)
## End(Not run)
getSymbols.SMIF("SPY", ret = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.