Rasmus Suonio

A research operating system that catches the mistakes behind good-looking backtests

An experiment registry, data-provenance layer and statistical validation framework for quant research, shown on a synthetic market where the right answers are known.

Demo verdicts vs planted truth
1 robust, 0 false discoveries
Planted mistakes caught
6 of 6
Browser re-run of a recorded experiment
SHA-256 identical
Tests
104 Python, 4 Rust
  • Python
  • SQLite
  • JavaScript
  • Rust
Cumulative returns of 46 trend-following trials on a synthetic futures contract with no edge, in gray, and the one robust experiment, a profitability strategy confirmed on a sealed 2020-2024 holdout, in blue.

Most backtests that look good are wrong for boring reasons: the researcher tried forty variants and reported the best, joined data on a date before it was published, tested on today’s surviving stocks, kept peeking at the holdout, or rewrote the hypothesis after seeing the result. None of that is visible in a Sharpe ratio. I built a research operating system that records every experiment with its hypothesis, data versions, code, parameters and seed, and then checks the record for exactly these failures.

The demo below is a real registry, exported to the browser. It replays two months of research on a synthetic market in which I planted the effects, so every verdict can be checked against the truth. A profitability effect is real, momentum is real but fades, short-term reversal is real only before trading costs, and futures trend rules have no edge at all. The research script also makes the classic mistakes on purpose. Everything is synthetic and the dates are simulated.

What the demo shows #

Lesson Evidence in the registry Verdict
A real effect survives every check The pre-registered profitability strategy, deflated for its five trials and confirmed on the sealed 2020-2024 holdout (Sharpe 0.83, p = 0.03 on the first look) Robust
In-sample significance is not robustness Momentum: deflated Sharpe ratios near 1 in-sample, but the planted effect fades, and the nine variants’ out-of-sample Sharpe ratios range from -0.61 to 0.65 Fragile
The best of many tries looks good by luck 45 moving-average rules on a contract with nothing to time: the best has a Sharpe of 0.38 but a deflated Sharpe ratio of 0.63, and the probability of backtest overfitting is 0.70 No edge
Look-ahead is caught from the rows used Fundamentals joined on the quarter end instead of the publication date: an in-sample Sharpe of 2.7, and an audit trail of every row used early Invalid
A hypothesis rewritten after the results proves nothing “Continuation” failed, was restated as “reversal” with the prediction flipped, and re-tested on the same data Invalid
A holdout is spent by looking Three looks were allowed; looks four to eight, by a researcher checking the best trend rules, are flagged Invalid
Survivors, unadjusted prices and unseeded randomness A survivor-only universe, returns computed from raw prices with splits, and a random tie-break that never reproduces Invalid

The registry grades 75 experiments: 1 robust, 12 fragile, 52 with no edge and 10 invalid. No experiment without a planted effect was graded robust. Real effects can still be graded fragile or no-edge when the evidence is too weak: reversal, for example, is real before costs but not after them.

How it works #

  • Experiment registry. A SQLite database records each experiment’s hypothesis and the version it tested, its family of related trials, parameters, seed, code hash, environment, dataset versions, windows, metrics and artifacts. Finished experiments cannot be edited (database triggers refuse it), and every change appends to a hash-chained audit log. The demo’s Audit log tab re-verifies all 793 events in the browser and shows what one edited event does to the chain.
  • Data provenance. Datasets are stored as content-addressed versions, with the transforms that derived them, the time each version was known, and point-in-time joins that audit the rows a strategy actually used. Corporate-action adjustment and a split detector catch unadjusted prices.
  • Validation. Every strategy gets the same treatment: out-of-sample tests adjusted for every trial evaluated on the same window, the deflated Sharpe ratio, the probability of backtest overfitting, stationary-bootstrap intervals, purged cross-validation, walk-forward selection, parameter-plateau and cost sensitivity, and regime analysis. A transparent scorecard turns these into a verdict anyone can recompute.
  • Hygiene rules. 26 rules flag practices that inflate results, from excessive tuning to a holdout opened without declaring it.
  • Reproducibility. Managed experiments re-run from the record and compare result hashes. In the Reproduce tab, your browser re-runs a recorded experiment with a JavaScript port of the generator and strategy and gets the same SHA-256 as the Python run.

Connecting my other projects #

Other repositories report runs through a language-agnostic manifest (JSON plus a returns file), a one-file Python writer or a dependency-free Rust crate, so no code bases are merged. I pointed the adapters at three of my projects without changing their code: 672 simulator runs from the Rust market simulator, 192 reinforcement-learning runs and 53 statistical-arbitrage books. qros re-ran one recorded simulator run from its stored command, and the run reproduced its event digest exactly.

Limits #

  • The demo market is synthetic and its effect sizes were chosen to be detectable; real markets are less kind.
  • The thresholds (deflated Sharpe ratio of 0.95, PBO of 0.25, a 5% test after correction) are conventions, recorded with every report, not laws.
  • The audit log is tamper-evident, not tamper-proof: anyone with write access to the file could rewrite the whole chain, which would change its published head hash.
  • The deflated Sharpe ratio assumes a family’s trials come from one idea; mixing unrelated strategies in a family distorts it.

How it’s built #

A Python package (NumPy, pandas, SQLite) of about 6,800 lines, with a command-line interface and Python API, 104 tests checked against independent references (statsmodels for the multiple-testing corrections and Newey-West statistics, the published deflated-Sharpe example, standard SHA-256 vectors), and continuous integration on Linux and Windows that also runs the browser code under Node and the Rust crate’s tests. The dashboard is plain JavaScript and SVG with no libraries; its colours are checked for colour-blind separation in light and dark mode.