Skip to content
CN2.DEVBUKYA NARESH

BUILD / 03 — PRODUCT OVERVIEW

POINT-IN-TIME SAFE MARKET-DATA INFRASTRUCTURE

QUANT MARKET DATA REPLAY

Point-in-time safe market-data infrastructure for quantitative research.

A market-data infrastructure that ingests raw exchange data, normalizes, validates, quarantines and reorders it, then serves point-in-time safe access with deterministic replay — eliminating lookahead bias by construction. Exact decimal arithmetic, nanosecond timestamps, SQLite WAL storage, sliding watermarks and deterministic tie-breaking.

RELEASEDCore infrastructure implemented; 70-test suite passes CI on Python 3.10-3.12.

9

PIPELINE STAGES

RAW → ANALYTICS

ns

TIMESTAMP PRECISION

NANOSECOND CLOCK

0

SILENT DATA DROPS

QUARANTINE MODEL

WAL

STORAGE MODE

SQLITE

SYSTEM INSTRUMENT / DATA REPLAY

VISUAL METAPHOR — TEMPORAL DATA STREAM / REPLAY ENVIRONMENT

INSTRUMENT / POINT-IN-TIME REPLAY

STRUCTURAL DEMONSTRATION — SYNTHETIC DETERMINISTIC SERIES

POINT-IN-TIME REPLAY LAB

LOOKAHEAD VS POINT-IN-TIME SAFE

The signature research instrument. Scrub the timestamp to see the information boundary — what was knowable at t, and what only existed after t.

POINT-IN-TIME SAFE VIEW (STRUCTURAL GUARANTEE)

VISIBLE AT t: 24 CANDLESFUTURE-DATED: 18 CANDLES (GHOSTED)

A query at t can only read the solid candles. The ghosted region is information that did not yet exist — in a naive backtest it silently leaks in (lookahead); in point-in-time infrastructure it is structurally unreachable. Series is deterministic and synthetic.

9-STAGE PIPELINE — RAW DATA → ANALYTICS

RAW DATAUnmodified exchange capture
● No transformation
● Full fidelity
INGESTIONBoundary validation
● Schema check
● Range validation
NORMALIZATIONCanonical representation
● Exact decimals
● Nanosecond timestamps
VALIDATIONIntegrity gates
● Continuity check
● Corrupt isolation
QUARANTINEFailure containment
● Explicit isolation
● Audit trail
REORDERCausal ordering
● Deterministic tie-breaking
● Equal-ts resolution
STORAGEPoint-in-time ledger
● SQLITE WAL
● Sliding watermark
PIT ACCESSPoint-in-time safe reads
● Watermark enforcement
● No future data
DETERMINISTIC REPLAYReproducible research
● Byte-identical output
● Adversarial tested

THE BUILD AT A GLANCE

WHAT IT IS, WHAT IT SOLVES, HOW IT IS BUILT — THE FULL EVIDENCE CHAIN LIVES IN THE CASE STUDY

THE PROBLEM

Lookahead bias is the quiet killer of quantitative research. It enters through ordinary engineering decisions: a resampled candle that includes the future tail of its window, a join that matches on post-hoc knowledge, a timestamp normalized to a coarser clock.

Once contaminated, a backtest cannot be repaired — the result must be regenerated from clean data. Prevention is the only cure, and prevention has to happen in the data layer, not the strategy layer.

WHAT IT DOES

  • Build an ingestion → normalization → validation → quarantine → reorder → storage pipeline that never silently drops or fabricates data
  • Serve point-in-time safe reads with a sliding watermark
  • Make replay deterministic: same query, same clock, same result — including tie-breaking
  • Use exact decimal arithmetic and nanosecond timestamps so precision itself cannot introduce bias

RESEARCH QUESTION

Can market-data infrastructure guarantee that a consumer at time t can only access information that existed at time t — deterministically, and at full research throughput?

ARCHITECTURE

  1. 01

    INGESTION

    Raw data acquisition

  2. 02

    NORMALIZATION

    Canonical representation

  3. 03

    VALIDATION

    Integrity gates

  4. 04

    QUARANTINE

    Failure containment

  5. 05

    REORDER

    Causal ordering

  6. 06

    STORAGE

    Point-in-time ledger

  7. 07

    PIT ACCESS

    Point-in-time safe reads

  8. 08

    DETERMINISTIC REPLAY

    Reproducible research

  9. 09

    ANALYTICS

    Downstream consumption

TECHNOLOGY

PythonSQLite WALExact decimal arithmeticNanosecond timestamps

KEY EVIDENCE

REPOSITORY

Full pipeline implementation on GitHub

OPEN THE SOURCE →

ADVERSARIAL TESTS

Deliberate attempts to extract future information fail

OPEN THE SOURCE →

DETERMINISM

Byte-identical replay across runs, including tie-breaking

OPEN THE SOURCE →

CURRENT STATE

RELEASED

Core infrastructure implemented; 70-test suite passes CI on Python 3.10-3.12.

LAST VERIFIED 2026-09-17 — GitHub Actions CI: full unittest suite passed on Python 3.10-3.12 · BASELINE a72d803 · VIEW THE RUN →

GO DEEPER

THE FULL EVIDENCE CHAIN

Problem, hypothesis, architecture, methodology, experiments, results — and the failures and limitations beside them. The case study is the full write-up for this build.