Skip to content

HistoricalVol

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

Trailing-window realised volatility per symbol, recomputed on session rollover. The analytic emits one tick per (symbol, session-rollover) carrying annualised realised vol over 20 / 30 / 60 / 120 trading-day windows, derived from log returns on cached daily closes:

σn=1n1i=1n(rir¯)2annualization_factor

where ri=ln(closei/closei1).

Methodology

Sample standard deviation of log returns times an annualisation factor. The institutional default is 252 (US-equity trading days); configurable for crypto / 24-7 markets via HistoricalVolParams::annualization_factor.

Methodology parity with Bloomberg HVOL20 / HVOL30 / HVOL60 / HVOL120 and Refinitiv VOL_20D / VOL_30D / VOL_60D / VOL_120D.

Inputs

Output schema (HistoricalVolTick)

The field / type / description table below is regenerated from the HistoricalVolTick 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 was driven by (YYYYMMDD) — the watermark date for watermark-driven snapshots, or the trade date for the first intraday snapshot.
hvol_20df64Annualized realized vol over the trailing 20 trading days.
hvol_30df64Annualized realized vol over the trailing 30 trading days.
hvol_60df64Annualized realized vol over the trailing 60 trading days.
hvol_120df64Annualized realized vol over the trailing 120 trading days.

Any individual window field is NaN when the cache holds fewer than window + 1 daily-close rows for the symbol.

Configuration (HistoricalVolRequest)

HistoricalVol has no automatic default — the [the analytic's default-spec helper] impl panics. Construct the spec explicitly via HistoricalVolParams::new(filter, daily_close).

Regenerated from the HistoricalVolRequest 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.
annualization_factorf64Trading days / year used to annualize σ. 252.0 for US equities (default); 365.0 for crypto / 24-7 markets; commodity contracts vary. The scalar multiplies the sample variance before the square root in σ = sqrt( (Σ (r_i - r̄)² / (n - 1)) × annualization_factor ).

Operational characteristics

  • Per-tick latency. O(1) — session rollover is the only trigger.
  • Allocation discipline. Mean and variance accumulators are Neumaier-compensated across each window.
  • Asset class gate. Stock-only; option / index trades are ignored at the tick-ingest entry.
  • Replay parity. Deterministic given identical daily-close cache state and identical session-rollover detection.

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.