You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
I Luk Kim 02f7b9f8d4 Fix capital_bucket propagation in synthetic engine candidates + ER silo sweep
Bug: synthetic Candidate builders in earnings_runup.py / peer_sympathy.py /
vol_breakout_52w.py did not propagate engine_capital_bucket_id /
engine_capital_bucket_allocation_pct from StrategyEngineConfig onto the
emitted Candidate. The selector path (libs/backtest/selector.py:371-383)
correctly sets these for selector-built candidates, but the synthetic-
candidate paths used by the new engine classes silently dropped them.

Cascade: apps/backtester/run.py:_active_capital_bucket_ids_for_candidates
scans candidate.engine_capital_bucket_id; when empty, the silo allocator
(run.py:790-791) short-circuits and the engine sizes against the full
equity pool — making capital_bucket fields a no-op for the new engines.

Fix: 3-line addition to each builder mirroring selector.py convention.
108 unit tests pass across the 3 engines.

ER silo sweep result (4y midlarge-liquid-long-v1, --split all):

  config              trades  er_tr  return%   mdd%  sharpe  er_pnl$
  v7.356_baseline       390     0    +2356.28  23.55   2.69     0
  phase6_shared_0.20    464    77    +2746.21  25.21   2.63 -7589
  silo_05               519    89    +2343.02  22.56   2.69   215
  silo_10               508    86    +2450.62  23.51   2.73   321
  silo_15               516    88    +2489.91  23.48   2.74   389
  silo_20               508    84    +2538.27  23.48   2.76   511
  silo_25               503    77    +2566.34  23.46   2.77   466
  silo_30               513    88    +2589.80  23.45   2.77   560

Phase 6 shared budget's headline +390pp gain was portfolio-luck distributed
(ER's 30 cancelled trades freed cash for other sleeves to make ~+30k pnl).
With proper silo, ER fires those trades within its dedicated bucket, sizing
correctly relative to the 5-30% pool — flipping ER engine PnL from
-$7,589 (Phase 6) to +$215..+$560 (silos).

silo_30 is the recommended variant:
 - Return +2589.80% vs baseline +2356.28% (+233pp, structural not luck)
 - MDD 23.45% vs baseline 23.55% (slightly better)
 - Sharpe 2.77 vs baseline 2.69 (+0.08, real improvement)
 - ER PnL +$560 (engine actually contributing)
 - Higher silos (40%+) likely starve PEAD; 30% appears near optimal.

Per-split validation of silo_30 NOT yet run — flagged for follow-up
before any live deployment.

Files:
 - libs/backtest/earnings_runup.py:494-499 (3-line fix)
 - libs/backtest/peer_sympathy.py:771-776 (3-line fix)
 - libs/backtest/vol_breakout_52w.py:654-659 (3-line fix)
 - configs/experiments/return_max_long_v7.356_plus_er_silo_{05,10,15,20,25,30}.json

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
3 months ago
..
scenarios Add synthetic scenario robustness testing system 5 months ago
__init__.py feat: implement Phase 4 -- event-driven backtester 5 months ago
allocator.py Add ownership/risk-off sleeves, v17-v19 experiments, and web app restructure 4 months ago
artifacts.py Add non-core allocator v2 and Form4 freshness presets 4 months ago
attention.py Add ownership/risk-off sleeves, v17-v19 experiments, and web app restructure 4 months ago
calendar.py feat: implement Phase 4 -- event-driven backtester 5 months ago
daily_gainers.py Remove momentum breakout sleeve (overfitting, valid -31%) and revert related code 4 months ago
dividend_calendar.py Add ownership/risk-off sleeves, v17-v19 experiments, and web app restructure 4 months ago
domain.py Add reaction_close salvage variant to PeerSympathy engine 3 months ago
earnings_calendar.py Add ownership/risk-off sleeves, v17-v19 experiments, and web app restructure 4 months ago
earnings_runup.py Fix capital_bucket propagation in synthetic engine candidates + ER silo sweep 3 months ago
execution.py Wire pct-trailing end-to-end for EarningsRunup; tune v2 risk profile 3 months ago
experiments.py Optimize v7 strategy: v7.356 achieves CW 2159% + SQS 90.7 (Pareto improvement over v7.314) 4 months ago
form4_calendar.py Add v7.120 composed GLD experiment updates 4 months ago
macro_screener.py Remove momentum breakout sleeve (overfitting, valid -31%) and revert related code 4 months ago
manifests.py Add ownership/risk-off sleeves, v17-v19 experiments, and web app restructure 4 months ago
metrics.py Add ownership/risk-off sleeves, v17-v19 experiments, and web app restructure 4 months ago
non_core_allocator.py Add non-core allocator v2 and Form4 freshness presets 4 months ago
overfit.py Fix cash parking phantom-money bug + live engine parking liquidation for events 5 months ago
ownership_calendar.py Add ownership/risk-off sleeves, v17-v19 experiments, and web app restructure 4 months ago
peer_sympathy.py Fix capital_bucket propagation in synthetic engine candidates + ER silo sweep 3 months ago
proxies.py Add ownership/risk-off sleeves, v17-v19 experiments, and web app restructure 4 months ago
ranking_models.py Add overlay engine, ranking models, snapshot pipelines, and research tools 5 months ago
scoring.py Add ownership/risk-off sleeves, v17-v19 experiments, and web app restructure 4 months ago
selector.py Add ownership/risk-off sleeves, v17-v19 experiments, and web app restructure 4 months ago
snapshot_store.py Fix parking entry/exit showing same price on last simulation day 4 months ago
snapshots.py Add ownership/risk-off sleeves, v17-v19 experiments, and web app restructure 4 months ago
splits.py Enhance backtest engine: v11 scoring, selector expansion, snapshot store improvements 5 months ago
tracker.py Add ownership/risk-off sleeves, v17-v19 experiments, and web app restructure 4 months ago
vol_breakout_52w.py Fix capital_bucket propagation in synthetic engine candidates + ER silo sweep 3 months ago