US ML-Enhanced Portfolio Optimization
Summary
This report implements the AI-Driven Quantitative Portfolio Optimization Engine (MLPO) on US large-cap equities: a 30-name diversified panel across technology, healthcare, finance, consumer, energy, industrial, and utilities sectors, benchmarked against SPY.
Out-of-sample evaluation uses quarterly walk-forward rebalancing with a rolling 36-month estimation window, training on history from late 2013 through November 2020, then simulating through the latest available prices. A 4% annualized risk-free rate proxies US cash/T-bill returns. Four constructions are tracked out-of-sample: mean-variance (MV) optimized, ML-enhanced MV (XGBoost views via Black-Litterman), a cap-weight reference, and SPY.
Interactive exhibits quantify return and risk (CAGR/total return, Sharpe/Sortino, max drawdown, beta/alpha, information ratio, and VaR/CVaR) plus SPY-relative behaviour (tracking error, correlation, up/down capture, and turnover), along with allocation and model diagnostics (sector concentration and ranked forecast signals).
Results are research illustrations of method behaviour—not investment advice or live trading signals.
Research workflow and data processing
Stage 1 — Universe and prices. Thirty liquid US tickers with aligned adjusted closes from Yahoo Finance; names with insufficient history are dropped before estimation.
Stage 2 — Feature engineering. Technical indicators (moving averages, RSI, MACD, momentum, volatility) feed the gradient-boosted forecasting model.
Stage 3 — Training window. At each quarterly rebalance, the prior 36 months form the estimation sample for means, covariances, and ML features.
Stage 4 — Optimization. Pure MV maximizes Sharpe under long-only bounds and a volatility ceiling; ML + MV replaces expected returns with Black-Litterman posteriors from ML views.
Stage 5 — Walk-forward simulation. Weights are held for one quarter; 0.1% slippage applies to turnover at each rebalance.
Stage 6 — Risk analytics. Cumulative paths, drawdowns, Sharpe/Sortino, beta/alpha versus SPY, VaR/CVaR, and sector concentration are reported below.
Quantitative framework
Mean-variance optimization. Weights maximize Sharpe subject to , box constraints, and with annualized.
Machine-learning views. XGBoost predicts forward returns from technical features; out-of-sample maps to view confidence, with forecasts shrunk toward historical means before Black-Litterman blending ().
Black-Litterman. Cap-weight notionals imply equilibrium returns; investor views with diagonal produce posterior expected returns for the second MV solve.
Performance metrics. CAGR, Sharpe, Sortino, max drawdown, beta, alpha, VaR, and CVaR follow standard definitions on daily portfolio returns versus SPY.
How to interpret the results
Compare ML + MV to MV only to see whether ML views improve the risk-return trade-off; compare both to SPY for passive benchmark context.
Sector allocation bars show industry concentration in the latest optimized book. Signal tables rank cross-sectional forecasts from the most recent training window (annualized, model-implied)—illustrative, not orders. Use the risk and relative analytics above to judge whether any outperformance (if observed) comes with better downside control (drawdowns + VaR/CVaR) and how the portfolio participates in market up- and down-moves (capture metrics).
Limitations
Yahoo Finance prices and simplified transaction costs (slippage on turnover only) may differ from live execution.
The fixed 30-stock panel is not the full S&P 500; results may not generalize to broader universes.
ML forecasts are noisy; views are shrunk toward historical means by design.
Past backtest performance does not guarantee future results.
Empirical exhibits (below)
Interactive charts below cover the full scorecard: strategy performance (CAGR/total return, Sharpe/Sortino, max drawdown, volatility), relative analytics vs SPY (tracking error, correlation, up/down capture, and turnover), and risk profile (beta/alpha, information ratio, VaR/CVaR).
You also get behaviour over time (calendar-year returns, drawdown and cumulative wealth paths, monthly returns), plus allocation and model outputs (sector concentration and ranked cross-sectional signals). Regenerate with npm run data:us-mlpo after refreshing market data.
Results
Key takeaways
Automated reading of the latest backtest—use alongside the methodology section for context.
- ML + MV CAGR (14.70%) trailed the SPY (15.50%) by 0.8 percentage points—active tilts did not add return in this sample.
- MV-only Sharpe (1.14) matched or beat ML + MV (0.66) here—historical means may have been as informative as technical forecasts in this period.
- Drawdown on ML + MV (-22.30%) was comparable to or shallower than SPY (-23.80%), indicating risk was not disproportionately worse than the benchmark.
- Alpha near zero—performance is largely explained by market co-movement (beta 0.92).
- Information ratio -0.08 reflects modest or noisy active return relative to benchmark tracking error.
Data through 2026-05-26 · 30 stocks in universe · Walk-forward from 2020-11-30
Strategy scorecard
Out-of-sample metrics after quarterly rebalancing (~36-month rolling training window). CAGR annualizes terminal wealth; Sharpe and Sortino scale return against volatility (Sortino penalizes only downside moves); max drawdown is the worst peak-to-trough loss on the cumulative path.
| Strategy | CAGR | Total | Sharpe | Sortino | Max DD | Vol |
|---|---|---|---|---|---|---|
| ML + MV-0.8 pp vs SPY | 14.70% | 110.60% | 0.66 | 1.04 | -22.30% | 17.10% |
| MV only+9.1 pp vs SPY | 24.60% | 229.80% | 1.14 | 1.90 | -20.00% | 17.00% |
| Cap-weight+3.8 pp vs SPY | 19.30% | 160.70% | 0.98 | 1.62 | -19.20% | 15.10% |
| SPY | 15.50% | 118.40% | 0.70 | 1.15 | -23.80% | 16.80% |
Active risk versus SPY (ML + MV)
How the optimized book behaves relative to the index over the same out-of-sample dates. Up-capture above 1 means the strategy participates more in index rallies; down-capture below 1 means softer participation in selloffs.
Tracking error
7.40%
Correlation
0.91
Up-capture
0.92
Down-capture
0.91
Avg rebalance turnover (ML)
58.70%
Calmar (ML + MV)
0.66
ML + MV risk profile
Relative to SPY daily returns over the same walk-forward dates. Alpha is average return not explained by beta; VaR and CVaR summarize typical and tail daily losses under the historical return distribution.
Alpha (ann.)
0.30%
Beta
0.92
Information ratio
-0.08
VaR 95% (daily)
1.70%
CVaR 95% (daily)
2.50%
Win rate (daily)
54.50%
Best / worst day
9.90% / -7.80%
Calendar-year returns
Full-year total return on each cumulative wealth path. Excess is ML + MV minus SPY for that calendar year.
| Year | ML + MV | SPY | Excess |
|---|---|---|---|
| 2020 | 4.00% | 3.70% | +0.3 pp |
| 2021 | 39.90% | 25.90% | +14.0 pp |
| 2022 | -11.70% | -16.60% | +4.9 pp |
| 2023 | 23.30% | 25.90% | -2.6 pp |
| 2024 | 18.60% | 25.50% | -6.9 pp |
| 2025 | 8.00% | 17.40% | -9.4 pp |
| 2026 | 3.60% | 10.20% | -6.6 pp |
Cumulative wealth paths
Each line is cumulative excess return (rebased at the start of the out-of-sample window). Upward divergence means outperformance versus the starting level; parallel lines imply similar exposure. Sharp drops coincide with market stress or concentrated sector bets.
Drawdown paths
Peak-to-trough decline from the running maximum of cumulative wealth. Deeper lines mean longer or sharper loss episodes versus the strategy’s own prior high.
Monthly returns
Month-end return on each wealth path. Bars above zero are positive months; compare height and sign to see when the strategy beat or lagged the index.
Sector concentration (ML + MV)
Largest sector bucket: Finance at 42.20% of the latest optimized book. Bars show how weights aggregate across simplified industry groups.
Cross-sectional signals (latest training window)
Ranked by model forecast. Trend compares last price to the 50-day average; forecast is the annualized return implied by the ML view. Strong Buy requires an upward trend and a high forecast; conflicting inputs yield Hold.
| Ticker | Price ($) | Forecast | Signal |
|---|---|---|---|
| MSFT | 205.61 | 35.0% | Strong Buy |
| ADBE | 477.03 | 35.0% | Hold |
| COST | 357.1 | 31.4% | Strong Buy |
| NEE | 65.66 | 26.4% | Strong Buy |
| AAPL | 113.28 | 25.6% | Strong Buy |
| NVDA | 13.22 | 23.6% | Hold |
| CRM | 244.05 | 22.3% | Hold |
| UNH | 307.98 | 21.3% | Strong Buy |
| PG | 120.54 | 21.2% | Hold |
| MS | 53.84 | 20.3% | Strong Buy |
| NKE | 123.94 | 17.1% | Strong Buy |
| BAC | 25.39 | 17.0% | Strong Buy |
| HON | 176.38 | 16.8% | Strong Buy |
| ABBV | 84.92 | 16.3% | Strong Buy |
| BA | 216.5 | 16.1% | Strong Buy |
| LLY | 139.44 | 15.6% | Strong Buy |
| JPM | 105.45 | 15.1% | Strong Buy |
| GOOGL | 88.62 | 15.1% | Strong Buy |
| BLK | 627.59 | 13.0% | Strong Buy |
| CAT | 158.53 | 12.9% | Strong Buy |