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

#52 — Markov D1 regime filter

2026-05-25 (Session 074); baked into fx-retrace-live the same day
Verdict: positive · ✅ validated — counter-trend ICs, filter improves retrace
An empirical daily (D1) Markov regime transition matrix, used as an entry filter, improves the post-shock retrace from +61.9 to +70.4 p/d and walk-forward from 7/12 to 9/12 — and every IC it produced is counter-trend.

Hypothesis — what it tests

Whether a causal daily Markov regime-transition signal carries next-day directional information, and whether gating counter-trend retrace entries by regime alignment improves the edge.

Description

Inspired by a 'How Quants Actually Trade' transcript, this built an empirical 3-state (Bull/Bear/Sideways) daily Markov transition matrix per pair and used the signal P(Bull|state) − P(Bear|state) to gate the post-shock retrace strategy. The Phase-1 IC study found that ALL information coefficients are negative — a Bull regime predicts a negative next-day return — reinforcing the project's recurring counter-trend finding (consistent with the CSI factor study). Phase 3 applied the filter to retrace entries (an upshock SHORT requires Bull regime, a downshock LONG requires Bear), causally using the day D−1 signal, and the best config (mw=10, mt=0.002, sig_thr=0.20) lifted the portfolio from +61.9 to +70.4 p/d and walk-forward from 7/12 to 9/12 at mc_p=0.0000 while trading only 73% as often. It was baked directly into the live retrace service on account 009, with a paper no-filter variant (retrace_nofilter) run as a live A/B; over an early 3.5-day window the filtered live leg roughly broke even while the unfiltered paper leg lost, directionally consistent with the backtested uplift.

Key result

All ICs negative (counter-trend); best AUD_JPY mw=10 thr=0.002 t=−3.6; best filter mw=10 mt=0.002 sig_thr=0.20: +70.4 p/d vs +61.9 baseline (Δ+8.5), WF 9/12 vs 7/12, mc_p=0.0000, trades 73% of baseline

Indicators

Markov D1 regime transition matrix (Bull/Bear/Sideways)regime signal P(Bull|state) − P(Bear|state)S5 velocity z-score (retrace base strategy)

Algorithms

Markov chain transition-matrix estimationinformation-coefficient (IC) studygrid search sweepwalk-forward validationMonte Carlo sign-shuffle

Code

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

← #51 Post-shock counter-trend retrace live#53 H4 Donchian + FIFO stopped (live check) →
This page is one experiment from the audited record behind the book The Edge That Wasn'tget the book · about the project.