Appearance
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:
where
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
engine daily-close cache::last_n(symbol, 121)hydrated at boot.- Session-rollover detection from the admitted stock-trade stream.
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.
| Field | Type | Description |
|---|---|---|
symbol | Arc<str> | Underlying symbol (interned). |
date | i32 | Session date the emission was driven by (YYYYMMDD) — the watermark date for watermark-driven snapshots, or the trade date for the first intraday snapshot. |
hvol_20d | f64 | Annualized realized vol over the trailing 20 trading days. |
hvol_30d | f64 | Annualized realized vol over the trailing 30 trading days. |
hvol_60d | f64 | Annualized realized vol over the trailing 60 trading days. |
hvol_120d | f64 | Annualized 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.
| Field | Type | Description |
|---|---|---|
contracts | SecurityFilter | Contracts the subscription tracks. Stocks only. |
conditions | ConditionPolicy | Trade-condition admission policy. |
venues | ExchangeFilter | Exchange / venue admission policy. |
daily_close | Arc<DailyCloseCache> | Boot-time hydrated history. Sealed for the lifetime of the subscription. |
annualization_factor | f64 | Trading 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.