On a sub-100-observation tape the mean-variance tangency portfolio goes haywire (a −2.66 Sharpe, a 40% short), while risk parity stays sane, and that gap is the whole decision. On the Efficient Frontier Builder sample tape (96 observations, four assets: US Equities, Intl Equities, Aggregate Bonds, Commodities, risk-free 4%), the engine returns annualized μ = [10.8%, 32.2%, −4.6%, −36.4%], min-variance weights [8.2%, 7.6%, 78.5%, 5.8%] with annualized vol 5.62%, and a reported tangency at weights [12.4%, −39.6%, 84.8%, 42.4%] (short Intl Equities, heavy Bonds), Sharpe −2.66. The Correlation Matrix Visualizer sample (five ETFs: SPY, QQQ, TLT, GLD, XLE, 90 observations) returns avg-abs-off-diagonal 0.180, condition number 4.71, effective N = 4.09. Risk parity weights derive from inverse-volatility (with a correlation correction in the full ERC form) and produce a substantively different allocation. The portfolio-size threshold at which mean-variance dominates risk parity depends on the precision of the μ estimate, which on a sub-100-observation tape is wide enough to flip the recommendation.

TL;DR

Two engine runs illustrate the two constructions. The Efficient Frontier Builder sample is a four-asset macro tape (96 monthly observations):

Method US Eq Intl Eq Bonds Commod Vol (ann) Sharpe
Min-variance (engine) 8.2% 7.6% 78.5% 5.8% 5.62% −1.14
Reported tangency (engine) 12.4% −39.6% 84.8% 42.4% 13.05% −2.66
Inverse-vol risk parity positive on all four, weight ∝ 1/vol

The engine's reported tangency goes short an asset (Intl Equities) and over-weights Bonds, textbook mean-variance behaviour on a noisy μ estimate where excess returns are negative. Risk parity refuses by construction (all weights positive, inverse-vol). On a sub-100-observation tape the μ estimate has a standard error on the same order as the estimate itself, large enough to flip the optimum in either direction. The choice between mean-variance and risk parity is the choice between "trust the μ estimate" and "ignore it."

The four-asset frontier

The engine sweeps 61 points across the feasible region. Samples (weights in order US Eq / Intl Eq / Bonds / Commod):

Point US Eq Intl Eq Bonds Commod Ann return Ann vol Sharpe
0 (low-return) 16.7% −86.7% 91.1% 78.9% −59.03% 24.23% −2.60
15 12.4% −39.6% 84.8% 42.4% −30.73% 13.05% −2.66
30 (min-var) 8.2% 7.6% 78.5% 5.8% −2.43% 5.62% −1.14
45 3.9% 54.7% 72.2% −30.8% 25.87% 13.05% 1.68
60 (high-return) −0.4% 101.8% 65.9% −67.3% 54.17% 24.23% 2.07

The frontier slope rises steeply on the right end (high return as Intl Equities is levered up and Commodities shorted) and falls into deeply negative Sharpe on the left. On this tape the engine's reported tangency lands at point 15 with Sharpe −2.66 because no positive-excess-return combination exists at the bottom of the frontier; the genuine maximum-Sharpe point is the high-return end (point 60, Sharpe 2.07). That quirk is itself instructive: a tangency solver returns degenerate or counter-intuitive results when the risk-free rate sits above the achievable returns, which happens routinely on short, noisy tapes.

The correlation structure

The Correlation Matrix Visualizer sample is a five-ETF universe (SPY, QQQ, TLT, GLD, XLE). Selected pairwise correlations from the engine output:

SPY QQQ TLT GLD XLE
SPY 1.00 0.57 −0.29 0.09 0.28
QQQ 0.57 1.00 −0.13 0.06 0.15
TLT −0.29 −0.13 1.00 0.11 −0.06
GLD 0.09 0.06 0.11 1.00 0.06
XLE 0.28 0.15 −0.06 0.06 1.00

Average absolute off-diagonal correlation = 0.180. Condition number = 4.71. Effective N (from the eigenvalue distribution) = 4.09, the five-ETF universe carries about four effective independent dimensions of risk.

The negative SPY-TLT correlation (−0.29) is consistent with the canonical "stocks-bonds-anti-correlated" empirical pattern. The high SPY-QQQ correlation (0.57) is the expected equity-beta overlap. The structure is what risk parity exploits: assets with low pairwise correlation reduce portfolio volatility for any given allocation.

The correlation-matrix engine returns explainedByFirst = 0.364, meaning the first principal component explains 36% of the joint variance, modest for a five-asset universe (a fully-orthogonal five-asset case would have 20% in the first component). The portfolio is reasonably diversified relative to its asset count.

