@@ -14,53 +14,57 @@ yet a production trading recommendation. Ridge is the stable linear benchmark an
1414ranker is the nonlinear challenger. Both select 40 equal-weight names and share SPY as the market
1515benchmark.
1616
17- ## Daily after-close workflow
17+ ## Daily after-close workflow: monitoring phase
1818
19- Run the production-style workflow after Yahoo Finance publishes the final regular-session bar:
19+ This dashboard track preserves the legacy one-session selections for the
20+ rebalancing-policy study; it is separate from the primary horizon-matched
21+ 5/10/20-session live-forward experiment. The July 20–27 Ridge and XGBoost
22+ selections are frozen as permanent cohorts. After Yahoo Finance publishes the
23+ official daily close, run:
2024
2125``` bash
2226python -m src.cli run-live-forward-daily --as-of YYYY-MM-DD
2327```
2428
25- The command performs these steps in order:
26-
27- 1 . Waits for the final 15:30 hourly bar and verifies the official daily close is available.
28- 2 . Evaluates portfolios frozen before the current session, including one holding-level return
29- record per selected stock.
30- 3 . Immediately rebuilds the local dashboard and sanitized ` site/ ` bundle before model tuning starts.
31- 4 . Incrementally refreshes daily market data, split events, and trailing sector-ETF classifications
32- through the decision date.
33- 5 . Expands sector observations backward-as-of so each historical feature and label uses only the
34- classification available on that date.
35- 6 . Builds forward-return training labels only where the future outcome was already known before the
36- decision date.
37- 7 . Tunes Ridge and XGBoost independently on temporal validation data, refits the selected
38- configurations, and freezes both top-40 lists for the next evaluation session.
39- 8 . Freezes a separate shadow portfolio by blending the two full-universe percentile rankings
40- with the historically selected 25% Ridge / 75% XGBoost weight and applying the same top-40
41- sector cap.
42- 9 . Writes model-agreement, day-over-day selection-stability diagnostics, and candidate split
43- features that are not yet eligible for model fitting.
44- 10 . Rebuilds both dashboard outputs again so they include the newly frozen pending portfolios.
45-
46- If final market data is unavailable, the command retries and then fails closed. It must not create a
47- snapshot from a partial trading day.
48-
49- ## Tuning profiles
50-
51- Use a full focused retune after changing a feature definition, repairing historical inputs, or as
52- a periodic model audit:
29+ Monitoring-only is the default. The command:
30+
31+ 1 . requests adjusted daily prices only for SPY and securities present in the archived cohorts;
32+ 2 . verifies the requested official close exists and fails closed if Yahoo still has partial data;
33+ 3 . extends every unchanged July 20–27 portfolio through the new close;
34+ 4 . replays archived rebalance policies for every interval from 1 through 60 sessions;
35+ 5 . recalculates net return, SPY-relative return, cumulative turnover, and trades; and
36+ 6 . rebuilds the local dashboard and sanitized GitHub Pages bundle.
37+
38+ It does ** not** fit a model or create a new stock list. The output explicitly reports
39+ ` "new_model_lists": 0 ` .
40+
41+ The dashboard's ** Holding-period laboratory** supports selecting any July 20–27 list, displaying
42+ Ridge and XGBoost together with clickable model chips, or replaying a 1–60-session rebalance
43+ interval. Five-, 10-, and 20-session presets are provided, and the horizon comparison table reports
44+ every 1–20-session candidate side by side. SPY is permanent and begins from the same zero-return
45+ decision-close baseline as each portfolio.
46+
47+ The displayed ** replacement turnover** excludes the unavoidable initial purchase. An unchanged
48+ cohort therefore correctly shows 0% replacement turnover. Scheduled policies use the same
49+ $1 million capital, 8 bps one-way cost, $10 fixed trade fee, and 0.25% minimum trade-weight rule.
50+
51+ ## Explicit archived retraining workflow
52+
53+ The old production-style retraining path remains available for reproducibility, but now requires
54+ the explicit ` --retrain ` flag:
5355
5456``` bash
5557python -m src.cli run-live-forward-daily \
5658 --as-of YYYY-MM-DD \
59+ --retrain \
5760 --tuning-folds 5 \
5861 --ridge-optuna-trials 60 \
5962 --xgb-optuna-trials 50 \
6063 --optuna-timeout-seconds 7200
6164```
6265
63- The focused parameter ranges come from earlier completed live runs. The current decision date and
66+ Do not use this flag during the frozen-cohort monitoring phase. The focused parameter ranges come
67+ from earlier completed live runs. The current decision date and
6468its future return remain excluded, so narrowing the search does not introduce look-ahead leakage.
6569Five purged temporal folds provide a more stable selection estimate, while the separate Ridge and
6670XGBoost trial budgets reflect their very different fitting costs.
0 commit comments