M5 at real cost: disable XAU_PB, squash partial EMA alignment
Both validated at the measured $0.65 spread on Oanda bars (12mo halves + PF, OOS 2024-06->2025-03, 5yr; full evidence in pair_signals/xauusd.py M5 overrides 4-5): - m5_pullback_enabled False on M5: loss forensics identified XAU_PB as the largest wrong-direction loss source; 12mo PF 1.26 (failing the acceptance bar) -> 1.44, max DD 23.9R -> 13.9R. PB code stays for future regime-gated experiments. - New TechnicalConfig.ema_partial_neutral (default False), True on M5 only: partial 4-EMA ribbon alignment (2-3 of 4 checks) scores NEUTRAL instead of a weak BUY/SELL (-0.008R/84 vs +0.230R/341 fully aligned). Squash mirrored in the backtester's precomputed EMA scorer in this same commit (live==backtest parity). 12mo +97.6R/556 PF 1.48 DD 10.7R halves +47.8/+49.8; 5yr +127.4R PF 1.38; OOS one-trade tie. - Rejected and logged (memory + docstring): hour-19 block (OOS fail), hours-14/15, trail dist 0.75, confirm-TF swaps incl M15+H4 (OOS ordering), divergence/candlestick weight changes, bollinger removal. - Tests 296 -> 302: partial-alignment fixture test, factory-equivalence mirrors, per-TF isolation test, BC-gate fixture force-enables PB. Claude-Session: https://claude.ai/code/session_01H1eKWZsAVapJ1C4winYLqX
This commit is contained in:
@@ -245,6 +245,12 @@ class TechnicalEngine:
|
||||
signal = SignalStrength.NEUTRAL
|
||||
conf = 40
|
||||
|
||||
# Partial alignment (plain BUY/SELL, 2-3 of 4 checks) carries no
|
||||
# edge on M5 — squash to NEUTRAL when the research knob is on.
|
||||
if c.ema_partial_neutral and signal in (SignalStrength.BUY, SignalStrength.SELL):
|
||||
signal = SignalStrength.NEUTRAL
|
||||
conf = 40
|
||||
|
||||
crossover_desc = ""
|
||||
if len(ema_fast) >= 3:
|
||||
prev_f, prev_m = ema_fast.iloc[-2], ema_medium.iloc[-2]
|
||||
|
||||
Reference in New Issue
Block a user