A Leak-Resistant Point-in-Time Backtesting Protocol and Engine for Retail Equity Strategies
Most published backtest failures are not statistical subtleties but plumbing errors: a filing used on the day it was period-ended rather than published, a universe that silently drops delisted stocks, a cost model that ignores minimum fees, or a "held-out" period that was looked at ten times. This paper documents a small, deterministic backtest engine (written in Go) and the research protocol around it, built for a retail investor with a EUR 300,000 account. The protocol makes five rules mechanical rather than aspirational: (i) a hard data cutoff enforced at load time; (ii) availability equals publication date, so that a fact published on day d can be traded at the earliest at the open of d+1, enforced in one central function; (iii) a fixed in-sample/validation split followed by a source-code hash ("freeze") and exactly one out-of-sample run per strategy; (iv) an append-only trial log from which the Deflated Sharpe Ratio can be computed; (v) a retail cost and liquidity model with per-order fees and minimums, estimated spreads, square-root market impact, and survivorship-complete universes. We describe the architecture, the exact checks, a separate event-driven backtester for small-cap announcements, and a lesson table of the bugs that were found, including one that silently turned measured validation costs into whole-run averages. In a case study of three frozen strategies, the logged validation Sharpe ratios (0.64–0.77) are not significant after correcting for 98–368 logged trials (DSR below 0.05), and the single out-of-sample run (165 trading days) is too short to discriminate between them. The point of the paper is the protocol and its failure catalogue, not a performance claim. Appendices contain the rebuild-level specification: the daily loop, the cost formula with a worked example, file schemas, metric formulas, strategy specifications, the event-backtester specification and a look-ahead catalogue.Read next: The engine was used for exactly one pre-registered out-of-sample test. How the research agent was supervised is covered in running an autonomous AI agent on trading research. The data feeding the engine is catalogued in free point-in-time public data for small caps.This preprint is part of an eight-paper series on retail equity research from public data by Christopher Helm, covering German and Nordic small caps, backtesting methodology, data sources and AI-assisted research. All papers in the series:How Wise Is the Crowd? Timing and Selection Skill of Retail Social-Trading PortfoliosThree Pre-Registered Bets: A One-Shot Out-of-Sample Test of Retail Strategy CandidatesWhat Did Not Work: Negative Results on Event-Driven Signals in German and Nordic Small CapsFree, Point-in-Time Public Data for German and Nordic Small-Cap Research: Sources, Coverage and PitfallsRequirements for an Autonomous Retail Order Engine Running Unattended for a DecadeRunning an Autonomous AI Agent on Quantitative Trading Research: Protocol, Supervision and Failure ModesFrom Pre-Announcement to Verified Facts: Design of a Primary-Source Report-Analysis Funnel for Small-Cap EquitiesChristopher Helm is an entrepreneur, consultant, and researcher. More research and articles on his blog.
Authors
- Christopher Helm
Publication Details
- Journal
- Figshare
- Published
- 2026-10-26
- DOI
- https://doi.org/10.6084/m9.figshare.34781526
- Citations
- 5
- Primary Topic
- Financial Markets and Investment Strategies
- Type
- preprint