TradeViora AcademyLearn. Analyze. Practice. Trade Smarter.
Menu

FREE FINANCIAL EDUCATION

Data and version reproducibility

Record enough artifacts to explain and repeat a backtest result.

0%

What you will learn

Prerequisites: Understand immutable input snapshots, configuration values and deterministic program execution.

Mechanism and decision rules

A reproducible experiment needs more than a strategy name and a random seed. Retain exact input bytes or a permitted immutable snapshot, a data manifest, code version, configuration, dependency versions, random-generator details and the execution convention. A cryptographic digest helps detect whether bytes changed; it does not establish that the data are accurate, licensed for reuse or available at the simulated decision time.

Canonical configuration serialization makes meaningful comparisons easier: units, types, key ordering and defaults should be explicit. Record data cleaning and exclusions as transformations with their own versions. For stochastic work, seed, generator algorithm, call order and environment can all affect exact results. Distinguish bit-for-bit reproduction from a tolerance-based numerical comparison, and state which is expected before reviewing a rerun. Both can reproduce a systematic bug just as faithfully as a correct calculation.

Worked example · synthetic data

A hypothetical run buys ten units at 100 and sells at 101, with a fee of 1 on each side. Gross P&L is 10 and net P&L 8. An exact repeat should reproduce 8 under the same deterministic model. Keeping prices fixed but changing the fee configuration to 2 per side gives net 6; the data digest can remain unchanged while the configuration digest changes. Alternatively, correcting the final price from 101 to 103 while retaining fee 1 produces net 28 and requires a new data version. Labeling all three as the same run would conceal the reason for their disagreement.

Failure modes and limits

A source URL can return revised content, and a package version can depend on a different numerical library build. Parallel random draws may also change call ordering. Avoid saving credentials or unnecessary personal data in experiment manifests. When redistribution is restricted, retain permitted identifiers and access instructions rather than copying unauthorized data. A successful rerun establishes repeatability under recorded conditions, not a valid trading edge or a complete operational implementation.

Practice case

A separate run buys 20 units at 50 and sells at 52 with fee 0.5 per side. Compute net P&L. Then change only the fee to 1 per side. Finally change the final price to 51.5 while retaining fee 1. Identify which artifact class must change for each revision.

Reveal the worked answer

Original gross P&L is 40 and net is 39. The fee-only revision gives net 38 and changes the configuration artifact, while the price snapshot may remain identical. The revised final price gives gross 30 and net 28, requiring a new data artifact as well. The code can be unchanged across all three; manifests should make those distinct causes reviewable.

Check your understanding

What does an equal data digest principally establish?


Explanation

A digest is an integrity aid, not economic or factual validation.

Why is a seed alone insufficient for exact stochastic reproduction?


Explanation

The random stream depends on more than a single numeric seed.

Which worked revision changes net P&L from 8 to 6?


Explanation

Gross profit remains 10 while total modeled fees increase from 2 to 4.

Sources and next steps

The lesson, calculations and synthetic cases are original educational material. References explain underlying contract or chart conventions; none validates the profitability of a trading rule. Actual contract specifications, settlement obligations and charges must be checked before trading.

Explore OHLCV data in the chart lab · Explore volume-at-price and TPO data · Practice library