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.

By ArthaPilot Research

Published 2026-10-11

Research question

One four-asset max-Sharpe fit with in-sample diagnostics; held-out evidence is absent.

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

Content-pinned result

The recorded max-Sharpe allocation

The exact weights from the committed full-period fit, including the two assets the solver left at zero.

Which weights did the recorded long-only max-Sharpe fit assign across the four-asset universe?

Construction. 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.

The recorded max-Sharpe allocation. bar chart with 1 series. Exact values are available in the table following the figure.
Fitted weight (%)
0%20%40%60%SPYBNDGLDVNQ
Asset
The recorded max-Sharpe allocation. bar chart with 1 series. Exact values are available in the table following the figure.
CategoryMax-sharpe weight
SPY41.43%
BND0%
GLD58.57%
VNQ0%

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

  1. Estimate the full-sample return and covariance inputs used by the optimizer.
  2. Solve the constrained max-Sharpe objective and retain zero-weight assets in the output.
  3. Convert decimal weights to portfolio percentages.

What this step cannot establish

The allocation is a full-sample fit. Concentration in SPY and GLD does not establish stability or later-window performance.

Exact values behind the figure
Exact plotted values shown in Exhibit 01
SeriesAssetFitted weight (%)
Max-sharpe weightSPY41.43%
Max-sharpe weightBND0%
Max-sharpe weightGLD58.57%
Max-sharpe weightVNQ0%

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

Content-pinned result

The in-sample performance ledger

The three recorded metrics with their estimation basis stated directly in the exhibit.

What return and volatility did the fitted portfolio report inside its estimation sample?

Construction. 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.

The in-sample performance ledger. bar chart with 1 series. Exact values are available in the table following the figure.
Value (%)
0%5%10%15%CAGRVolatility
In-sample metric
The in-sample performance ledger. bar chart with 1 series. Exact values are available in the table following the figure.
CategoryFitted path
CAGR15.385%
Volatility11.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 committed response.
  • The response's CAGR, volatility, and Sharpe fields.

Calculation

  1. Apply the fitted weights to the same sample used for estimation.
  2. Calculate compound annual growth and annualized volatility on that fitted path.
  3. Keep Sharpe in the result ledger because it is a ratio rather than a percentage.

What this step cannot establish

The metrics reuse the estimation sample. They are descriptive fit statistics, not a historical strategy selected before the sample began.

Exact values behind the figure
Exact plotted values shown in Exhibit 02
SeriesIn-sample metricValue (%)
Fitted pathCAGR15.385%
Fitted pathVolatility11.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 content-pinned fit is reproducible, and the out-of-sample survival claim is unsupported by this fixture.

Exhibit 03

Method note

What the direct-fit response does not contain

A scope ledger for the claims excluded from this in-sample worked note.

What risk-adjusted ratios did the direct fit report before any held-out test?

Construction. 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.

What the direct-fit response does not contain. bar chart with 1 series. Exact values are available in the table following the figure.
Ratio
0×0.5×1×1.5×SharpeSortino
Risk-adjusted diagnostic
What the direct-fit response does not contain. bar chart with 1 series. Exact values are available in the table following the figure.
CategoryDirect-fit ratio
Sharpe1.279×
Sortino1.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

  1. Plot the two unitless risk-adjusted ratios exactly as returned by the optimizer.
  2. Keep them labeled as direct-fit diagnostics because the same sample selected the weights and supplied the ratios.

What this step cannot establish

These are in-sample diagnostics, not later-window results. The chart cannot answer whether either ratio survives refitting, costs, or a benchmark comparison.

Exact values behind the figure
Exact plotted values shown in Exhibit 03
SeriesRisk-adjusted diagnosticRatio
Direct-fit ratioSharpe1.279×
Direct-fit ratioSortino1.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.

The title remains unanswered because the decoded fixture stops at the direct fit. That negative conclusion is part of the published note.

Method and constraints

Method

The displayed four-asset max-Sharpe results reconcile to one committed request and response fixture.

Verification: Preserve the fixture path, source commit, engine version, and request/response SHA-256 hashes with the note.

Verification: Verify displayed weights sum to 100% within rounding and retain zero-weight assets in the exhibit.

Verification: Keep the in-sample label attached to every recorded return, volatility, and Sharpe statistic.

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.

What this study establishes

This report cannot yet say when optimization survives contact with time. The committed artifact is a full-period, in-sample max-Sharpe fit. Across 2,513 trading days, it assigned 41.4297% to SPY and 58.5703% to GLD, leaving BND and VNQ at zero.

The fit reported 15.3848% CAGR, 11.7255% volatility, and a 1.2794 Sharpe ratio. Those are coherent outputs of the stated long-only problem, but they are not later-window results. The sharp two-asset solution is therefore the beginning of the research question: did it persist after estimation, or did it merely summarize the sample from which it was chosen?

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
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

The linked tools expose the assumptions, dates, and result tables behind this report.