Appearance
Garch Proxy
Family: Volatility
What it computes
Emits GarchProxyTick ticks carrying conditional_variance, conditional_volatility, annualized_volatility, last_return, n_intraday_bars off stock trade tape (5m bars).
Available on the live, historical, and replay drives.
Methodology
Bollerslev (1986) intraday GARCH(1,1) streaming conditional-volatility recursion σ²_t = ω + α · r²_{t-1} + β · σ²_{t-1} off pretrained (α, β, ω) scalars; Hansen-Lunde (2005) §3 equity regime defaults (0.10, 0.85, 5e-7).
See the methodology overview for the citation index.
Inputs
Stock trade tape (5m bars).
Key outputs
Conditional_variance, conditional_volatility, annualized_volatility, last_return, n_intraday_bars. The full field set is in the tick table below.
Output schema (GarchProxyTick)
The field / type / description table below is regenerated from the GarchProxyTick 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 | Trading-session date (YYYYMMDD) at emission time. |
ms_of_day | i32 | Milliseconds since midnight ET at emission time. |
conditional_variance | f64 | Standing conditional variance σ²_t per the GARCH(1,1) recursion. Initialised at the long-run anchor ω / (1 − α − β) on the first emission. |
conditional_volatility | f64 | Standing per-bar conditional volatility σ_t = sqrt(σ²_t). |
annualized_volatility | f64 | Annualised conditional volatility under the canonical 252 sessions × bars_per_session institutional convention. |
last_return | f64 | Last sealed per-bar log return r_t the recursion advanced against — 0.0 before any bar has sealed. |
n_intraday_bars | i32 | Count of sealed bars the recursion has advanced against. |
Configuration (GarchProxyParams)
Regenerated from the GarchProxyParams Rust source — see the note above.
| Field | Type | Description |
|---|---|---|
contracts | SecurityFilter | Contracts the subscription tracks. Stocks only — the analytic silently ignores option / index trades at the on_tick entry point. |
conditions | ConditionPolicy | Trade-condition admission policy applied to every print. |
venues | ExchangeFilter | Exchange / venue admission policy. |
bar_interval_ms | i32 | Per-bar cadence in milliseconds. Defaults to [DEFAULT_BAR_INTERVAL_MS] (300_000 ms / 5 min). |
alpha | f64 | GARCH(1,1) α loading on the lagged squared return. Defaults to [DEFAULT_ALPHA] (0.10). |
beta | f64 | GARCH(1,1) β loading on the lagged conditional variance. Defaults to [DEFAULT_BETA] (0.85). |
omega | f64 | GARCH(1,1) ω constant. Defaults to [DEFAULT_OMEGA] (5e-7). |
bars_per_session | i32 | Bars-per-session count used to convert the per-bar conditional variance to the annualised conditional volatility. Defaults to [DEFAULT_BARS_PER_SESSION] (78). |
min_emit_interval_ms | i32 | Minimum interval between consecutive emissions per symbol, in milliseconds. Defaults to [DEFAULT_MIN_EMIT_INTERVAL_MS] (60_000 ms). Set to 0 to publish on every sealed bar. |
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_proxy(["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()
.garchProxy(["QQQ"])
.onEvent((tick) => {
console.log(tick);
});Rust
rust
// Cargo.toml:
// kairos = "0.1"
use kairos::{Client, GarchProxyRow};
# fn run() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::connect(("me@example.com", "secret"))?;
let sub = client
.live()
.garch_proxy(["QQQ"])
.on_event(|row: &GarchProxyRow| println!("conditional_volatility={} annualized_volatility={}", row.conditional_volatility, row.annualized_volatility))?;
// ... later ...
sub.unsubscribe();
# Ok(())
# }