Free Tools & Code Worked Examples Home Markets News Equities Quantum Papers Microstructure About
HomeLearn › HRP vs mean-variance optimisation

HRP vs mean-variance optimisation

Short answer

Mean-variance optimisation finds mathematically optimal weights for the inputs you give it, but it requires inverting a covariance matrix, which makes it extremely sensitive to estimation error — small changes in expected returns produce wildly different, highly concentrated portfolios. Hierarchical Risk Parity (HRP) avoids matrix inversion entirely: it clusters assets by correlation, then allocates risk down the resulting tree. HRP is usually more stable out of sample; mean-variance is usually better in sample. Neither is universally better.

Why mean-variance misbehaves

Markowitz optimisation solves for weights using the inverse covariance matrix. That inversion is the problem. Covariance matrices estimated from finite samples are close to singular when assets are highly correlated — which they are, especially in stress — and inverting a near-singular matrix amplifies estimation noise enormously.

The practical symptoms are well documented: extreme long-short weights, concentration in a handful of assets, and instability where re-estimating on one extra month of data reshuffles the whole portfolio. Michaud's description of the optimiser as an “error maximiser” captures it: the assets with the most overstated returns and understated risk get the largest weights, precisely because their estimates are wrong.

What HRP does instead

HRP, introduced by López de Prado, replaces optimisation with three deterministic steps. It never inverts a matrix at any point, and it requires no expected-return vector — which removes the two inputs that cause most of the trouble above.

1. TREE CLUSTERING Convert the correlation matrix to a distance metric d(i,j) = sqrt( 0.5 * (1 - rho(i,j)) ) and build a hierarchical clustering tree. 2. QUASI-DIAGONALISATION Reorder the covariance matrix so that similar assets sit adjacent. Large values move toward the diagonal; the structure becomes visible. 3. RECURSIVE BISECTION Walk the tree top-down. At each split, allocate between the two sub-clusters inversely to their variance: alpha = 1 - Var(L) / ( Var(L) + Var(R) ) Recurse until every leaf holds a single asset.

The distance transform matters more than it looks. Raw 1 − rho is not a metric — it violates the triangle inequality, so clustering on it can produce trees that contradict themselves. The square-root form above is a proper metric, which is what makes the hierarchy well defined.

Does HRP produce negative weights?

No. HRP as specified is long-only: recursive bisection multiplies positive fractions down the tree, so every weight is positive and they sum to 1 by construction. There is no short book to constrain away. Unconstrained mean-variance, by contrast, routinely returns large offsetting long and short positions — in the comparison below it produced an 11% short book on a long-only universe.

Direct comparison

Mean-varianceHRP
Requires expected returnsYesNo
Inverts covariance matrixYesNo
Behaviour with correlated assetsDegrades sharplyHandles via clustering
Typical concentrationHighLower
Turnover on re-estimationHighLower
In-sample efficiencyOptimal by constructionSub-optimal by construction
Out-of-sample varianceOften worseOften better
Guaranteed better live?No. Depends on the universe, estimation window and rebalancing rule.

So is HRP better?

Not unconditionally, and claims that it is should be treated sceptically. What the evidence supports is narrower and more useful: HRP tends to produce lower out-of-sample variance and lower turnover than unconstrained mean-variance on correlated, realistically sized universes. That advantage comes from not needing the inputs that are hardest to estimate, not from any claim to superior returns.

Two honest caveats. First, much of mean-variance's practical failure is addressed by constraints, shrinkage estimators such as Ledoit-Wolf, or resampling — a well-regularised mean-variance portfolio is a much stronger opponent than the textbook version. Second, HRP has free parameters of its own: the linkage method and distance metric change the tree, and therefore the weights.

Limitations

References

Related