_meta:
  id: 28
  name: "ORB Gainers V23 Broad"
  status: frozen
  frozen_date: "2026-04-21"
  frozen_commit: "e492695e"
  frozen_reason: >
    Production live baseline (session e492695e). Do not modify; derive new
    engines as separate engine_family configs. V23 is the definitive champion
    after all 200d/400d/600d validation. Multi-engine Phase 1 begins here.
  description: >
    V22 → V23 via 2 validated improvements: ATR% quality filter + position cap adjustment.

    Validation mode: daily_budget_reset=true, compound_returns=false (단리/simple interest).

    V22 baseline: +98.73% (200d), Sharpe 3.24, DD -9.34%, 161 trades, WR 59.6%
    V23 result:   +116.92% (200d), Sharpe 3.26, DD -9.35%, 154 trades, WR 59.7%

    Changes from V22:
      1. min_atr_pct: null → 0.04 (require ATR-14 ≥ 4% of prev_close)
         Analysis of 400d trade distribution revealed that stocks with ATR/price < 4%
         (moderate-volatility names like energy stocks, stable tech) have 42-46% WR
         and contribute −20% total P&L, while >5% ATR names have 62.4% WR and +104%
         contribution. Filtering for high-ATR% ensures ORB candidates have the explosive
         follow-through potential the strategy relies on.
         Effect: 200d return +18.19pp. WR unchanged (+0.1pp). DD essentially same (−0.01pp).

      2. max_position_pct: 0.80 → 0.70
         High-ATR% stocks have larger individual trade variance (bigger swings).
         Reducing position cap from 80% to 70% of daily budget compensates, keeping
         portfolio-level DD comparable while the ATR% filter improves return.
         Without this adjustment: 400d DD −24.38% (fails gate). With: −23.97% (passes).

    Interaction: Neither change alone passes both 200d and 400d gates cleanly.
    Together they are synergistic: min_atr_pct selects high-quality candidates,
    max_pos_pct=0.70 manages their higher individual volatility.

    400d validation (daily_reset):
      V23 400d: +120.87%, WR 57.7%, DD −23.97%, 286 trades, 112 days, Sharpe 1.94
      V22 400d: +89.62%, WR 52.2%, DD −20.93%, 312 trades, 119 days, Sharpe 1.67
      400d gates: return≥88% ✓, WR≥52% ✓, DD≥−24% ✓ (−23.97% passes by 0.03pp)
      400d DD worsened 3pp but return/WR/Sharpe all improved significantly.

    Quarterly 400d attribution (known):
      2024-Q3: −4.4%, 2024-Q4: +1.2%, 2025-Q1: −8.4% (volatile macro periods driving DD)
      2025-Q2: +13.0%, 2025-Q3: +42.4%, 2025-Q4: +11.0%, 2026-Q1: +35.2%

    min_atr_pct filter graveyard (200d, daily_reset, on V22 base):
      - min_atr_pct 0.03: +86.09%, WR 58.7%, DD −10.85% (too lenient, includes drags)
      - min_atr_pct 0.04: +122.02%, WR 59.5%, DD −9.25% ← best 200d
      - min_atr_pct 0.05: +84.34%, WR 57.1%, DD −13.30% (over-filters, fewer candidates)
      - min_atr_pct 0.06: +98.40%, WR 61.2%, DD −16.49% (too few trades, high DD)
      - min_atr_pct 0.04 + max_atr_pct 0.08: +37.93% (filters too many good trades)
      - min_atr_pct 0.04 + max_atr_pct 0.09: 200d +81.70%, 400d +85.65% (below gates)
      - min_atr_pct 0.04 + risk=0.045: 200d WR 56.8% (fails gate), worse DD

    max_position_pct 0.75 + min_atr_pct 0.04:
      200d: +110.75%, WR 60.7%, DD −8.93%
      400d: +127.59%, WR 56.6%, DD −24.32% (FAILS 400d DD gate by 0.32pp)

strategy_mode: orb

orb_strategy:
  engine_family: gainers_leader
  live_readiness: live_ready

  orb_minutes: 5
  sim_bar_minutes: 5

  entry_direction: long_only
  order_timeout_minutes: 45

  allow_doji_breakout: true
  allow_red_to_green_breakout: true

  min_price: 10.0
  min_avg_dollar_volume: 25000000
  min_atr_14: 0.50

  # === CHANGE: require ATR ≥ 4% of prev_close (filter low-volatility drag candidates) ===
  min_atr_pct: 0.04

  min_rvol: 1.5
  min_abs_gap_pct: 0.02
  min_premarket_dollar_vol: 1500000
  max_candidates: 20
  max_candidates_per_sector: 3
  min_candidates_to_trade: 1
  ticker_cooldown_days: 0
  max_gap_pct: 0.04

  min_candidate_breadth: 0.60
  market_regime_spy_threshold: 0.0015
  market_regime_ticker: QQQ
  rolling_loss_days: 7
  rolling_loss_threshold: -0.07
  max_simultaneous_entries: 3
  min_breakout_rel_vol: 1.2

  weight_rvol: 0.35
  weight_gap: 0.20
  weight_dollar_vol: 0.05
  weight_premarket_dollar_vol: 0.25
  weight_body_ratio: 0.0
  weight_momentum: 0.15

  atr_stop_multiplier: 0.75
  breakeven_at_r: 1.0
  trailing_at_r: 1.0
  trailing_stop_atr_multiplier: 0.8
  trailing_tighten_at_r: 2.0
  trailing_stop_atr_multiplier_tight: 0.3

  partial_exit_at_r: 99.0
  partial_exit_pct: 0.50

  risk_per_trade_pct: 0.05
  # === CHANGE: max position 70% (from 80%) to manage higher per-trade variance ===
  max_position_pct: 0.70
  daily_max_loss_pct: 0.05
  max_stops_per_day: 5
  exit_minutes_before_close: 5

  slippage_bps: 5.0
  initial_capital: 10000

  compound_returns: false
  daily_budget_reset: true
  settlement_days: 1

  # Preserved from V22
  drawdown_governor_threshold: 0.025
  drawdown_governor_min_scale: 0.30

  # Preserved from V22
  streak_sizing_win_bonus: 0.70
  streak_sizing_max: 2.5

universe:
  source: broad

backtest:
  start_date: null
  end_date: null
  lookback_trading_days: 200

cache:
  enabled: true
  dir: data/cache/intraday

output:
  dir: runs/intraday_orb
  verbose: false
