Skip to content

Jump Test

Family: Volatility

What it computes

Emits JumpTestTick ticks carrying rv, bv, jump_z, jump_prob off intraday tape (5m bars).

Available on the live, historical, and replay drives.

Methodology

Barndorff-Nielsen / Shephard (2004) RV/BV, Huang-Tauchen (2005) finite-sample guard.

See the methodology overview for the citation index.

Inputs

Intraday tape (5m bars).

Key outputs

Rv, bv, jump_z, jump_prob. The full field set is in the tick table below.

Output schema (JumpTestTick)

The field / type / description table below is regenerated from the JumpTestTick 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.
rv_totalf64Realized variance over the rolling-window bars RV = Σ rᵢ². Always finite past the first bar — surfaces the cold-start single-bar regime as a finite scalar rather than NaN.
bv_continuousf64Bipower variation `BV = (π / 2) · Σ
jump_componentf64Jump-component variance J² = max(RV − BV, 0) — the finite-activity jump contribution under the BNS decomposition. Clamped at zero so the institutional invariant BV ≤ RV passes through to the consumer as a hard guarantee. NaN with fewer than two bars (BV is undefined).
z_statisticf64BNS z-statistic (RV − BV) / sqrt((θ / N) · max(QV, BV²)) with the Huang-Tauchen (2005) denominator-guard. Asymptotically N(0, 1) under the continuous-only null. NaN with fewer than four bars (quad-power kernel undefined) or on a degenerate zero-variance window.
jump_probabilityf64Test-confidence gauge Φ(z_statistic) — the standard-normal CDF projection of the z-statistic, in [0, 1]. This is the confidence level at which the one-sided BNS test rejects the no-jump null (1 − p-value), NOT a posterior probability that a jump occurred — the test controls the false-positive rate under the null and says nothing about jump prevalence. Values approaching 1 indicate the per-window RV is statistically dominated by the jump component; values near 0.5 indicate no detectable jump activity. NaN under the documented degenerate-window guard.
n_intraday_barsi32Count of intraday bars currently inside the rolling window — the BNS N parameter. Values below 4 flag the cold-start regime where the z-statistic stays NaN.

Configuration (JumpTestParams)

Regenerated from the JumpTestParams 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.
bar_interval_msi32Per-bar cadence in milliseconds. Defaults to [DEFAULT_BAR_INTERVAL_MS] (300_000 ms / 5 min).
window_barsi32Rolling-window length in bars. Defaults to [DEFAULT_WINDOW_BARS] (78 — one US-equity session at the default 5-minute cadence).
min_emit_interval_msi32Minimum 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().jump_test(["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()
  .jumpTest(["QQQ"])
  .onEvent((tick) => {
    console.log(tick);
  });

Rust

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

use kairos::{Client, JumpTestRow};

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

let sub = client
    .live()
    .jump_test(["QQQ"])
    .on_event(|row: &JumpTestRow| println!("jump_probability={} z_statistic={}", row.jump_probability, row.z_statistic))?;
// ... later ...
sub.unsubscribe();
# Ok(())
# }

Proprietary. All rights reserved.