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

Synthetic system replay workbook

64 invented bars. One frozen rule. Six simulated positions. Net cash change -1.20.

One frozen software question

This completed packet asks whether one declared implementation makes causal crossover decisions and reconciles cash under a pinned library's next-open policy. It does not ask whether any instrument has a profitable model. All 64 bars are invented: no ticker, exchange, actual session, broker or licensed historical data is represented. The arbitrary UTC labels start at 2000-01-01 and have one-minute spacing only to make ordering explicit. Backtesting.py 0.6.6 supplies the core engine; the small public source supplies the fixed strategy, strict loader and receipt formatting. The sample is not optimised, ranked or presented as an untouched economic holdout.

One-unit long entries use strict 3-bar/5-bar moving-average crossings on the completed close. A flat account and empty pending-order state are required. Decisions are eligible from bar 5 through 49. Entry intentions fill at the following bar's open under the engine configuration. The entry-fill bar counts as the first completed holding bar; the exit request follows three completed bars and fills at the next open. Whole-position exits remain the only exit. There are no intrabar stop/target branches, trailing managers, short trades, leverage, optimisation or daily stop-management routine.

Warmup and causal availability

The loader requires exact columns, sequential bar IDs, unique increasing minute timestamps, finite positive prices, consistent OHLC ranges and nonnegative volume. A five-bar rolling average cannot exist before its warmup observations. Engine iteration starts at bar 5 for this indicator setup; warmup data is not converted into eligible trades. Each decision records the available close and both averages, so a reader can trace the crossover without relying on an image. The entry intention is recorded separately from the later simulated fill.

The private QA runner independently computes rolling means and cash using Decimal arithmetic. It rejects duplicate IDs, duplicate times, an invalid OHLC range, a nonfinite close and a missing observation. Four future-price mutations after predeclared cut points preserve every earlier decision. Those checks address selected software properties. They do not independently validate a financial strategy, prove complete real-time availability, certify a source or replace the canonical research factory. The tutorial's next-open fill is explicitly separate from Vector Ridge's established observation-window hypothetical research convention; neither is an actual broker execution.

A negative result is still a useful complete fixture

The engine completes six simulated positions. Each pays 0.10 at entry and 0.10 at exit. Quantity is always one and total commissions are 1.20. Gross price cash sums to zero; final simulated cash is therefore 9,998.80 from 10,000. The engine retains its floating-point net output near -1.20, while the independent decimal reconciliation is exactly -1.20. Display rounding does not change the stored engine receipt. Winning and losing rows remain in the packet, and no favourable subset replaces the complete eligible population.

The rule is no longer eligible to open new positions after bar 49. A declared flat buffer allows the final exit to complete before the 64-bar dataset ends. Forced finalisation is disabled. The receipt retains settings, engine and dependency versions, code/data/settings SHA-256 identities, all decisions, all transactions, the equity curve and the final balance. Broker fills are null, economic validation is false and production promotion is false. The negative fixture is not an independently verified no-model master for an actual market, because no actual instrument research was conducted.

Files, bytes and reproducibility

Download the exact CSV, frozen settings, launcher, transaction CSV and engine receipt. The artifact map records the exact byte length and SHA-256 for each of those five objects. The browser inspector hashes bytes locally and compares them with this edition's published map. Matching bytes identify the declared artifact, not the truth of its contents or an independent engine rerun. JSON reformatting, line-ending conversion or one altered price can change the hash without establishing that a trading system improved or failed. Preserve the received object before normalising it.

The public launcher is byte-identical to the local reference source. It accepts only the declared CSV and an optional output receipt path; it does not fetch market data, submit orders or install production scheduling. Reference requirements pin the engine and recorded numerical dependencies. A repeat run in the reference environment reproduces the receipt. An environment change belongs in an explicit comparison, not a quiet replacement of the expected hash. The package's AGPL licence is included as supplied; it does not grant rights over third-party market data, proprietary models or this whole publication.

What remains outside this demonstration

A real study needs an identified asset route, independently verified data, causal availability, a raw entry-training objective, frozen entry identity, a single predeclared exit, complete selection history and the required independent master. Actual execution adds permissions, receiving quantities, order journals, financing, costs and cloud-owned operational state. Passing this fixture authorises none of those steps. Local software QA and educational drafts are allowed; production refreshes and authoritative publishers cannot depend on a personal computer, a local tunnel or Codex remaining open.

Provider profiles describe documented roles and explicitly missing records. They do not inherit this fixture's simulated transactions or correctness checks. A crossover lesson is not a reconstruction of proprietary Vector Ridge logic. Reported personal returns, competition accounts, attributed credentials, historical model summaries and timestamp payloads each retain their own source limits. This publication supports a disclosed marketing programme; it does not manufacture a second independent testing panel or a consensus of financial winners.

Complete simulated transaction sequence

Intent barEntry barExit requestExit barEntry priceExit priceNet cash
78101199.2101.92.50
1718202199.295.9-3.50
2324262798.8102.03.00
3334363798.896.0-3.00
3940424399.1102.22.90
4950525399.196.2-3.10
Invented close and moving averages above simulated equity change
Synthetic prices and library simulation, not a market history or subscriber account.

Exact artifact identities

Artifact pathKindSHA-256
resources/synthetic-system-bars.csvbarsbe9608fdae8c6899aba237c6cd8cb3e05bc66dd0f05f3aa1726396c82fd4da95
resources/synthetic-system-settings.jsonsettingsedcc979aed20e5cf92e65e3deed96986add6e62ea246d6f05ca04d80bcf0004b
resources/synthetic-system-replay.py.txtsource57a6e66b5b9101d726ad86a10ddca30c9c79b979e8539b358f67671a1b7c93dd
data/synthetic-system-replay.jsonreceipt5b56b1187434db8ea9779ec094ef28f0bac9b96eddac87fbfe7900bdbdc4080c
resources/synthetic-system-transactions.csvtransactionsf90988ebf9f43cab2068a040ec9e83484820fa383b5bfd9601a77b4fd35ddc4a
python synthetic-system-replay.py.txt synthetic-system-bars.csv --output replay.json