OptionsDataDFs schema¶
OptionsDataDFs(chain_ts, spot_data, ticker) holds a long option-observation panel and an aligned
underlying frame. chain_ts contains one row per contract and observation time. spot_data uses a
timezone-aware DatetimeIndex and must contain close; crypto workflows may add mark_price and
funding_rate.
Option columns¶
The native SliceColumn fields are:
Column |
Meaning and expected representation |
|---|---|
|
Stable string identifier for the option contract. |
|
Timezone-aware source observation time; UTC is preferred. |
|
String identifier for the underlying or reference index. |
|
Forward level for this expiry, in the source quote currency. |
|
Contemporaneous spot level when supplied; missing is preferable to a disguised forward proxy. |
|
Multiplier converting a quoted option price to USD value; |
|
Mark/mid option price in the source quote convention. |
|
Best bid and ask in the same units as |
|
Source quote sizes; adapter documentation must state whether these are contracts or units. |
|
Annualised implied volatility as a decimal ( |
|
Option delta. Sign follows option type; adapter documentation must state spot/forward convention. |
|
Vega in the source/pricer scale; the adapter must state whether it is per unit or percentage-point volatility. |
|
Theta in the source/pricer scale; the adapter must state its time unit. |
|
Gamma in the source/pricer scale. |
|
Number of open contracts; may be missing. |
|
Source-period traded contract count; the source period must be documented. |
|
Stable maturity/slice label, conventionally |
|
Positive strike in the same underlying-price units as |
|
|
|
Timezone-aware contractual expiry timestamp. |
|
Non-negative time to maturity in years. State the day-count convention; the simulator uses elapsed seconds / 365 days. |
|
Units of underlying represented by one contract. |
|
Discount factor from |
Adapters should populate all columns and use NaN for unavailable numeric observations. Zero has
economic meaning and must not be used as a generic missing-data marker.
Minimal validation¶
from option_chain_analytics import SliceColumn, generate_simulated_options_data
options_data = generate_simulated_options_data()
required = [column.value for column in SliceColumn]
assert list(options_data.chain_ts.columns) == required
assert options_data.chain_ts['exchange_time'].dt.tz is not None
assert options_data.chain_ts['expiry'].dt.tz is not None
assert (options_data.chain_ts['expiry'] > options_data.chain_ts['exchange_time']).all()
Do not infer spot returns from a forward series. A provider without independent spot observations
should return a missing spot_data['close'] unless a caller explicitly opts into a labelled proxy
for display only.