Big-candle gate (default-OFF) + M5 relaxation campaign + --set tooling
Gate 6h (big-candle entry gate): blocks all XAU entries (core, XAU_PB, XAU_CP) when the primary TF's last 24h contains a bar with range >= K x prior-bar ATR. Ships default-OFF: validation rejected every threshold (K 3-6 on M5/M15 12mo) — removed trades were net-POSITIVE at every cell; M5 quiet-window trades are the only losing bucket. Config knobs big_candle_atr_multiple/lookback_hours, --big-candle backtest flag, Module 17 tests. M5 relaxation SHIPPED (validated 2026-07-30, Oanda bars, $0.30 spread): m5_min_abs_score 30->25, m5_min_confirmation_score 10->5, hour-21 UTC unblocked M5-only. Beats control in ALL 6 calendar years of the 5yr replay (+230.9R/2319 PF 1.26 DD 21.3 vs +168.0R/2048 PF 1.21 DD 27.0), 12mo +107.4R PF 1.36 vs +84.6R PF 1.33, OOS +26.1R vs +17.2R, $0.70 spread +86.9R vs +66.4R. M15: every relaxation retested negative — config unchanged. Declined-but-open: M5 hour-22 block, M15 hour-16 unblock (both fail 5yr/OOS). Evidence in the factory docstring. Tooling: generic --set PATH=JSON research override in gpu_backtest (typo-proof, logged); diagnose_filters filter_tags refreshed for gates 6d-6i with a staleness-guard test (Module 18); research scripts hour_analysis/burst_profile/book_diff. Suite: 268 tests. Claude-Session: https://claude.ai/code/session_014jqHpmNYmwYMowF6bPZyeD
This commit is contained in:
@@ -203,9 +203,16 @@ class XauStrategyConfig:
|
||||
# M5 signals are noisy; require stronger confirmation before
|
||||
# generating trade setups. Without these, M5 is breakeven
|
||||
# (+0.01R/trade) with 21% drawdown.
|
||||
# Relaxed 2026-07-30 (30→25, 10→5) in the relaxation campaign:
|
||||
# the combined config (with the M5 hour-21 unblock) beat control
|
||||
# in ALL 6 calendar years of the 5yr Oanda replay (+230.9R vs
|
||||
# +168.0R, PF 1.26 vs 1.21, max DD 21.3 vs 27.0), 12mo +107.4R
|
||||
# vs +84.6R PF 1.36 both halves positive, OOS 2024-06→2025-03
|
||||
# +26.1R vs +17.2R, and at $0.70 spread +86.9R vs +66.4R.
|
||||
# Score floors below 25 are vacuous (grade C requires |score|≥25).
|
||||
m5_require_mtf: bool = True
|
||||
m5_min_abs_score: float = 30.0
|
||||
m5_min_confirmation_score: float = 10.0
|
||||
m5_min_abs_score: float = 25.0
|
||||
m5_min_confirmation_score: float = 5.0
|
||||
# A-grade M5 SELLs enter at the extreme of temporary dips and
|
||||
# lose (-0.017R/trade on 163 trades) — maximum conviction at
|
||||
# the worst entry. Cap SELL quality so A-grade can't trigger
|
||||
@@ -271,6 +278,15 @@ class XauStrategyConfig:
|
||||
cp_flag_max_bars: int = 12
|
||||
cp_flag_retrace: tuple = (0.1, 0.5) # flag depth as fraction of pole
|
||||
|
||||
# ── Big-candle entry gate ──────────────────────────────────────
|
||||
# When the recent window on the scan's own primary TF contains an
|
||||
# abnormally large candle (bar range >= K x the PRIOR bar's ATR —
|
||||
# institutional burst; price may reverse violently), no XAU entry
|
||||
# of ANY kind may fire (core, XAU_PB, XAU_CP). 0.0 = disabled.
|
||||
# Per-TF factories opt in only after the standard validation rule.
|
||||
big_candle_atr_multiple: float = 0.0
|
||||
big_candle_lookback_hours: float = 24.0
|
||||
|
||||
|
||||
@dataclass
|
||||
class FilterConfig:
|
||||
|
||||
Reference in New Issue
Block a user