BACKTEST LABDOCUMENTATION
The research field guide

Know what stands
behind a result.

A replay connects historical observations, a model of execution, and an account. This guide explains each layer, the evidence it consumes, and the conclusions it can support.

TWO CHAPTERSTECHNICAL REFERENCEREVIEWED 17 NOV 2026
01 / Start here

From source to settlement.

02 / The architecture

Two paths. A shared account.

Backtest Lab receives frozen data and strategy actions. Its trade-tape engine uses historical prints to constrain or model execution. Its PML2 engine reconstructs a price-level order book and advances orders through market events. Both use the shared accounting package for cash, reservations, positions, fees, and redemption.

Trade tape / V3

Start with trades.

Suitable for order-flow research and execution sensitivity when full historical depth is unavailable. Source quantities and modeled quantities retain separate identities.

Order book / PML2

Start with depth.

Suitable for studying spread, visible liquidity, taker execution, and resting-order behavior. A historical book still leaves the hypothetical maker queue uncertain.

  1. 01 / INPUTFreezeIdentity, clocks, files, and hashes.
  2. 02 / EXECUTIONReplayActions, delays, matching, and capacity.
  3. 03 / ACCOUNTReconcileCash, inventory, fees, and settlement.
  4. 04 / RESULTInspectFills, history, valuation, and evidence.
Python and Rust are implementation backends. Choosing a backend does not turn a trade-tape model into an order-book model.
03 / Reading a result

Ask four different questions.

  1. Was the input available? Check the market, token, requested interval, observed interval, source identity, and known gaps.
  2. What did the model execute? Inspect fill prices, quantities, timing, capacity use, unfilled orders, and the execution assumptions.
  3. What reached the account? Read the funded ledger and its settlement policy. An estimated fill is not automatically spendable cash or inventory.
  4. What can be valued? Check marks, their ages, residual positions, and final payout evidence before interpreting performance.

The public lab presents Q044 as a saved historical research case with simulated execution, alongside read-only model metadata. Its 18 observed input days and zero-fee assumption are explicit. Separate synthetic tutorials demonstrate the engine's mechanics and do not establish historical returns. Private Python, CLI, and API entrypoints accept caller-supplied inputs for full research runs.

Scope of these pages

This is a reference to the framework's data and execution contracts. It is not a live inventory of all stored history, a data-download endpoint, or an interface for submitting jobs.