Skip to content
Bilal Khan
  1. 01About
  2. 02Work
  3. 03Experience
  4. 04Photography
  5. 05Contact
All work
01 · Personal · Quant · 2026Active

falsify

An event-study harness that enforces pre-registration, so I cannot retroactively clean my own research record.

FORWARD OUTCOMES · ATR UNITSt₀ · FROZENEVENTT₀ BARREGIME+1+5+20#104109:00TREND+1.18−0.83−0.56#104810:17RANGE+0.29+0.08+0.08#105511:34RANGE+0.82−0.91−0.40#106212:51TREND−0.84−0.10+0.16#106913:08SHOCK+0.00+0.57−0.03APPEND-ONLY · PRE-REGSCHEMATIC

At a glance

Why
Cheap backtests make it easy to find green equity curves in pure noise. falsify makes every attempt count.
My role
Designed the method and built the harness, trial log, and standalone viewer.
Result
Every filter that looked strong in exploration has so far flipped sign in confirmation — the discipline is the product.
Stack
  • Python
  • polars
  • NumPy
  • SciPy
  • DuckDB-WASM
  • Lightweight Charts

Most backtesting tools make it cheap to try many configurations. That is the problem, not the feature — greedy selection over enough variants produces all-green equity curves on pure noise, reliably, and the resulting Sharpe looks fine right up until it meets out-of-sample data.

falsify inverts the incentive. Running a strategy is easy. Running one without recording the attempt is impossible.

How it works

It measures forward outcomes from signal events rather than simulating execution, which keeps fill and latency assumptions out of the result entirely. One artifact sits at the centre: the event table, one row per signal event, with every conditioning feature frozen at the signal bar and every outcome measured forward from it — unstopped, untargeted, in ATR units.

Because measurement is separated from trade construction, exit geometry cannot confound a question about drift. Stops and targets are applied later, on top of the table, as a separate and clearly labelled step. A negative result then means no drift, rather than the ambiguous no drift, or the wrong stop.

Trial logs are append-only and pre-registrations are frozen before the data is looked at. In this project specifically, every filter that looked strong in exploration has so far flipped sign in confirmation — which is the entire reason the discipline is the product.

The method around it

falsify is the harness for a wider approach: propose a plausible market mechanism, measure it against a random-walk null, and only implement what survives. Structural measurements constrain what is even worth attempting — variance ratios place XAUUSD and NQ in mean reversion at intraday horizons, and XAUUSD's round-trip cost is roughly twenty-one times EURUSD's, which rules out whole strategy families before a line is written.

Viewer

It ships with a standalone viewer built on DuckDB-WASM and TradingView Lightweight Charts, so a signal set can be inspected without spinning up a notebook.