Where risk parity wins: small books, stable correlations

Risk parity allocates by inverse volatility (with a correlation correction for the multi-asset case). On a tape like the four-asset macro sample, raw inverse-vol weights tilt heavily toward the lowest-vol asset (Aggregate Bonds, the only asset with single-digit annualized vol), with the higher-vol equity and commodity sleeves taking proportionally smaller weights, all positive by construction.

Risk parity's advantage on a small book:

  1. No μ estimate needed. The estimator's standard error is irrelevant because risk parity does not consume μ. Mean-variance requires μ and is sensitive to its estimate's noise.
  2. Diversification is mechanically enforced. No asset gets weight > 50% by construction (in the canonical equal-risk-contribution formulation).
  3. Correlation-aware. The full ERC formulation uses the inverse of the covariance matrix, so correlation structure is respected.

Risk parity's disadvantage:

  1. Equally allocates risk regardless of edge. A high-Sharpe asset (positive μ, modest vol) gets the same risk allocation as a low-Sharpe asset (zero μ, modest vol). Mean-variance over-weights the high-Sharpe asset; risk parity doesn't.
  2. Vol is not a stationary input. Inverse-vol weights drift as realized vol drifts. The portfolio rebalances frequently; transaction costs compound.

Where mean-variance wins: large books, validated μ

Mean-variance allocates to maximize expected return per unit of risk, conditional on a μ estimate. For the canonical input the engine's tangency portfolio is the mean-variance optimum at the given risk-free rate. Two conditions make mean-variance dominate risk parity:

  1. μ is estimable with low standard error. This requires either a long tape (n ≥ 500 observations) or a strong prior (a known factor model). On a sub-100-observation tape like the engine sample, the μ standard error is the same order of magnitude as the μ estimate itself. Mean-variance on this tape is noisy, which is exactly why the reported tangency goes short an asset and lands at a negative Sharpe.
  2. The book is large enough to dominate transaction costs. Mean-variance can rebalance aggressively; for a small book the transaction cost of weight drift may exceed the alpha mean-variance is trying to capture.

The portfolio-size threshold is workflow-dependent. For retail solo books under $100k, risk parity is the safer default, μ estimation is noisy, transaction costs bite. For books above $1M with multi-year tape calibration, mean-variance can pay back. Between $100k and $1M, neither dominates; the choice flips on the buyer's confidence in their own μ estimate.

The negative-Sharpe artifact

The engine's reported Sharpes are negative across the lower half of the frontier on this sample tape because several in-sample asset returns are below the 4% risk-free rate (Bonds −4.6%, Commodities −36.4% annualized). The frontier shape is informative regardless of the Sharpe magnitudes; the relative positions of min-variance, the reported tangency, and the 61 sweep points characterize the feasible set, and the genuine max-Sharpe point (2.07) is at the high-return end.

For a real tape with positive-Sharpe assets, the engine's frontier would have a positive tangency Sharpe and a positive minimum-variance Sharpe. The structural lessons hold: min-variance allocates most weight to the lowest-vol asset (here Aggregate Bonds at 78.5%); the mean-variance optimum allocates aggressively to whichever asset has the highest Sharpe (and goes short the others if short-selling is allowed).

The choice between mean-variance and risk parity does not turn on the Sharpe sign; it turns on the μ-estimate uncertainty and the book size. The sub-100-observation tape used here is too short to estimate μ defensibly; the construct illustrates mechanics, not procurement.

When the choice stops mattering

Both methods converge on similar allocations when:

  • The asset universe is small (3-5 assets) and correlations are stable.
  • The book is large enough to make transaction-cost differences negligible.
  • The μ estimate is precise enough that mean-variance's noise penalty is small.

In these regimes the engine's tangency weights look very similar to a covariance-adjusted risk-parity allocation; the two converge as μ precision rises and as transaction costs fade. For a global-macro retail portfolio with five major asset classes and a 5-year tape, the two methods often land within 5–10% of each other on weights.

The disagreement is sharpest in the regimes where one method has structural problems: mean-variance on short tapes, risk parity on universes with one dominant alpha-generating asset that the inverse-vol allocation refuses to over-weight.

Connects to

