Adds price data to av_runShiny() internal data.
Arguments
- indta
A data.frame with the following minimal columns:
c(symbol,timestamp,close,adjusted_close). Other variables added could bec(open,high,low,volume,dividend_amount,split_coefficient)- assettypes
(default NULL) An optional data.frame with minimal columns
c(symbol,type,currency,name)with descriptive data for the assets given inindta. If not specified, a call toav_get_pf(.,"SYMBOL_SEARCH")is necessary to determine the asset type (one ofc("Equity","ETF","FX","Index","Crypto")) for subsequent calls toav_get_pf()- delay
(default 0) Seconds to delay calls to determine asset type for future AV downloads. This is unused if
assettypesis given.
Details
Entire set of columns from av_get_pf() can be added. First date column renamed to timestamp
Examples
if (FALSE) { # \dontrun{
av_add_data(av_get_pf("IBM","TIME_SERIES_DAILY_ADJUSTED"))
asset_df <- data.frame(symbol=c("HYG"),type=c("ETF"),currency=c("USD"), name=c("HY ETF"))
av_add_data(av_get_pf("HYG","TIME_SERIES_DAILY_ADJUSTED"), assettypes=asset_df)
suppressMessages(require(quantmod))
ffdta <- as.data.table(quantmod::getSymbols("FEDFUNDS",src="FRED",auto.assign=FALSE))
ffdta <- ffdta[,.(DT_ENTRY=index,close=FEDFUNDS,adjusted_close=FEDFUNDS,symbol="FEDFUNDS")]
av_add_data(ffdta)
} # }