Appearance
PerContractMoneynessSlice
Preview on the public Rust client. The analytic ships in the engine and is reachable today through the Python wheel and the TypeScript / Node addon; a per-analytic builder on the public Rust thin client (
kairos::Client) is tracked on the roadmap. The output tick schema below is stable.
What it computes
Bins every admitted print on the subscribed contract into one of six stratum cells (ATM / OTM / ITM) × (Put / Call). Each cell carries:
- Buy / sell / mid volume.
- Buy / sell / mid premium.
- Delta-weighted buy / sell loads.
- A vega total.
Bucket cadence mirrors OptionFlow. Each emission carries one contract's slice of the moneyness grid; downstream code aggregates per-symbol by summing slices over contracts mapping to the same underlying.
Methodology
ATM band: atm_band_pct). Outside the band, the contract is classified ITM / OTM by (right, strike, spot).
Tick-rule classification uses literal price-equality against the previous print. OPRA wire prices are penny-quantised; tolerance-based comparisons would break replay parity on round-tripped streams.
The side classifier follows Lee & Ready (1991) — see /methodology/lee-ready.
Inputs
- Option
TradeTick. - The same per-contract NBBO snapshot
OptionFlowuses. - The
Greekscache for delta-weighting (viaGreekProvider).
Output schema (PerContractMoneynessSliceTick)
Per-emission shape — eight named stratum cells (six classified + two unclassified) plus the per-emission scalars. The field / type / description table below is regenerated from the PerContractMoneynessSliceTick Rust source by docs-site/scripts/inject-doc-tables.ts on every npm run docs:build. Do not hand-edit between the sentinels.
| Field | Type | Description |
|---|---|---|
symbol | Arc<str> | Underlying symbol the stratification covers. |
date | i32 | Trading-session date in YYYYMMDD form. |
timeframe | Timeframe | Bucket period this snapshot covers. |
bucket_start_ms | i64 | Inclusive start of the bucket in milliseconds since midnight. |
bucket_end_ms | i64 | Exclusive end of the bucket in milliseconds since midnight. |
closed | bool | true if the bucket is closed. |
spot | f64 | Spot price used to classify every print in this bucket. NaN if the spot cache was empty. |
atm_put | StratumCell | ATM puts. |
atm_call | StratumCell | ATM calls. |
otm_put | StratumCell | OTM puts. |
otm_call | StratumCell | OTM calls. |
itm_put | StratumCell | ITM puts. |
itm_call | StratumCell | ITM calls. |
unclassified_put | StratumCell | Puts whose moneyness was undetermined at admission time (spot non-finite or unavailable). Surfaces the cold-start / missing-spot data-quality issue as its own bucket rather than silently corrupting [Self::atm_put]. |
unclassified_call | StratumCell | Calls whose moneyness was undetermined at admission time (spot non-finite or unavailable). Surfaces the cold-start / missing-spot data-quality issue as its own bucket rather than silently corrupting [Self::atm_call]. |
Each StratumCell is Copy + Default with these fields:
| Field | Type | Description |
|---|---|---|
buy_volume / sell_volume / mid_volume | u64 | Contracts. |
buy_premium / sell_premium / mid_premium | f64 | USD (price × size × multiplier). |
delta_buy / delta_sell | f64 | size × delta × multiplier per side. |
vega | f64 | Σ size × vega × multiplier regardless of side. |
StratumCell::total_volume() returns the per-cell sum buy_volume + sell_volume + mid_volume; the tick's total_volume() sums across every cell.
Configuration (PerContractMoneynessSliceRequest)
Regenerated from the PerContractMoneynessSliceRequest Rust source — see the note above.
| Field | Type | Description |
|---|---|---|
contracts | SecurityFilter | Contracts the subscription tracks. Typically a [SecurityFilter::Symbols] entry — the engine expands into the per-contract option universe. |
timeframe | Timeframe | Bucket period. Defaults to [Timeframe::M1]. |
emit | EmitPolicy | Emit policy. |
conditions | ConditionPolicy | Trade-condition admission policy. |
venues | ExchangeFilter | Exchange / venue admission policy. |
classification | SideClassification | Side-classification policy. |
reference_quote_label | QuoteLabel | Reference cycle position cached as the Lee-Ready pre-trade NBBO. |
spot_cache | SpotPriceCache | Shared spot cache. Drives the moneyness classification at emission time. |
greeks | Arc<dyn GreekProvider> | Per-contract Greek snapshot source for the delta / vega aggregates. |
atm_band_pct | f64 | ATM band as a fraction of spot. Default 0.01 (±1 %). |
Operational characteristics
- Per-tick latency. O(1) — one cell update, Neumaier-summed running totals.
- Allocation discipline. Per-cell
StratumAccis laid out contiguously on the analytic instance; no hot-path allocations. - Replay parity. Deterministic given identical input tick order and identical Greek-provider contents.
Example
Preview. This analytic ships in the engine and is reachable today through the Python wheel and the TypeScript / Node addon. A per-analytic builder on the public Rust thin client (
kairos::Client) is tracked on the roadmap — bare-string symbol filters passed to the analytic accessor will match the other analytics already exposed there. The output tick rows are stable and documented above.