Add indicator ablation framework + apply ablation-driven cleanup

Framework:
- TechnicalConfig.disabled_indicators skips named indicators in engine.analyze
- Optimizer supports disable_indicator override for parallel ablation sweeps
- main.py --ablate runs leave-one-out across all 10 directional indicators

Cleanup applied (validated across 2024 trend / 2023 chop / 2026 recent):
- Drop pivot by default (cumulative +9.5% to disable)
- Drop candlestick by default (+3.4% cumulative)
- Regime-gate ichimoku: 1.3x in trending, 0.2x in ranging (was a chop villain)
- Trim RSI weight 1.0 -> 0.3 (cumulative noise across regimes)

Result: +10.60% on 2024 trend (+33.24% -> +43.84%, Sharpe 2.17 -> 2.77),
+15.71% on 2023 chop (-18.27% -> -2.56%). Recent regime still adverse.
This commit is contained in:
Harwinder
2026-05-07 17:33:07 -04:00
parent 045f4248f3
commit ce76684a62
4 changed files with 114 additions and 17 deletions
+18
View File
@@ -85,6 +85,24 @@ class TechnicalConfig:
pivot_lookback: int = 1
divergence_lookback: int = 14
# Ablation control — names listed here are skipped during analyze().
# Use lowercase keys: ema_trend, rsi, macd, bollinger, stochastic,
# adx, ichimoku, divergence, candlestick, pivot, atr, volume.
#
# Defaults disable indicators that empirically hurt P&L on USD/JPY across
# 2024-trend / 2023-chop / 2026-recent ablation sweeps (see project memory):
# - pivot: net +9.5% to disable across 3 windows
# - candlestick: net +3.4% to disable
disabled_indicators: List[str] = field(
default_factory=lambda: ["pivot", "candlestick"]
)
ALL_INDICATORS: List[str] = [
"ema_trend", "rsi", "macd", "bollinger", "stochastic",
"adx", "ichimoku", "divergence", "candlestick", "pivot",
]
@dataclass
class SignalConfig: