Skip to content

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: |strike/spot1|1% (default; configurable via 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 OptionFlow uses.
  • The Greeks cache for delta-weighting (via GreekProvider).

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.

FieldTypeDescription
symbolArc<str>Underlying symbol the stratification covers.
datei32Trading-session date in YYYYMMDD form.
timeframeTimeframeBucket period this snapshot covers.
bucket_start_msi64Inclusive start of the bucket in milliseconds since midnight.
bucket_end_msi64Exclusive end of the bucket in milliseconds since midnight.
closedbooltrue if the bucket is closed.
spotf64Spot price used to classify every print in this bucket. NaN if the spot cache was empty.
atm_putStratumCellATM puts.
atm_callStratumCellATM calls.
otm_putStratumCellOTM puts.
otm_callStratumCellOTM calls.
itm_putStratumCellITM puts.
itm_callStratumCellITM calls.
unclassified_putStratumCellPuts 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_callStratumCellCalls 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:

FieldTypeDescription
buy_volume / sell_volume / mid_volumeu64Contracts.
buy_premium / sell_premium / mid_premiumf64USD (price × size × multiplier).
delta_buy / delta_sellf64size × delta × multiplier per side.
vegaf64Σ 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.

FieldTypeDescription
contractsSecurityFilterContracts the subscription tracks. Typically a [SecurityFilter::Symbols] entry — the engine expands into the per-contract option universe.
timeframeTimeframeBucket period. Defaults to [Timeframe::M1].
emitEmitPolicyEmit policy.
conditionsConditionPolicyTrade-condition admission policy.
venuesExchangeFilterExchange / venue admission policy.
classificationSideClassificationSide-classification policy.
reference_quote_labelQuoteLabelReference cycle position cached as the Lee-Ready pre-trade NBBO.
spot_cacheSpotPriceCacheShared spot cache. Drives the moneyness classification at emission time.
greeksArc<dyn GreekProvider>Per-contract Greek snapshot source for the delta / vega aggregates.
atm_band_pctf64ATM 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 StratumAcc is 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.

Proprietary. All rights reserved.