Appearance
Vol Surface Factors
Family: Volatility
What it computes
Emits VolSurfaceFactorsTick ticks carrying per_tenor (level, slope, curvature, R²) off chain snapshot.
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
Carr-Wu (2009) / Gatheral-Jacquier (2014) SVI / SSVI per-tenor level / slope / curvature OLS fit on log-moneyness.
See the methodology overview for the citation index.
Inputs
Chain snapshot.
Key outputs
Per_tenor (level, slope, curvature, R²). The full field set is in the tick table below.
Output schema (VolSurfaceFactorsTick)
The field / type / description table below is regenerated from the VolSurfaceFactorsTick 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 at emission time. |
tenors | Vec<TenorFactors> | Per-tenor factor triples — one entry per admitted expiration. |
Configuration (VolSurfaceFactorsParams)
Regenerated from the VolSurfaceFactorsParams 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. Retained for surface consistency. |
daily_close | Arc<DailyCloseCache> | Boot-time hydrated daily-close history. The empty default is a placeholder — the analytic's kernel consumes a chain snapshot rather than the daily-close history, but the cache slot is retained so the DefaultSpec hook can fail closed with the same documented cache-dependency error the other vol analytics surface. |
min_strikes_per_tenor | i32 | Minimum number of admitted strikes per tenor for the OLS system to publish a real-valued factor triple. Defaults to [DEFAULT_MIN_STRIKES_PER_TENOR] (5). |
forward_override_x1000 | i32 | Forward-price proxy strategy: 0 selects the median listed strike off the snapshot per the deterministic kernel anchor; any positive value overrides the proxy with a caller-supplied F × 1000 integer reading. |
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().vol_surface_factors(["SPX"]).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()
.volSurfaceFactors(["SPX"])
.onEvent((tick) => {
console.log(tick);
});Rust
rust
// Cargo.toml:
// kairos = "0.1"
use kairos::{Client, VolSurfaceFactorsRow};
# fn run() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::connect(("me@example.com", "secret"))?;
let sub = client
.live()
.vol_surface_factors(["SPX"])
.on_event(|row: &VolSurfaceFactorsRow| println!("tenors={:?}", row.tenors))?;
// ... later ...
sub.unsubscribe();
# Ok(())
# }