Appearance
LULD Proximity
Family: Risk
What it computes
Emits LuldProximityTick ticks carrying pct_to_upper / lower, band_doubling off trade tape (5m Neumaier VWAP reference).
Available on the live, historical, and replay drives.
Methodology
SEC NMS LULD Plan + last-25-min band doubling.
See the methodology overview for the citation index.
Inputs
Trade tape (5m Neumaier VWAP reference).
Key outputs
Pct_to_upper / lower, band_doubling. The full field set is in the tick table below.
Output schema (LuldProximityTick)
The field / type / description table below is regenerated from the LuldProximityTick 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_price | f64 | Last admitted print (or NBBO mid when no trade has yet landed). |
reference_price | f64 | LULD reference price — trailing 5-minute VWAP when seated, previous-session close fallback otherwise. |
tier | &'static str | SEC LULD tier classification ("Tier1" / "Tier2"). |
band_pct | f64 | LULD band width, in percent. NaN for the Tier 2 sub-$0.75 dollar-anchored regime. |
upper_band | f64 | Upper band boundary in dollars. |
lower_band | f64 | Lower band boundary in dollars. |
pct_to_upper | f64 | Signed percent distance to the upper band. Positive when the live print sits BELOW the upper band; negative on a breach. |
pct_to_lower | f64 | Signed percent distance to the lower band. Positive when the live print sits ABOVE the lower band; negative on a breach. |
closer_band | &'static str | "Upper" when the upper band is the closer boundary, "Lower" otherwise. |
closer_pct | f64 | Signed percent distance to the closer band. Positive = inside band; negative = breached. |
band_doubling_active | bool | true while the last-25-minutes band-doubling window is open. |
Configuration (LuldProximityParams)
Regenerated from the LuldProximityParams Rust source — see the note above.
| Field | Type | Description |
|---|---|---|
contracts | SecurityFilter | Contracts the subscription tracks. Stocks only. |
conditions | ConditionPolicy | Trade-condition admission policy for the trailing-VWAP build. |
venues | ExchangeFilter | Exchange / venue admission policy. |
luld_tier | LuldTier | SEC LULD tier classification per the spec. Defaults to [LuldTier::Tier2] — the institutional safe default that surfaces the wider Tier 2 band (10% above $3.00) for any symbol whose Tier 1 status the caller has not confirmed. |
reference_window_ms | i32 | Length of the trailing reference-price window, in milliseconds. Defaults to [REFERENCE_WINDOW_MS] (300_000 ms / 5 minutes) per the SEC LULD Plan. |
emit_interval_ms | i32 | Minimum interval between emissions per symbol, in milliseconds. Defaults to 1_000 (one snapshot per second). |
session_close_ms | i32 | Regular-session close in milliseconds-of-day, used to gate the last-25-minutes band-doubling window. Defaults to [REGULAR_SESSION_CLOSE_MS] (16:00 ET). |
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().luld_proximity(["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()
.luldProximity(["QQQ"])
.onEvent((tick) => {
console.log(tick);
});Rust
rust
// Cargo.toml:
// kairos = "0.1"
use kairos::{Client, LuldProximityRow};
# fn run() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::connect(("me@example.com", "secret"))?;
let sub = client
.live()
.luld_proximity(["QQQ"])
.on_event(|row: &LuldProximityRow| println!("last={} ref={}", row.last_price, row.reference_price))?;
// ... later, to stop delivery ...
sub.unsubscribe();
# Ok(())
# }