Skip to content

Replay scope

Preview (replay-mode Cargo feature). The replay namespace drives any analytic over a deterministic, offline dataset the engine link already holds. The production C-ABI path requires a dataset-staging entry that is not yet exposed; the accessor stays opt-in so production FFI callers cannot reach a path the C ABI does not yet expose. Run replay through the in-tree test link until the staging entry lands.

Shape

rust
// Cargo.toml:
//   kairos = { version = "0.1", features = ["replay-mode"] }

use kairos::{Client, GreeksRow};

let sub = client
    .replay()
    .greeks(["QQQ"])
    .on_event(|row: &GreeksRow| println!("delta={}", row.delta))?;

The analytic accessor argument takes any Into<Targets>; bare ticker strings expand to the chain plus the underlying. The callback fires once per row over the finite replay set.

Replaying a captured Parquet dataset

Bind a Parquet capture on the chain with .from_parquet before the terminal .on_event:

rust
use kairos::{Client, OhlcvcRow};

let sub = client
    .replay()
    .ohlcvc(["SPX"])
    .from_parquet("ticks.parquet")
    .on_event(|bar: &OhlcvcRow| println!("close={}", bar.close))?;

from_parquet is available only on the replay namespace; binding it on the live or historical scope is a compile error, so the dataset path can never be silently dropped.

Replay parity

The emissions produced by replaying a recorded tick capture equal — row for row, field for field, watermark for watermark — the emissions the same analytic would have produced live from the same wire data. The property-based test suite enforces this on every commit through a proptest-driven replay-equivalence harness.

See also

Proprietary. All rights reserved.