Skip to content

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.

FieldTypeDescription
symbolArc<str>Underlying symbol (interned).
datei32Trading session date (YYYYMMDD).
ms_of_dayi32Milliseconds since midnight at emission time.
last_pricef64Last admitted print (or NBBO mid when no trade has yet landed).
reference_pricef64LULD reference price — trailing 5-minute VWAP when seated, previous-session close fallback otherwise.
tier&'static strSEC LULD tier classification ("Tier1" / "Tier2").
band_pctf64LULD band width, in percent. NaN for the Tier 2 sub-$0.75 dollar-anchored regime.
upper_bandf64Upper band boundary in dollars.
lower_bandf64Lower band boundary in dollars.
pct_to_upperf64Signed percent distance to the upper band. Positive when the live print sits BELOW the upper band; negative on a breach.
pct_to_lowerf64Signed 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_pctf64Signed percent distance to the closer band. Positive = inside band; negative = breached.
band_doubling_activebooltrue while the last-25-minutes band-doubling window is open.

Configuration (LuldProximityParams)

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

FieldTypeDescription
contractsSecurityFilterContracts the subscription tracks. Stocks only.
conditionsConditionPolicyTrade-condition admission policy for the trailing-VWAP build.
venuesExchangeFilterExchange / venue admission policy.
luld_tierLuldTierSEC 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_msi32Length 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_msi32Minimum interval between emissions per symbol, in milliseconds. Defaults to 1_000 (one snapshot per second).
session_close_msi32Regular-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(())
# }

Proprietary. All rights reserved.