Skip to contents

Returns a data.table of options data given a data.table of keys desired or a set of parameters.

Usage

av_load_cached_opts(optsDT = NULL, symbols = NULL, dtstr = "")

Arguments

optsDT

(default: NULL) A data.frame of symbols and optional keys (ts, expiration, expcode, type) to join with data.

symbols

(default: NULL) Ticker or list of tickers for which option data is returned.

dtstr

(default: "") Dates for which to return options. Works with both optsDT and symbols specfication.

Value

data.table with full option data.

Details

Load Options data from parquet files

See also

Examples

if (FALSE) { # \dontrun{
opttest1=av_load_cached_opts(symbols="JPM;GS",dtstr="-2m::")
loadcj = CJ(symbol=c("JPM","GS"), expcode=c("MO_1","MO_2"), type=c("call"))
opttest2=av_load_cached_opts(optsDT=loadcj, dtstr="-1y::")
opttest2[,.(min(ts),max(ts)), by=.(expcode,symbol,type)]
} # }