Worked research note
Portfolio optimization before the out-of-sample test
The available artifact stops at the in-sample fit. Its concentrated solution shows why a later-window test is required.
Published Oct 11, 2026
At a glance
An in-sample max-Sharpe fit allocated 41.43% to SPY and 58.57% to GLD, leaving BND and VNQ at zero. It reported 15.38% annualized return, 11.73% volatility, and a 1.279 Sharpe ratio over 2016–2025.
The allocation and performance were estimated from the same historical window. These results do not test how the allocation performed after estimation.
Scope: One direct fit cannot answer whether the allocation survives later dates or shifted estimation windows.
A four-asset problem produced a two-asset solution
The optimizer considered SPY, BND, GLD, and VNQ under long-only, fully invested, unleveraged constraints. It used neither covariance nor expected-return shrinkage and used a zero risk-free input.
The resulting allocation was 41.4297% SPY and 58.5703% GLD, with 0% BND and 0% VNQ. The weights sum to the required portfolio, but the opportunity set's nominal breadth did not carry into the selected solution.
Exhibit 01
The recorded max-Sharpe allocation
The exact weights from the committed full-period fit, including the two assets the solver left at zero.
The allocation is a full-sample fit. Concentration in SPY and GLD does not establish stability or later-window performance.
| Category | Max-sharpe weight |
|---|---|
| SPY | 41.43% |
| BND | 0% |
| GLD | 58.57% |
| VNQ | 0% |
Source and construction: Recorded ArthaPilot Portfolio Optimizer fixture; 2016-01-04 through 2025-12-31; engine 1.0.0; response hash ee9043e121a2… .
How this figure was calculated
Inputs
- SPY, BND, GLD, and VNQ total returns over the response's 2016-05-31 through 2026-05-29 effective window.
- A long-only, unleveraged, fully invested max-Sharpe request with zero shrinkage and zero risk-free input.
- No inflation adjustment, so the reported growth and volatility are nominal.
Calculation
- Estimate the full-sample return and covariance inputs used by the optimizer.
- Solve the constrained max-Sharpe objective and retain zero-weight assets in the output.
- Convert decimal weights to portfolio percentages.
Exact values behind the figure
| Series | Asset | Fitted weight (%) |
|---|---|---|
| Max-sharpe weight | SPY | 41.43% |
| Max-sharpe weight | BND | 0% |
| Max-sharpe weight | GLD | 58.57% |
| Max-sharpe weight | VNQ | 0% |
A zero weight is not an engine failure. It is the optimizer's answer to the inputs and constraints it received over this sample.
It is also an estimation-risk warning. When two available assets disappear from the solution, small changes in the estimated opportunity set may matter materially to the portfolio that is selected.
The reported performance belongs to the estimation sample
The fitted path reported 15.3848% CAGR, 11.7255% volatility, and a 1.2794 Sharpe ratio across 2,513 trading days. Because the same dates informed the weights and supplied the performance, these figures describe fit quality within the historical sample.
They do not describe a portfolio selected at the start of the period with foreknowledge removed. Calling them out of sample would turn a valid descriptive calculation into an invalid historical claim.
Exhibit 02
The in-sample performance ledger
The three recorded metrics with their estimation basis stated directly in the exhibit.
The metrics reuse the estimation sample. They are descriptive fit statistics, not a historical strategy selected before the sample began.
| Category | Fitted path |
|---|---|
| CAGR | 15.385% |
| Volatility | 11.726% |
Source and construction: Same recorded ArthaPilot response; 2,513 trading days; no return shrinkage, covariance shrinkage, or held-out test window.
How this figure was calculated
Inputs
- The selected weights and 2,513 trading-day full-sample path from the archived result.
- The response's CAGR, volatility, and Sharpe fields.
Calculation
- Apply the fitted weights to the same sample used for estimation.
- Calculate compound annual growth and annualized volatility on that fitted path.
- Keep Sharpe in the result ledger because it is a ratio rather than a percentage.
Exact values behind the figure
| Series | In-sample metric | Value (%) |
|---|---|---|
| Fitted path | CAGR | 15.385% |
| Fitted path | Volatility | 11.726% |
The metrics show why the optimizer chose this corner: within the fitted history, the combination scored strongly on the stated objective.
They cannot tell us whether the estimated relationship was stable enough to survive a refit, whether turnover would be high, or whether equal weight would have been more competitive later.
The fit stops before the title's test
The response contains no held-out dates, rolling refits, turnover charges, or benchmark path. Every displayed performance metric comes from the same sample that selected the weights.
The response also contains no shrinkage or Black-Litterman result. The archived fit is reproducible, and the out-of-sample survival claim is unsupported by this case.
Exhibit 03
What the direct-fit response does not contain
A scope ledger for the claims excluded from this in-sample worked note.
These are in-sample diagnostics, not later-window results. The chart cannot answer whether either ratio survives refitting, costs, or a benchmark comparison.
| Category | Direct-fit ratio |
|---|---|
| Sharpe | 1.279× |
| Sortino | 1.866× |
Note: No held-out dates, benchmark path, turnover charge, or alternative-estimator response is present.
Source and construction: Scope boundary derived from the direct-fit request and response recorded by ArthaPilot Portfolio Optimizer.
How this figure was calculated
Inputs
- The in-sample Sharpe and Sortino ratios in the direct max-Sharpe response.
- The response's single fitted window and absence of a held-out path or benchmark result.
Calculation
- Plot the two unitless risk-adjusted ratios exactly as returned by the optimizer.
- Keep them labeled as direct-fit diagnostics because the same sample selected the weights and supplied the ratios.
Exact values behind the figure
| Series | Risk-adjusted diagnostic | Ratio |
|---|---|---|
| Direct-fit ratio | Sharpe | 1.279× |
| Direct-fit ratio | Sortino | 1.866× |
A strong in-sample result is neither proof against optimization nor evidence for it. It is a candidate allocation selected from the same sample used to describe its performance.
A later-window test is needed to assess whether the fitted allocation continues to perform after estimation.
Method and constraints
Method
The displayed four-asset max-Sharpe results reconcile to one archived request and result.
The recorded direct fit cannot establish an efficient-frontier, benchmark, turnover, shrinkage, Black-Litterman, or out-of-sample result.
Assumptions held fixed
- The worked case uses SPY, BND, GLD, and VNQ over 2,513 trading days from 2016-01-04 through 2025-12-31.
- The request is long-only, unleveraged, fully invested, and optimized for maximum Sharpe with a zero risk-free input.
- No covariance shrinkage or expected-return shrinkage was applied.
- The reported weights and performance metrics are full-sample fit outputs, not a walk-forward or held-out result.
Limitations
- One direct fit cannot answer whether the allocation survives later dates or shifted estimation windows.
- The artifact contains no efficient frontier, equal-weight benchmark, rolling refit, turnover charge, shrinkage, or Black-Litterman result.
- A four-fund U.S.-listed universe is illustrative; another universe or constraint set can produce a different corner.
- Taxes, time-varying spreads, capacity, and market impact are outside the recorded case.
Sources and prior research
- Victor DeMiguel, Lorenzo Garlappi, and Raman Uppal, Optimal versus naive diversification: how inefficient is the 1/N portfolio strategy? (2009)
Peer-reviewed evidence for comparing estimated portfolio rules with equal weight out of sample under estimation error and turnover.
- Fischer Black and Robert Litterman, Global portfolio optimization (1992)
Primary source for beginning from equilibrium expected returns and introducing active views with explicit confidence.
- ArthaPilot, Portfolio Optimizer guide (2026)
Calculation contract separating direct fits, efficient frontiers, rolling walk-forward runs, and Black-Litterman estimates.
Evidence and reproducibility
optimization-out-of-sample-recorded-demo-fixture
A descriptive worked note reporting one in-sample four-asset max-Sharpe fit and concluding that the fit cannot establish out-of-sample survival.
Evidence date: 2026-08-17. Basis and units are stated in each recorded fact.
note=57db0ee27769448543628552b1ea778067d1f47b969fda9c73a6041f8d427c2e; request=c22ebeb60040d41359d69ca3c0b2aec856917f48ed4c6f4829f75d5f40f19e07; response=ee9043e121a2fdd7770e5956953227320dc4e246997944a3804423bf0da9c6db
Source: web/src/data/research/portfolio/fixtures/portfolio-optimizer.record.json. Versions: fixture1=69daa3e2f3fd5efe2faa78e6b08748eee1bc250c@1.0.0.
- An efficient-frontier or equal-weight comparison
- A rolling, held-out, turnover, or later-window result
- A shrinkage or Black-Litterman result
Inspect the same question with your own inputs
- Estimate candidate weights Inspect the allocation, objective, constraints, and concentration produced by one direct fit.
- Run the later-window test Move from a direct fit to rolling estimation and held-out evaluation on explicit windows.
- Backtest selected weights Carry a chosen allocation into a full portfolio path with common-date benchmarks and implementation assumptions.