References

  • Markowitz, H. M. (1952). "Portfolio Selection." Journal of Finance 7(1), 77–91. The original mean-variance derivation. https://www.jstor.org/stable/2975974
  • Maillard, S., Roncalli, T., & Teïletche, J. (2010). "The Properties of Equally Weighted Risk Contribution Portfolios." Journal of Portfolio Management 36(4), 60–70. The risk-parity formal treatment. https://jpm.pm-research.com/content/36/4/60
  • Black, F., & Litterman, R. (1992). "Global Portfolio Optimization." Financial Analysts Journal 48(5), 28–43. The Bayesian mean-variance extension.
  • DeMiguel, V., Garlappi, L., & Uppal, R. (2009). "Optimal Versus Naive Diversification: How Inefficient is the 1/N Portfolio Strategy?" Review of Financial Studies 22(5), 1915–1953. The empirical underdog of equal-weighting.
  • Ledoit, O., & Wolf, M. (2017). "Nonlinear shrinkage of the covariance matrix for portfolio selection." Review of Financial Studies 30(12), 4349-4388. Covariance-matrix shrinkage for mean-variance.

Verified engine output

Show the recompute-verified inputs and outputs
Inputs
name
returns › row 10.01
returns › row 20.02
returns › row 3-0.005
returns › row 40.015
returns › row 5-0.01
risk_free_annual0.04
steps60
assets › row 1 › nameUS Equities
assets › row 1 › returns (96 items)[...]
assets › row 2 › nameIntl Equities
assets › row 2 › returns (96 items)[...]
assets › row 3 › nameAggregate Bonds
assets › row 3 › returns (96 items)[...]
assets › row 4 › nameCommodities
assets › row 4 › returns (96 items)[...]
Result
columns › row 1US Equities
columns › row 2Intl Equities
columns › row 3Aggregate Bonds
columns › row 4Commodities
n96
m4
mu ann › row 10.10824677834315044
mu ann › row 20.3217256455094266
mu ann › row 3-0.04632810214601113
mu ann › row 4-0.3640822055854188
cov ann › row 1 › row 10.06005084492742633
cov ann › row 1 › row 20.02126302514959736
cov ann › row 1 › row 3-0.004521882289713158
cov ann › row 1 › row 40.0033754819244447357
cov ann › row 2 › row 10.02126302514959736
cov ann › row 2 › row 20.03980710739214078
cov ann › row 2 › row 3-0.002234536684661843
cov ann › row 2 › row 40.0027682012518907887
cov ann › row 3 › row 1-0.004521882289713158
cov ann › row 3 › row 2-0.002234536684661843
cov ann › row 3 › row 30.004720885403435526
cov ann › row 3 › row 4-0.00020612282429605238
cov ann › row 4 › row 10.0033754819244447357
cov ann › row 4 › row 20.0027682012518907887
cov ann › row 4 › row 3-0.00020612282429605238
cov ann › row 4 › row 40.04881626811906711
min var › weights › row 10.08156014102944362
min var › weights › row 20.07570121087946384
min var › weights › row 30.7847332422390177
min var › weights › row 40.05800540585207477
min var › ret ann-0.024290294458629444
min var › vol ann0.05616686728621343
min var › sharpe ann-1.1446302342450558
tangency › weights › row 10.12431145098102402
tangency › weights › row 2-0.39555685072102453
tangency › weights › row 30.8476498302855293
tangency › weights › row 40.42359556945447113
tangency › ret ann-0.30729808617875154
tangency › vol ann0.13054453310651848
tangency › sharpe ann-2.66038016234178
frontier (61 items)[...]
rf annual0.04

Computed live at build time.

Frequently asked questions

Why does the reported tangency go short an asset?
The μ estimates are noisy on a sub-100-observation tape, and on this sample no positive-excess-return combination exists at the bottom of the frontier. The tangency solver can return a degenerate point (here Sharpe −2.66) when the risk-free rate sits above achievable returns. Extend the tape or use a stronger μ prior.
Should I use the engine's tangency portfolio for live allocation?
Not on a sub-100-observation tape. Standard error of the μ estimate is too wide for stable tangency weights. Use a tape of at least 500 daily observations or a factor-model prior on μ.
Why is effective N 4.09 on a 5-asset universe?
Because the ETFs have modest pairwise correlations (avg-abs-off-diag = 0.18). The first principal component explains 36% of the variance; effective N counts assets weighted by orthogonal risk contribution, and 4.09 of 5 says the universe is well diversified.
Does the engine support more than the assets shown?
Yes, the assets array accepts any length. For a 10-asset universe the frontier has higher dimensionality but the engine still returns a 1D sweep along the frontier.
How does this compare to Black-Litterman?
Black-Litterman is mean-variance with Bayesian shrinkage on the μ estimate, combining buyer views with an equilibrium prior to reduce noise. The engine does not implement BL directly; BL is the right next step for solo retail.