A research result becomes useful when another person can inspect how it was produced. A screenshot of a score is not enough. They need the question, evidence, rules, command and limitations. This companion guide supports our existing research series; it does not replace the next numbered edition.
Start with one question
Choose a narrow question, such as whether two admission rules accept different observations from the same evidence set. Decide which comparison will answer it before running either rule. Keep a simple baseline. If you change both admission and scoring at once, a different output cannot tell you which change mattered.
Write an acceptance condition for the experiment itself: another reviewer can run the same command against the same inputs and explain any remaining difference. That condition is separate from whether the candidate is better than the baseline.
Freeze inputs and their availability
Save a bounded input file and a checksum. Include source observation time, retrieval time and the time the observation became available to your decision. An observation about an earlier event may have arrived later. A replay must not give the agent information it could not have had at the decision timestamp.
For a hypothetical example, a quote observed at 10:00:00 but first available at 10:00:05 cannot support a decision made at 10:00:02. The comparison should exclude it with an explicit reason. Do not repair the replay using a later quote unless the experiment is specifically studying that repair.
Keep the comparison controlled
Save the repository commit and the baseline and candidate configuration. Run both against the frozen input. Keep fees, missing-data behavior and evaluation windows fixed. Record admitted and rejected records, including reasons. Do not retain only the candidate's successful cases.
For learned models, fit preprocessing only on the training portion. The scikit-learn documentation explains how information leaking from evaluation data into preparation can distort results: common pitfalls. Decision-time availability requires a separate check even when train and test rows are different.
Package the replay
Include a README, dependency versions, one run command and expected output. Use a small synthetic example when real inputs cannot be shared, and label it synthetic. Keep customer data, credentials and account details out of the package.
A practical README answers five questions: what is being tested, which inputs are used, how to run it, what output to expect and what the experiment cannot establish. Ask a reviewer to follow it from a fresh environment. An undocumented local file is a reproducibility failure worth fixing.
Report uncertainty
State sample size, exclusions, assumptions and differences from live execution. A reproducible comparison does not establish future profitability. External actions can produce partial fills, uncertain responses and later reconciliation work that a local example does not reproduce.
Download the research reproducibility checklist. Continue with Edition 10's frozen-evidence comparison and subscribe to the research journal.
Tested addendum, October 10, 2026: a complete replay package
The checklist above becomes more useful when a reviewer can actually run it. This addendum builds a small package, records the input checksum and replays two selection rules under one fixed decision cutoff. The research question is: can a fresh reviewer reproduce which rows were available and which candidate each rule selected?
All rows are synthetic. The two rules are arbitrary teaching choices, not trained models or trading recommendations. There are no outcome labels, broker connections, credentials, funded results or profitability calculations. You need Python 3.12 or later, a terminal and an unused directory.
1. Decide what the package promises
The package contains the replay program, a CSV input, a JSON manifest, a README and complete expected stdout. The manifest names the schema, decision instant, input fingerprint and both rule versions. It has no source-provider contract, dependency lockfile or deployable executor.
There are two clocks per observation. quoted_at records when the fictional value existed. available_at records when it could be read by the decision process. Row B has a recent source timestamp but arrives five seconds after the decision. A retrospective file containing B does not make B eligible at noon.
Baseline chooses the lowest value among eligible rows. Challenger chooses the highest. Both use identifier as the deterministic tie breaker. Their different choices are observable; which is better is unmeasured. This package intentionally refuses to convert a reproducible ranking difference into a result about returns.
2. Create the program and its artifacts
Make an empty folder named replay-package and save the following as replay.py inside it. The default run builds files only when none of the four output names already exists. It will not silently replace a reviewer's evidence. A later run with --replay reads existing files without regenerating them.
import csv
import hashlib
import json
import sys
from datetime import datetime
from pathlib import Path
ROOT = Path(__file__).resolve().parent
SOURCE = (
"id,quoted_at,available_at,value\n"
"A,2026-10-01T11:59:50+00:00,2026-10-01T11:59:51+00:00,100\n"
"B,2026-10-01T11:59:55+00:00,2026-10-01T12:00:05+00:00,101\n"
"C,2026-10-01T11:59:57+00:00,2026-10-01T11:59:59+00:00,102\n"
).encode("ascii")
def expected(digest):
return (
f"input_sha256={digest}\n"
"schema=synthetic-quotes-v1 rows=3 eligible=2 excluded=1\n"
"eligible=A,C excluded=B:UNAVAILABLE_AT_DECISION\n"
"baseline=lowest-value-v1 selected=A\n"
"challenger=highest-value-v1 selected=C\n"
"outcomes=unmeasured data=synthetic orders=0\n"
)
def build():
names = ("quotes.csv", "manifest.json", "expected.txt", "README.txt")
if any((ROOT / name).exists() for name in names):
raise FileExistsError("Use an empty directory or run --replay")
digest = hashlib.sha256(SOURCE).hexdigest()
manifest = {
"schema": "synthetic-quotes-v1", "mode": "synthetic",
"decision": "2026-10-01T12:00:00+00:00",
"input_sha256": digest,
"baseline": "lowest-value-v1", "challenger": "highest-value-v1",
}
(ROOT / "quotes.csv").write_bytes(SOURCE)
(ROOT / "manifest.json").write_bytes(
(json.dumps(manifest, sort_keys=True, indent=2) + "\n").encode("ascii"))
(ROOT / "expected.txt").write_bytes(expected(digest).encode("ascii"))
(ROOT / "README.txt").write_bytes(
b"Synthetic point-in-time selection replay; no outcomes measured.\n"
b"Requires Python 3.12+ standard library; no packages or credentials.\n"
b"Run: python3 -I replay.py --replay\n"
b"Compare complete stdout with expected.txt.\n"
b"Preserve this program and all four artifacts together.\n")
def replay():
raw = (ROOT / "quotes.csv").read_bytes()
digest = hashlib.sha256(raw).hexdigest()
manifest = json.loads((ROOT / "manifest.json").read_text(encoding="ascii"))
if digest != manifest["input_sha256"]:
raise ValueError("Input checksum mismatch")
assert manifest["schema"] == "synthetic-quotes-v1"
assert manifest["mode"] == "synthetic"
assert manifest["baseline"] == "lowest-value-v1"
assert manifest["challenger"] == "highest-value-v1"
decision = datetime.fromisoformat(manifest["decision"])
assert decision.utcoffset() is not None
with (ROOT / "quotes.csv").open(newline="", encoding="ascii") as handle:
reader = csv.DictReader(handle)
assert reader.fieldnames == ["id", "quoted_at", "available_at", "value"]
rows = list(reader)
assert len(rows) == 3 and len({row["id"] for row in rows}) == 3
eligible, excluded = [], []
for row in rows:
quoted = datetime.fromisoformat(row["quoted_at"])
available = datetime.fromisoformat(row["available_at"])
assert quoted.utcoffset() is not None and available.utcoffset() is not None
assert quoted <= available and quoted <= decision
row["value"] = int(row["value"])
assert row["value"] > 0
(eligible if available <= decision else excluded).append(row)
assert [row["id"] for row in eligible] == ["A", "C"]
assert [row["id"] for row in excluded] == ["B"]
baseline = min(eligible, key=lambda row: (row["value"], row["id"]))["id"]
challenger = min(eligible, key=lambda row: (-row["value"], row["id"]))["id"]
output = (f"input_sha256={digest}\n"
f"schema={manifest['schema']} rows={len(rows)} "
f"eligible={len(eligible)} excluded={len(excluded)}\n"
"eligible=" + ",".join(row["id"] for row in eligible) +
" excluded=" + ",".join(row["id"] + ":UNAVAILABLE_AT_DECISION"
for row in excluded) + "\n" +
f"baseline={manifest['baseline']} selected={baseline}\n"
f"challenger={manifest['challenger']} selected={challenger}\n"
"outcomes=unmeasured data=synthetic orders=0\n")
assert output == (ROOT / "expected.txt").read_text(encoding="ascii")
print(output, end="")
if len(sys.argv) == 1:
build()
elif sys.argv[1:] != ["--replay"]:
raise ValueError("Use no arguments to build, or --replay to inspect")
replay()
Run python3 -I replay.py, then run python3 -I replay.py --replay. Both must produce the same complete stdout:
input_sha256=93dcd53b2da558c562482ce28c14f73bab4c93cdf408934983214dcfa6a2b257
schema=synthetic-quotes-v1 rows=3 eligible=2 excluded=1
eligible=A,C excluded=B:UNAVAILABLE_AT_DECISION
baseline=lowest-value-v1 selected=A
challenger=highest-value-v1 selected=C
outcomes=unmeasured data=synthetic orders=0
3. Inspect the manifest instead of trusting its presence
Open manifest.json and compare its fields with the program. The input checksum covers the exact CSV bytes, including line endings. Reading the same economic-looking rows after an editor changes line endings can therefore produce a different digest. Preserve the packaged file during review.
The manifest is part of the evidence, not an authority. Someone who alters both the input and its recorded checksum can conceal a change from this local check. A published package needs a trusted version identity, such as a reviewed repository commit, and a reviewer must compare the package with that source. This exercise is not an authenticity or tamper-proofing system.
4. Verify the clean replay and one deliberate failure
Copy all five files to another empty directory. Run only --replay there. It must use those existing artifacts and produce the same output. Python isolated mode ignores user-level Python configuration; it is not an operating-system sandbox. The program intentionally reads its own package and does not import your trading project.
In a separate copy, change one CSV value without changing the manifest. Predict the checksum error, then run --replay. The mismatch should stop evaluation before ranking. Restore the original file afterward. Do not update a checksum merely to suppress an unexplained failure. A deliberate new dataset belongs in a new versioned package.
Troubleshooting, limits and next experiment
An existing-file error means the initial build would overwrite evidence. Use --replay or a genuinely empty folder. A checksum mismatch means bytes changed; compare the files before changing expectations. Run without -O, which removes assertions. Unavailable timestamps must keep an explicit offset, and row B must never enter either ranking at the fixed cutoff.
Completion means a reviewer can reproduce both runs, name the excluded row and demonstrate the deliberate checksum failure. The result proves this fixture's declared selection procedure, not source truth, market coverage, model improvement or live executability. The next experiment should add an explicit missing-field row and a versioned rejection ledger while leaving both ranking rules fixed.
The editorial verification ran the program with an empty inherited environment and isolated Python, copied the five-file package and replayed it independently. Complete stdout matched; the altered-input copy failed with the expected checksum error. Python's official hashlib documentation and CSV documentation, inspected October 10, 2026, describe the fingerprint and reader mechanics. Neither validates the synthetic selection rules.