Skip to content

Garch Forecast

Family: Volatility

What it computes

Emits GarchForecastTick ticks carrying garch_vol_1d / 30d / 60d, vol_premium 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

Engle (1982) GARCH(1,1), Hansen-Lunde (2005) loadings α=0.10 / β=0.85.

See the methodology overview for the citation index.

Inputs

Daily-close cache.

Key outputs

Garch_vol_1d / 30d / 60d, vol_premium. The full field set is in the tick table below.

Output schema (GarchForecastTick)

The field / type / description table below is regenerated from the GarchForecastTick 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).
datei32Trading-session date (YYYYMMDD) at emission time.
ms_of_dayi32Milliseconds since midnight ET at emission time. 0 for watermark-driven boot snapshots before any live tick.
garch_vol_1df64One-step-ahead conditional volatility (annualized) sqrt(σ²_{t+1} · annualization_factor). NaN with fewer than two log returns.
garch_vol_30df6430-session conditional volatility (annualized) recovered from averaging the per-day forecast variance across the horizon — the canonical GARCH_VOL_30D surface.
garch_vol_60df6460-session conditional volatility (annualized) — paired two-month horizon institutional desks publish alongside the 30-day forecast.
current_ivf64Latest standing implied-volatility scalar — passes the spec's current_iv_override through so downstream consumers can audit the threaded IV reference directly.
vol_premiumf64Vol-premium signal current_iv − garch_vol_30d — positive values indicate the option market is pricing more vol than the GARCH forecast implies (institutional short-vol setup); negative values flag the dispersion-favoured long-vol regime.
alphaf64Recovered shock loading α — surfaces the configured value directly so consumers can verify the spec wiring per emission.
betaf64Recovered persistence loading β — surfaces the configured value directly.
omegaf64Recovered drift term ω = σ²_∞ · (1 − α − β). Clamped to zero in the non-stationary α + β ≥ 1 regime.
long_run_variancef64Long-run (unconditional) variance estimate σ²_∞ = (1 / n) · Σ r² — the moment-method anchor every multi-step forecast mean-reverts to.
sessions_usedi32Count of log returns actually consumed by the moment estimator. Values below [LOOKBACK_SESSIONS] (252) signal a warm-up regime where the unconditional-variance anchor is fit off a shorter window than the institutional target.

Configuration (GarchForecastParams)

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

FieldTypeDescription
contractsSecurityFilterContracts the subscription tracks. Stocks only — the analytic silently ignores option / index trades at the on_tick entry point.
conditionsConditionPolicyTrade-condition admission policy applied to every print.
venuesExchangeFilterExchange / venue admission policy.
daily_closeArc<DailyCloseCache>Boot-time hydrated history. Sealed for the lifetime of the subscription. The cache must hold at least two rows for the moment estimator to seat; production fits prefer the full [LOOKBACK_SESSIONS] (252) trailing window.
annualization_factorf64Trading days / year used to annualize σ. 252.0 for US equities (default); 365.0 for crypto / 24-7 markets. The scalar threads identically through every per- horizon sqrt(variance · annualization_factor) projection.
alphaf64GARCH(1,1) shock loading α. Defaults to [DEFAULT_ALPHA] (0.10). Subscribers can override per the per-asset-class MLE fit; out-of-band values are admitted as-is and surfaced on the emitted alpha field so consumers can audit the configuration directly.
betaf64GARCH(1,1) persistence loading β. Defaults to [DEFAULT_BETA] (0.85). Out-of-band values are admitted as-is; the analytic clamps α + β ≥ 1 per the documented non-stationary guard on the emit path.
current_iv_overridef64Standing implied-volatility scalar (annualized). Institutional callers thread the per-symbol ATM IV reading through the spec — e.g. the latest IvSkewTick::atm_iv snapshot — so the vol_premium field can resolve. Defaults to NaN meaning the premium surfaces as NaN until an IV is wired in.
min_emit_interval_msi32Minimum interval between consecutive emissions per symbol, in milliseconds. Defaults to [DEFAULT_MIN_EMIT_INTERVAL_MS] (60_000 ms / 1 min). Set to 0 to publish on every admitted print.

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().garch_forecast(["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()
  .garchForecast(["QQQ"])
  .onEvent((tick) => {
    console.log(tick);
  });

Rust

rust
// Cargo.toml:
//   kairos = "0.1"

use kairos::{Client, GarchForecastRow};

# fn run() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::connect(("me@example.com", "secret"))?;

let sub = client
    .live()
    .garch_forecast(["QQQ"])
    .on_event(|row: &GarchForecastRow| println!("garch_vol_1d={} vol_premium={}", row.garch_vol_1d, row.vol_premium))?;
// ... later ...
sub.unsubscribe();
# Ok(())
# }

Proprietary. All rights reserved.