The Edge That Wasn't
All 81 experiments › #20

#20 — StrengthSpread lookahead RCA

2026-04-17
Verdict: negative · ⛔ 55-min future leak — +203.15 → −14.18 p/d causal
An implausible +203 p/d PINN-CMA result triggered a root-cause analysis that found merge_asof leaking up to 55 minutes of future H1 data into the ss_h1 feature; the causal rerun erased the entire edge.

Hypothesis — what it tests

Whether the implausible +203 p/d ss_h1 PINN-CMA out-of-sample result was a genuine edge or an artifact — and where the leak was.

Description

The PINN-CMA campaign (6 experimental arms over the 5-input CMA-NN, adding a StrengthSpread H1 feature, learnable hyperparameters and PINN-style fitness penalties) returned +203 p/d OOS on EUR_JPY — roughly 1000× any prior clean result, which itself triggered the investigation. The bug: precompute_strength_spread.py merged H1 StrengthSpread onto M5 bars with merge_asof(direction='backward') without accounting for OANDA's H1 timestamp convention (a bar stamped T spans [T, T+1h], so its close isn't known until T+1h) — an M5 bar at 22:05 received an H1 value encoding up to 55 minutes of future price. This was the same bug class as the original 2026-04-12 compute_mc_on_series RCA. All 36 inputs-family runs were retroactively invalidated; the fix (+1h shift before merge) plus a 4-test regression tripwire (one test asserts the buggy path DOES leak, so reverting the fix breaks CI) went in the same day. The causal rerun was a clean negative: the headline config went from +203.15 to −14.18 p/d, and only one lucky non-reproducible seed passed gates. The statistical-gate discipline caught the bug pre-deploy — no capital was touched.

Key result

inputs EUR_JPY s777: +203.15 p/d contaminated → −14.18 p/d causal (217 p/d delta = the entire 'edge'); 36/54 runs invalidated; causal rerun: 0/36 reproducible passes (one lucky seed +3.65 not reproducible); leak ≤ 55 min of future H1 data per M5 bar

Indicators

StrengthSpread H1 (ss_h1, cross-pair currency-strength z-spread)d_close3V3 core (MC(D)/MC(dD), Kaufman Efficiency Ratio, UPnL)

Algorithms

PINN-CMA (CMA-ES with PINN-inspired adaptive activations, learnable hyperparameters, constraint-penalty fitness)root-cause analysismerge_asof causality auditregression tripwire unit testspermutation test / bootstrap Sharpe gates

Code

Interactive version (search, filters, figures): the experiment explorer.

← #19 Path D mean-reversion filter#21 CSI StrengthSpread campaign (stages 1–2) →
This page is one experiment from the audited record behind the book The Edge That Wasn'tget the book · about the project.