Skip to content

PriceBand52W

Preview on the public Rust client. The analytic ships in the engine and is reachable today through the Python wheel and the TypeScript / Node addon; a per-analytic builder on the public Rust thin client (kairos::Client) is tracked on the roadmap. The output tick schema below is stable.

What it computes

Rolling 252-trading-day high / low per symbol, plus newhigh / newlow flags fired by live trades. The analytic rolls up (low_52w, high_52w) once at subscription time from engine daily-close cache::last_n(symbol, 252), then fires one tick on every admitted stock trade whose price crosses either extreme. Session rollover re-emits the latest band snapshot.

Methodology

Rolling extrema over the configured window. The 52w glossary suffix on the output fields is the trade-alert.com glossary term, not a declaration of the underlying lookback — window_days is configurable, but the field names retain the conventional suffix.

Methodology parity with Bloomberg 52WkHi / 52WkLo, Refinitiv HIGH_52W / LOW_52W, and trade-alert.com newhigh / newlow.

Inputs

Output schema (PriceBand52WTick)

The field / type / description table below is regenerated from the PriceBand52WTick 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).
datei32Session date the triggering trade printed in (YYYYMMDD).
ms_of_dayi64Trade time the triggering print landed at, in ms since midnight ET. For watermark-driven snapshots, the watermark's ms_of_day.
pricef64Trade price that fired the emission. NaN for watermark-driven snapshots.
low_52wf64Lowest close observed across the trailing [ROLLING_WINDOW_DAYS] sessions cached at subscription time.
high_52wf64Highest close observed across the trailing [ROLLING_WINDOW_DAYS] sessions cached at subscription time.
newhighbooltrue when the triggering trade printed strictly above [Self::high_52w].
newlowbooltrue when the triggering trade printed strictly below [Self::low_52w].

Configuration (PriceBand52WRequest)

Construct via PriceBand52WParams::new(filter, daily_close) — the [the analytic's default-spec helper] impl returns this same constructor wired with the engine's hydrated cache.

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

FieldTypeDescription
contractsSecurityFilterContracts the subscription tracks. Stocks only.
conditionsConditionPolicyTrade-condition admission policy.
venuesExchangeFilterExchange / venue admission policy.
daily_closeArc<DailyCloseCache>Boot-time hydrated history. Sealed for the lifetime of the subscription.
window_daysusizeRolling window length in trading days. 252 = 52 weeks (default — matches the field-name suffix); 21 = 1 month; 63 = 1 quarter; 1300 = 5 years. Tick field names retain the 52w suffix per industry glossary terminology even when the configured window deviates from 252 — the suffix is the trade-alert glossary term, not a declaration of the underlying lookback.

Operational characteristics

  • Per-tick latency. O(1) — two comparisons per print.
  • Allocation discipline. Band snapshot is a single struct on the per-symbol cell; no hot-path allocations.
  • Replay parity. Deterministic given identical daily-close cache state.

Example

Preview. This analytic ships in the engine and is reachable today through the Python wheel and the TypeScript / Node addon. A per-analytic builder on the public Rust thin client (kairos::Client) is tracked on the roadmap — bare-string symbol filters passed to the analytic accessor will match the other analytics already exposed there. The output tick rows are stable and documented above.

Proprietary. All rights reserved.