Appearance
IV Rank
Family: Volatility
What it computes
Emits IvRankTick ticks carrying iv_rank, ivol_current, ivol_high_252, ivol_low_252, sessions_observed off IV-history 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
Tastytrade / Bloomberg IMP_VOL_RANK normalization (IV_now - IV_min_252) / (IV_max_252 - IV_min_252) on the trailing 252-session ATM IV history.
See the methodology overview for the citation index.
Inputs
IV-history cache.
Key outputs
Iv_rank, ivol_current, ivol_high_252, ivol_low_252, sessions_observed. The full field set is in the tick table below.
Output schema (IvRankTick)
The field / type / description table below is regenerated from the IvRankTick 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). |
tenor_days | u16 | Canonical tenor (calendar days) the rank tracks. |
date | i32 | Trading-session date (YYYYMMDD) at emission time. |
ms_of_day | i32 | Milliseconds since midnight at emission time. |
ivol_current | f64 | Current ATM IV — the most recent admitted sample. |
ivol_high_252 | f64 | Highest ATM IV across the trailing window. |
ivol_low_252 | f64 | Lowest ATM IV across the trailing window. |
iv_rank | f64 | Normalized IV rank (IV_now - IV_min) / (IV_max - IV_min), on [0.0, 1.0]. NaN on a flat-band history where IV_max == IV_min. |
sessions_observed | i32 | Count of admitted sessions in the rolling window. |
Configuration (IvRankParams)
Regenerated from the IvRankParams Rust source — see the note above.
| Field | Type | Description |
|---|---|---|
contracts | SecurityFilter | Underlying symbols the subscription tracks. |
conditions | ConditionPolicy | Trade-condition admission policy. Retained for surface consistency. |
venues | ExchangeFilter | Exchange / venue admission policy. |
iv_history | Arc<IvHistoryCache> | Boot-time hydrated per-(symbol, tenor) IV history. Sealed for the lifetime of the subscription. The empty default is a placeholder — the production hydration step is upstream-side. |
tenor_days | u16 | Canonical tenor the rank tracks. Defaults to [DEFAULT_TENOR_DAYS] (30). |
window_sessions | usize | Rolling-window length in trailing trading sessions. Defaults to [DEFAULT_WINDOW_SESSIONS] (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().iv_rank(["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()
.ivRank(["QQQ"])
.onEvent((tick) => {
console.log(tick);
});Rust
rust
// Cargo.toml:
// kairos = "0.1"
use kairos::{Client, IvRankRow};
# fn run() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::connect(("me@example.com", "secret"))?;
let sub = client
.live()
.iv_rank(["QQQ"])
.on_event(|row: &IvRankRow| println!("iv_rank={} ivol_current={}", row.iv_rank, row.ivol_current))?;
// ... later ...
sub.unsubscribe();
# Ok(())
# }