XAU: two validated per-TF gates — M15 mixed-regime block, M5 hour-9 block
M15 mixed-"trending" regime block (ADX strong, EMAs unaligned = momentum without direction): -6.8R/24 trades on 12mo, negative both halves; blocking scores +65.7R/499 PF 1.38 DD 10.4R vs +59.0R/521 PF 1.32 DD 12.6R, better both halves, OOS 2024-06->2025-03 neutral (-1.4R = the 4 such trades there). M5 never trades this regime. New XauStrategyConfig.blocked_regimes / sell_blocked_regimes knobs (default empty) + aggregator gate 6g2; M15 factory opts in. M5 hour-9 UTC block (post-London-open whipsaw): -28.9R/143 over the 6-year book, negative 5/7 calendar years. Full-history replay with block: +207.1R vs +178.3R, max DD 28.7R vs 35.5R, 2023 -13.0R -> breakeven; tuned 12mo book unchanged (139.0 vs 139.3). Hour 9 is positive on M15 (+1.7R 6yr, +8.6R OOS) so the block is factory M5-only. Rejected after validation (documented in xauusd.py + session memory): transitioning-SELL block (bull-market artifact, +5.7R in 2024 OOS), M15 trending_down block (M5 cross-TF contradiction), losing-streak circuit breakers, 30d efficiency-ratio trend gate, and all entry-level indicator filters (winners == losers at entry on every feature). Full-history context (Twelve Data 5min starts 2020-03-16): M5 6.3yr +207R PF ~1.3 post-fix with losing year 2021; M15 +152.6R PF 1.19 DD 49.7R — edge is regime-dependent, chop years are structural. Tests: 178 passed (new gate test + factory-equivalence updates). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -779,6 +779,25 @@ class SignalAggregator:
|
||||
report.signal_quality = "D"
|
||||
report.trade_setup = None
|
||||
|
||||
# ── 6g2. XAU regime gates (opt-in via per-TF factory overrides) ──
|
||||
if (self.config.xau_strategy.enabled
|
||||
and report.display_name == "XAU/USD"
|
||||
and report.signal_quality in ("A+", "A", "B", "C")):
|
||||
if report.market_regime in self.config.xau_strategy.blocked_regimes:
|
||||
report.warnings.append(
|
||||
f"REGIME FILTER: '{report.market_regime}' blocked for XAU"
|
||||
)
|
||||
report.signal_quality = "D"
|
||||
report.trade_setup = None
|
||||
elif (xau_is_sell_dir
|
||||
and report.market_regime
|
||||
in self.config.xau_strategy.sell_blocked_regimes):
|
||||
report.warnings.append(
|
||||
f"SELL FILTER: regime '{report.market_regime}' blocked for shorts"
|
||||
)
|
||||
report.signal_quality = "D"
|
||||
report.trade_setup = None
|
||||
|
||||
# ── 6h. EUR/USD regime + quality + risk gate ──────────────
|
||||
if report.display_name == "EUR/USD" and self.config.eur_strategy.enabled:
|
||||
eur = self.config.eur_strategy
|
||||
|
||||
Reference in New Issue
Block a user