Skip to content

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.

FieldTypeDescription
symbolArc<str>Underlying symbol (interned).
tenor_daysu16Canonical tenor (calendar days) the rank tracks.
datei32Trading-session date (YYYYMMDD) at emission time.
ms_of_dayi32Milliseconds since midnight at emission time.
ivol_currentf64Current ATM IV — the most recent admitted sample.
ivol_high_252f64Highest ATM IV across the trailing window.
ivol_low_252f64Lowest ATM IV across the trailing window.
iv_rankf64Normalized 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_observedi32Count of admitted sessions in the rolling window.

Configuration (IvRankParams)

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

FieldTypeDescription
contractsSecurityFilterUnderlying symbols the subscription tracks.
conditionsConditionPolicyTrade-condition admission policy. Retained for surface consistency.
venuesExchangeFilterExchange / venue admission policy.
iv_historyArc<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_daysu16Canonical tenor the rank tracks. Defaults to [DEFAULT_TENOR_DAYS] (30).
window_sessionsusizeRolling-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(())
# }

Proprietary. All rights reserved.