Lab · ML Experiments

ML — Pattern Discovery

Inverted workflow: find conditional edges in BTC data first, build strategies second.
61 experiments

MTF trend gate on DONCHIAN_20 — does a higher timeframe help as a bias?

Inconclusive
2026-06-24 mtfdonchianregimegateconditioner
Hypothesis
A causal daily/weekly trend gate (only trades in the direction of the higher TF) improves risk-adjusted DONCHIAN_20 performance if the filtered-out counter-trend trades are systematically worse — and that BROADLY across several trend definitions (EMA50/EMA200/MACD/weekly), not just one.
Verdict
**SIGNAL REAL, FORM OPEN** — the per-trade edge is broad (4/4 gates, median +21.4bps): counter-trend DONCHIAN trades ARE worse. But the hard gate hurts (EV thrown away) and the mean-neutral tilt lifts the Sharpe in only 1/12 configs (best ema200 k=0.3: ΔSharpe +0.09). No clear deployable uplift in-sample; before taking it seriously, cross-asset + DOF deflation. The multi-timeframe idea has a real core, but it is no free lunch.
n_trades
339
best_tilt
ema200 k=0.3
baseline_calmar
146.09
baseline_sharpe
+5.1500
median_edge_bps
+21.4000
baseline_maxdd_pct
+16.9000
best_tilt_d_sharpe
+0.0900
hard_gate_sharpe_improved
0/4
tilt_configs_sharpe_improved
1/12
gates_with_positive_per_trade_edge
4/4

MTF trend gate on DONCHIAN_20 — does a higher timeframe help as a bias?

2026-06-24 · status: inconclusive · 3.1s

Hypothesis: A causal daily/weekly trend gate (only trades in the direction of the higher TF) improves risk-adjusted DONCHIAN_20 performance if the filtered-out counter-trend trades are systematically worse — and that BROADLY across several trend definitions (EMA50/EMA200/MACD/weekly), not just one.

Verdict: SIGNAL REAL, FORM OPEN — the per-trade edge is broad (4/4 gates, median +21.4bps): counter-trend DONCHIAN trades ARE worse. But the hard gate hurts (EV thrown away) and the mean-neutral tilt lifts the Sharpe in only 1/12 configs (best ema200 k=0.3: ΔSharpe +0.09). No clear deployable uplift in-sample; before taking it seriously, cross-asset + DOF deflation. The multi-timeframe idea has a real core, but it is no free lunch.

Key metrics

metric value
baseline_sharpe +5.1500
baseline_calmar 146.09
baseline_maxdd_pct +16.9000
n_trades 339
gates_with_positive_per_trade_edge 4/4
median_edge_bps +21.4000
hard_gate_sharpe_improved 0/4
tilt_configs_sharpe_improved 1/12
best_tilt ema200 k=0.3
best_tilt_d_sharpe +0.0900

Setup

DONCHIAN_20 live config, re-sim from 2021-01-01. 339 trades (Long 160 / Short 179). Gate = only trades whose direction matches the causal (1d-lagged) daily trend. Baseline = all trades.

Baseline (all trades): ret 2463% · maxDD 16.9% · Sharpe 5.15 · Calmar 146.09 · n 339

1) Hard gate (ON/OFF) — causal, 1d-lagged

r_keep/r_cut = mean per-trade r (bps) of the kept vs filtered-out trades; edge_bps = difference (positive = the filtered-out counter-trend trades are worse).

gate kept cut r_keep_bps r_cut_bps edge_bps ret_pct maxdd_pct sharpe calmar d_sharpe d_calmar
ema50 242 97 118.3 103.6 14.7 1001 15.4 4.4 64.94 -0.75 -81.15
ema200 200 139 142.2 73.7 68.6 1011 13 4.81 77.75 -0.34 -68.34
macd 219 120 120.1 103.2 16.8 806 13.5 4.24 59.69 -0.91 -86.4
weekly 272 67 119.2 93.3 25.9 1423 16 4.77 89.07 -0.38 -57.02

2) Mean-neutral sizing tilt (keep EV, reweight toward trend quality)

Instead of killing trades: aligned trades size↑, counter size↓, mean_mult=1 (pure timing, no leverage). This is the right form when the counter trades are still positive.

gate k ret_pct maxdd_pct sharpe calmar d_sharpe d_calmar
ema50 0.3 2536 18.4 4.98 137.6 -0.16 -8.5
ema50 0.5 2549 19.3 4.8 132.2 -0.35 -13.9
ema50 0.8 2538 20.3 4.52 124.7 -0.63 -21.3
ema200 0.3 3219 15.2 5.24 212.4 0.09 66.3
ema200 0.5 3723 14.3 5.14 260.1 -0.01 114.1
ema200 0.8 4452 17.7 4.88 252.1 -0.27 106.1
macd 0.3 2570 17.8 4.97 144.5 -0.18 -1.6
macd 0.5 2596 18.3 4.75 141.8 -0.4 -4.3
macd 0.8 2590 19 4.4 136.2 -0.75 -9.9
weekly 0.3 2596 17.4 5.09 148.9 -0.06 2.9
weekly 0.5 2648 17.7 4.99 149.5 -0.16 3.4
weekly 0.8 2695 18.1 4.83 149.2 -0.32 3.1