Skip to system research
Build A Trading SystemRules / Evidence / Replay

Write a trading-system data-availability contract

Define what each feature could know at decision time before running the backtest.

Original edition: 8 October 2026. Source limits appear below. Expanded edition: 13 October 2026.

Educational research design and invented arithmetic examples. No strategy returns, broker execution or production certification are supplied.

Inventory the observation rather than the column name

For each feature record its source, instrument identity, timezone, observation timestamp, publication timestamp, revision policy and the time at which a strategy can first consume it. A historical file containing a value does not mean that value was available at the trade decision.

A bar stamped at its opening time still contains a high, low and close formed over the following interval. A macro series may later be revised. A company universe may reflect today's surviving members. Each produces a different availability problem that a train/test split alone cannot repair.

Declare the decision boundary

Specify whether the model evaluates after a completed bar, on a quote event or at a scheduled clock. A condition based on the completed close cannot generally fill at an earlier price inside the same bar. If an auction or special order is part of the premise, document its submission deadline and available information separately.

Keep signal time, intended order time and assumed fill time as different fields. Test equality boundaries explicitly: a source published at the decision timestamp may still require a delivery or processing delay. Use a conservative documented rule instead of an implicit join that makes every datum immediately available.

Freeze identities and transformation rules

Save symbol mappings, contract identifiers, corporate actions, normalization mode and universe membership as of each historical point. Do not substitute a current ticker list for a point-in-time universe. A dataset with only surviving assets cannot support claims about the assets that disappeared.

Transformations need their own availability rules. Rolling statistics must use the intended past window, fitted scalers cannot learn from future periods and missing values must not be filled with later observations. Keep warmup observations distinct from the dates on which outcomes are evaluated.

Run adversarial timing checks

Shift a feature one step later and inspect whether impossible early signals disappear. Test a missing release, a delayed release, a duplicated observation and a timezone transition. A strategy should not silently turn stale data into a fresh event. Record the exact behaviour in a small deterministic test.

These are software and data-integrity checks, not independent return-validation samples. Passing them supports the stated timing contract. It does not establish that the economic hypothesis will survive another period.

Publish a usable contract

A compact contract names each feature, earliest usable time, source vintage, missing-data behaviour, transformation scope and relevant test. Put code and data identities beside it. Someone reconstructing the run should not need to guess whether the time column refers to bar start, bar end or publication.

If the source cannot supply historical vintages, preserve that limitation. Do not replace the missing source with a plausible synthetic history and present it as observed evidence. Synthetic fixtures belong in labelled software tests only.

Sources and scope

Next research step

Trading-system expectancy after costs

A complete synthetic clock, not a historical vintage

The fixture's arbitrary UTC bar-open labels are invented. Completed-close inputs are consumed at the bar decision, and market orders use the next synthetic open under the declared engine convention. Warmup begins decisions at bar 5. Prefix checks demonstrate selected causal behaviour, not historical source availability in a real instrument. No corporate actions, universe membership, publication vintage or individual-contract history are supplied. The original availability contract therefore still governs any actual data study. Synthetic software completeness cannot repair an absent historical source or justify presenting invented values as observed evidence.