Appearance
Lee Mykland Jumps
Family: Volatility
What it computes
Emits LeeMyklandJumpsTick ticks carrying · off r_j.
Drive availability: r_{j-1}.
Methodology
Lee / Mykland (2008) high-frequency per-bar jump detector — standardizes each sealed return against the bipower-derived local volatility `sigma_hat_i² = (1 / (K − 2)) · Σ.
See the methodology overview for the citation index.
Inputs
R_j.
Key outputs
·. The full field set is in the tick table below.
Output schema (LeeMyklandJumpsTick)
The field / type / description table below is regenerated from the LeeMyklandJumpsTick 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). |
ms_of_day | i32 | Milliseconds since midnight at emission time. |
last_return | f64 | Most recently sealed per-bar log return r_i. |
sigma_hat | f64 | Lee / Mykland (2008) local bipower-derived volatility sigma_hat_i. Strictly positive on every emitted row — rows publish only once the K + 1-bar local window is filled and non-degenerate. |
standardized_return | f64 | Standardized return L_i = r_i / sigma_hat. |
jump_threshold | f64 | Gumbel-tail critical threshold at the configured confidence level. Always finite: the normalizers require n ≥ 2, and rows publish only when the threshold is defined. |
jump_detected | bool | True when ` |
jump_count | i32 | Running per-session count of detected jump bars. |
n_intraday_bars | i32 | Count of intraday bars currently inside the rolling FIFO. |
Configuration (LeeMyklandJumpsParams)
Regenerated from the LeeMyklandJumpsParams 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] (60_000 ms / 1 min). |
local_window_bars | i32 | Local-volatility lookback window K (in bars). Defaults to [DEFAULT_LOCAL_WINDOW_BARS] (16). |
fifo_bars | i32 | Rolling FIFO horizon (in bars). Defaults to [DEFAULT_FIFO_BARS] (390). |
confidence | f64 | Confidence level for the Gumbel-tail jump threshold. Defaults to [DEFAULT_CONFIDENCE] (0.99). |
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().lee_mykland_jumps(["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()
.leeMyklandJumps(["QQQ"])
.onEvent((tick) => {
console.log(tick);
});Rust
rust
// Cargo.toml:
// kairos = "0.1"
use kairos::{Client, LeeMyklandJumpsRow};
# fn run() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::connect(("me@example.com", "secret"))?;
let sub = client
.live()
.lee_mykland_jumps(["QQQ"])
.on_event(|row: &LeeMyklandJumpsRow| println!("L={} sigma={}", row.standardized_return, row.sigma_hat))?;
// ... later, to stop delivery ...
sub.unsubscribe();
# Ok(())
# }