Skip to content

Vol Moments

Family: Volatility

What it computes

Emits VolMomentsTick ticks carrying variance_moment, third_moment, fourth_moment, risk_neutral_skew, risk_neutral_kurtosis off chain snapshot.

Available on the live and replay drives. The historical drive fails closed with KAIROS_ERR_HISTORICAL_UNWIRED until the relevant cache is hydrated externally.

Methodology

Bakshi-Kapadia-Madan (2003) model-free risk-neutral skew + kurtosis via cubic + quartic static-replication integrals.

See the methodology overview for the citation index.

Inputs

Chain snapshot.

Key outputs

Variance_moment, third_moment, fourth_moment, risk_neutral_skew, risk_neutral_kurtosis. The full field set is in the tick table below.

Output schema (VolMomentsTick)

The field / type / description table below is regenerated from the VolMomentsTick 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 (interned).
datei32Trading-session date (YYYYMMDD) at emission time.
ms_of_dayi32Milliseconds since midnight at emission time.
expirationi32Expiration YYYYMMDD for which the moments were recovered.
tenor_yearsf64Tenor in calendar years.
forwardf64Put-call parity forward used as the log-return anchor and the OTM wing split.
variance_momentf64BKM V(T) — model-free implied variance of the log-return.
third_momentf64BKM W(T) — third-power integral.
fourth_momentf64BKM X(T) — fourth-power integral.
risk_neutral_skewf64Risk-neutral skewness — the BKM (2003) closed-form third-moment ratio.
risk_neutral_kurtosisf64Risk-neutral kurtosis — the BKM (2003) closed-form fourth-moment ratio.
strikes_usedi32Count of admitted strikes across the call + put wings.

Configuration (VolMomentsParams)

Regenerated from the VolMomentsParams Rust source — see the note above.

FieldTypeDescription
contractsSecurityFilterUnderlying symbols the subscription tracks.
conditionsConditionPolicyTrade-condition admission policy. Retained for surface consistency.
venuesExchangeFilterExchange / venue admission policy. Retained for surface consistency.
daily_closeArc<DailyCloseCache>Boot-time hydrated daily-close history. The empty default is a placeholder — the analytic's kernel consumes a chain snapshot rather than the daily-close history, but the cache slot is retained so the DefaultSpec hook can fail closed with the same documented cache-dependency error the other vol analytics surface.
min_strikesi32Minimum number of admitted strikes for the BKM integrals.
risk_free_ratef64Risk-free rate override (annualised continuously compounded). 0.0 selects the institutional default of r = 0 — sufficient for the equity-options regime where the per-tenor r·T discount is small.
target_expirationi32Target expiration YYYYMMDD. 0 selects the front expiration on the supplied chain snapshot.

Example

Python

python
import kairos_thetadata as kt

client = kt.Client.connect(kt.Credentials.from_env())

def on_event(row):
    print(row)

sub = client.live().vol_moments(["SPX"]).on_event(on_event)
sub.wait(timeout_seconds=60.0)

TypeScript

typescript
import { Client, Credentials } from "kairos-thetadata";

const client = await Client.connect(Credentials.fromEnv());

await client
  .live()
  .volMoments(["SPX"])
  .onEvent((tick) => {
    console.log(tick);
  });

Rust

rust
// Cargo.toml:
//   kairos = "0.1"

use kairos::{Client, VolMomentsRow};

# fn run() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::connect(("me@example.com", "secret"))?;

let sub = client
    .live()
    .vol_moments(["SPX"])
    .on_event(|row: &VolMomentsRow| println!("variance_moment={} third_moment={}", row.variance_moment, row.third_moment))?;
// ... later ...
sub.unsubscribe();
# Ok(())
# }

Proprietary. All rights reserved.