V31 research findings (2026-04-22):
- Hard gate (max_gap_zscore_20d=1.0): 45.2% vs V24 95.3% — catastrophically bad.
All three terciles are profitable; hard rejection removes positive-EV trades.
- Negative weight (weight_gap_zscore=-0.05): 90.6% DD-12.33% Sh=2.649.
Signal too weak (G2 failed at 0.181R < 0.30R threshold). G2 ≥ 0.30R
validated as reliable promotion gate: OBV-slope (G2=0.394R) passed; all
signals below 0.30R failed in backtest.
All 7 signal axes exhausted — V24 is the peak for current feature library.
domain.py: add max_gap_zscore_20d param (no-op at None default)
orb_simulator.py: add gainers_leader hard-gate (no-op at None default)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Two fixes:
1. _rebuild_daily_from_intraday_cache now filters to regular market hours
(9:30–16:00 ET) before computing OHLCV. Previously used bars[-1] which
included after-hours data, distorting prev_close for gap calculations.
Root cause of V23 regression: HIMS Aug-4 after-hours drop to $54.81
made it appear as a +0.89% gap on Aug 5 instead of the correct -12.85%
gap (from $63.45 market close), causing it to fail min_abs_gap_pct filter.
V23 with fix: +109.32%, WR 58.1%, Sharpe 3.01, DD -12.91%
2. Remove temporary debug instrumentation (HIMS/2025-08-05 trace blocks)
that was left in orb_simulator.py during regression investigation.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add run_pre_screen() at 9:20 ET: fetch daily bars + enrichment + quality filter
before market open, narrowing universe for faster orb_detect intraday fetch
- run_orb_detection() uses cached pre-screen data when available; falls back to
full pipeline if pre_screen missed (late start, failure)
- Add _last_trading_day() helper to skip weekends/holidays for bars_end,
preventing Alpaca 502 on Mondays (today-1 = Sunday was causing failures)
- Fix Oracle client chunk_size 300→75: Alpaca rejects 100+ ticker URL requests
- Add pre_screen event to build_schedule() at 9:20 ET and dispatch in _run_trading()
- run_session_now() runs pre_screen before orb_detect for efficiency
- Add ORB daemon, engine, models, state, screener, and intraday strategy configs
- Add intraday library (libs/intraday/) and web routes for ORB/intraday trading
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>