Appearance
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.
| Field | Type | Description |
|---|---|---|
symbol | Arc<str> | Underlying symbol (interned). |
date | i32 | Session date the emission anchors at (YYYYMMDD). |
ms_of_day | i64 | Milliseconds since midnight ET at emission time. 0 for watermark-driven boot snapshots before any live tick. |
rv_1d | f64 | Current 1-session realized vol (annualized) — the canonical close-to-close daily RV proxy: ` |
rv_5d | f64 | Current 5-session realized vol (annualized). |
rv_10d | f64 | Current 10-session realized vol (annualized). |
rv_20d | f64 | Current 20-session realized vol (annualized). |
rv_60d | f64 | Current 60-session realized vol (annualized). |
pct_rank_1d | f64 | Percentile rank of rv_1d within the trailing distribution_window-session 1-day RV distribution, 0.0..=100.0. NaN cold-start. |
pct_rank_5d | f64 | Percentile rank of rv_5d. |
pct_rank_10d | f64 | Percentile rank of rv_10d. |
pct_rank_20d | f64 | Percentile rank of rv_20d. |
pct_rank_60d | f64 | Percentile rank of rv_60d. |
sessions_observed | i32 | Count 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.
| 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. 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_factor | f64 | Trading 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_window | usize | Distribution 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(())
# }