Skip to content

Realized Vol Cone

Family: Volatility

What it computes

Emits RealizedVolConeTick ticks carrying rv_w, pct_rank_w off daily-close cache.

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

RV percentile cone at {1,5,10,20,60}d.

See the methodology overview for the citation index.

Inputs

Daily-close cache.

Key outputs

Rv_w, pct_rank_w. The full field set is in the tick table below.

Output schema (RealizedVolConeTick)

The field / type / description table below is regenerated from the RealizedVolConeTick 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).
datei32Session date the emission anchors at (YYYYMMDD).
ms_of_dayi64Milliseconds since midnight ET at emission time. 0 for watermark-driven boot snapshots before any live tick.
rv_1df64Current 1-session realized vol (annualized) — the canonical close-to-close daily RV proxy: `
rv_5df64Current 5-session realized vol (annualized).
rv_10df64Current 10-session realized vol (annualized).
rv_20df64Current 20-session realized vol (annualized).
rv_60df64Current 60-session realized vol (annualized).
pct_rank_1df64Percentile rank of rv_1d within the trailing distribution_window-session 1-day RV distribution, 0.0..=100.0. NaN cold-start.
pct_rank_5df64Percentile rank of rv_5d.
pct_rank_10df64Percentile rank of rv_10d.
pct_rank_20df64Percentile rank of rv_20d.
pct_rank_60df64Percentile rank of rv_60d.
sessions_observedi32Count of full-window observations in the longest-window distribution today. Values below distribution_window mean the cone is still warming up — consumers that require a full year of history mask warm-up emissions on this field.

Configuration (RealizedVolConeParams)

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

FieldTypeDescription
contractsSecurityFilterContracts the subscription tracks. Stocks only.
conditionsConditionPolicyTrade-condition admission policy.
venuesExchangeFilterExchange / venue admission policy.
daily_closeArc<DailyCloseCache>Boot-time hydrated history. Sealed for the lifetime of the subscription. The cache must hold at least max(RV_CONE_WINDOWS) + distribution_window rows for the longest window to populate a full distribution — shorter histories surface NaN on the per-window percentiles and the sessions_observed warm-up signal carries the partial count.
annualization_factorf64Trading days / year used to annualize RV_W. 252.0 for US equities (default), 365.0 for 24-7 markets. Threads through every per-window RV computation identically.
distribution_windowusizeDistribution window length (in trading sessions) the per-window percentile rank is computed against. Defaults to [DISTRIBUTION_WINDOW_DAYS] (252).

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().realized_vol_cone(["QQQ"]).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()
  .realizedVolCone(["QQQ"])
  .onEvent((tick) => {
    console.log(tick);
  });

Rust

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

use kairos::{Client, RealizedVolConeRow};

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

let sub = client
    .live()
    .realized_vol_cone(["QQQ"])
    .on_event(|row: &RealizedVolConeRow| println!("rv_1d={} rv_5d={}", row.rv_1d, row.rv_5d))?;
// ... later ...
sub.unsubscribe();
# Ok(())
# }

Proprietary. All rights reserved.