quantdata.ncde.implied.day#
Implied Day#
This file generates sample data sets of selected options quote time series for a given day, indexed by expiry.
- class quantdata.ncde.implied.day.OptionQuotesDayConfig(max_num_options_per_expiry=1000, contract_filter=ContractsFilter(max_dte=7, max_mns=2.0, max_mns5=None, min_opt_vol_k=0.0), alignment_config=TradeQuoteAlignmentConfig(lookback_ms=250, lookfwd_ms=250), overnight_fraction=0.2, dte_exclude_half_days=False)[source]#
Bases:
objectConfiguration for managing option quotes day data.
- contract_filter: ContractsFilter = ContractsFilter(max_dte=7, max_mns=2.0, max_mns5=None, min_opt_vol_k=0.0)#
- alignment_config: TradeQuoteAlignmentConfig = TradeQuoteAlignmentConfig(lookback_ms=250, lookfwd_ms=250)#
- min_vol = 0.01#
- max_vol = 5.0#
- quantdata.ncde.implied.day.OPT_QUOTE_BY_EXPIRY_SCHEMA = {'ask_delta': Float64, 'ask_gamma': Float64, 'ask_theta': Float64, 'ask_vega': Float64, 'ask_vol': Float64, 'bid_delta': Float64, 'bid_gamma': Float64, 'bid_size_pcnt': Float64, 'bid_theta': Float64, 'bid_vega': Float64, 'bid_vol': Float64, 'date': Date, 'dt_d': Float64, 'dte': Float64, 'exp_date': Date, 'half_spread': Float64, 'intrinsic': Float64, 'is_american': <class 'bool'>, 'is_call': <class 'bool'>, 'is_intrinsic': <class 'bool'>, 'mid_delta': Float64, 'mid_gamma': Float64, 'mid_price': Float64, 'mid_ret': Float64, 'mid_theta': Float64, 'mid_vega': Float64, 'mid_vol': Float64, 'nms5': Float64, 'opt_tick_size': Float64, 'opt_ticker': <class 'str'>, 'paired_opt_ticker': <class 'str'>, 'prev_spot_close': Float64, 'size': Float64, 'spot_bid_size_pcnt': Float64, 'spot_half_spread': Float64, 'spot_mid_price': Float64, 'spot_mid_ret': Float64, 'spot_quote_dt_d': Float64, 'spot_quote_t_d': Float64, 'spot_size': Float64, 'spot_trade_direction': Float64, 'spot_trade_dt_d': Float64, 'spot_trade_price': Float64, 'spot_trade_ret': Float64, 'spot_trade_size': Float64, 'spot_trade_t_d': Float64, 'strike': Float64, 't_d': Float64, 'ticker': <class 'str'>, 'trade_delta': Float64, 'trade_direction': Float64, 'trade_dt_d': Float64, 'trade_dte': Float64, 'trade_gamma': Float64, 'trade_price': Float64, 'trade_ret': Float64, 'trade_size': Float64, 'trade_t_d': Float64, 'trade_theta': Float64, 'trade_vega': Float64, 'trade_vol': Float64}#
Schema returned by _opt_expiry_quote_time_series
- quantdata.ncde.implied.day.TRADE_COLUMNS = {'trade_direction', 'trade_dt_d', 'trade_dte', 'trade_price', 'trade_ret', 'trade_size', 'trade_t_d'}#
Columns which are null if there was no trade
- quantdata.ncde.implied.day.generate_day(ticker, d, option_quotes_day_config, *, pair_options=False, pool_config=<cdxcore.jcpool.JCPoolConfig object>, cache_generate_only=False, override_cache_mode=None, verbose=<cdxcore.verbose.Context object>)[source]#
Generate polars data frame per expiry for all eligible options.