Skip to content

VEX

Family: Flow surveillance

What it computes

Emits VexTick ticks carrying net_vex, call_vex, put_vex, strikes_used off chain + OI.

Available on the live, historical, and replay drives.

Methodology

Dealer vega-exposure aggregator: Sum ±ν_i × OI_i × multiplier across chain.

See the methodology overview for the citation index.

Inputs

Chain + OI.

Key outputs

Net_vex, call_vex, put_vex, strikes_used. The full field set is in the tick table below.

Output schema (VexTick)

The field / type / description table below is regenerated from the VexTick Rust source by docs-site/scripts/inject-doc-tables.ts on every npm run docs:build. Do not hand-edit between the sentinels.

FieldTypeDescription
contractContractResolved underlying contract metadata.
datei32Trading-session date in YYYYMMDD form.
ms_of_dayi32Milliseconds-of-day of the emission.
spotf64Spot price at emission time (carried for cross-analytic context, not used as a scalar in the per-contract vega aggregation).
net_vexf64Net vega exposure across every contributing contract.
call_vexf64Sum of call-side vega exposures (positive — dealers are net long calls).
put_vexf64Sum of put-side vega exposures (negative — dealers are net short puts).
strikes_usedu32Number of (expiration, strike, right) triples that contributed.

Configuration (VexParams)

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

FieldTypeDescription
contractsSecurityFilterContracts the subscription tracks.
rateArc<dyn RateService>Risk-free rate provider.
calendarArc<dyn MarketCalendar>Market calendar provider.
annual_dividendOption<f64>Annual continuously compounded dividend yield.
dividend_cache`std::sync::Arc<crate::reference_data::dividend_yield::
DividendYieldCache>`Engine-wired per-symbol dividend-yield cache. Seated at subscribe time by DefaultSpec via wire_dividend_yield. Consulted on the dispatch path only when annual_dividend is None — the per-tick lookup resolves the continuous-dividend carry yield q = D / S from the live underlying spot the analytic already holds (O(1), lock-light, non-blocking). An explicit annual_dividend override always wins.
oi_cacheArc<OpenInterestCache>Engine-wide Option open-interest cache.
spot_cacheSpotPriceCacheShared underlying-spot cache.
contract_multiplierf64Contract multiplier. Default 100.0.
min_emit_interval_msi64Minimum emit interval (ms). Default 1_000.
conditionsConditionPolicyTrade-condition admission policy.
venuesExchangeFilterExchange / venue admission policy.
iv_cacheIvCacheConfigIV reuse thresholds for the per-contract Greek recompute — the same drift policy the Greeks analytic applies. When the (option_mid, spot) pair drifts below both thresholds the bisection IV solve is skipped and the Greek is recomputed in closed form from the cached IV; the solver dominates per-quote cost, so the reuse path carries the steady-state throughput. [IvCacheConfig::off] re-solves on every quote.

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

Rust

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

use kairos::{Client, VexRow};

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

let sub = client
    .live()
    .vex(["SPX"])
    .on_event(|row: &VexRow| println!("net_vex={} strikes_used={}", row.net_vex, row.strikes_used))?;
// ... later ...
sub.unsubscribe();
# Ok(())
# }

Proprietary. All rights reserved.