Paper Explained
Build the Family Tree First: Lopez de Prado's Hierarchical Risk Parity
Markowitz's optimizer treats every asset as a potential substitute for every other one, which is why it goes haywire. HRP groups similar assets into a tree first, then allocates down the branches.
July 13, 2026
The paper
Building Diversified Portfolios that Outperform Out of Sample
Marcos Lopez de Prado · 2016
Read the original →Marcos Lopez de Prado starts from an observation that is obvious once someone says it out loud. A mean-variance optimizer, handed a covariance matrix, treats every asset as a potential substitute for every other asset. It sees no structure. It does not know that two utility stocks are more alike than a utility stock and a bitcoin. It sees only a big table of pairwise numbers, and it will happily conclude that a small tweak to one correlation means you should sell all your bonds and buy Brazilian equities.
Real portfolios are not like that. Real assets have a hierarchy: stocks and bonds are different things, within stocks there are sectors, within sectors there are similar companies. Capital does not flow freely between an emerging market bond and a US small-cap tech name the way it flows between two US small-cap tech names.
Hierarchical Risk Parity is what you get when you build that hierarchy into the allocation process instead of ignoring it.
The problem: the optimizer's three chronic diseases
Lopez de Prado names three problems with quadratic optimizers, and specifically with Markowitz's critical line algorithm.
Instability. Tiny changes to the inputs cause enormous changes to the output weights. The technical cause is that to solve for the optimal weights you have to invert the covariance matrix, and inverting a matrix that is nearly singular is numerically explosive. And covariance matrices estimated from real financial data are close to singular all the time, because assets are highly correlated with each other. The more diversified your candidate universe (that is, the more correlated assets you consider), the worse this gets. Which is a bitter irony: the optimizer becomes least reliable exactly when you offer it the most diversification opportunities.
Concentration. For all its talk of diversification, the mean-variance optimizer routinely produces portfolios concentrated in a handful of names, because it is convinced by noisy estimates that those names are special.
Underperformance. The result is that the portfolio the optimizer thinks is optimal frequently loses out of sample to portfolios built with much dumber rules.
The key idea via analogy: the corporate org chart
Suppose you have a budget to distribute across a company of 500 people. The Markowitz approach is to consider all 500 individually, in one flat pool, with a giant table of how each person's productivity relates to every other person's. It is an enormous, unstable problem, and small errors in your table produce wild swings in who gets what.
HRP does what any sane organization does: it uses the org chart.
-
Build the tree. Look at the correlation matrix and cluster assets into groups, then group the groups, and so on, producing a tree. Assets that behave alike sit on the same branch. This is standard hierarchical clustering, borrowed from machine learning, applied to a distance measure derived from correlations. You end up with something that looks like a family tree of your universe: bonds over here, defensives over there, cyclicals in this cluster, and so on. Crucially, the algorithm discovers this from the data rather than being told the sectors.
-
Reorder the matrix. Rearrange the covariance matrix so that similar assets sit next to each other. This is the "quasi-diagonalization" step, and it means the large correlations cluster near the diagonal, where you can see and use the structure.
-
Allocate down the tree, splitting at each fork. Start at the top with all your money. At the first fork, split the capital between the two branches in inverse proportion to their risk: the riskier branch gets less. Then recurse. Within each branch, split again between its two sub-branches by the same rule. Keep going until you reach individual assets.
That final step is called recursive bisection, and it is where the magic is. Assets only ever compete for capital against their siblings, not against every asset in the universe. A tech stock competes with other tech stocks for the tech budget. It does not compete directly with a Treasury bond. So an estimation error in the tech corner of your correlation matrix cannot cause the optimizer to dump your entire bond allocation.
The crucial technical point
HRP never inverts the covariance matrix. It never even requires the covariance matrix to be invertible.
This is not a minor implementation detail. Matrix inversion is the mechanism by which small input errors get amplified into huge weight swings. Remove it and you have removed the primary transmission channel for instability. It also means HRP works fine when you have more assets than observations, a situation in which the classical optimizer is not merely unreliable but mathematically undefined.
What he found
In Monte Carlo experiments, HRP delivered lower out-of-sample variance than the critical line algorithm, which is a genuinely startling result, because minimizing variance is the critical line algorithm's actual objective and HRP is not even trying to do it. The optimizer optimized for variance in-sample and then lost on variance out-of-sample to a method with no such objective. That is the estimation error problem in one sentence.
HRP also produced less risky portfolios out of sample than traditional inverse-variance risk parity, and portfolios that were far more diversified in practice, with much lower turnover, since a small change in inputs produces a small change in weights rather than a wholesale reshuffle.
Why it mattered
- It is a genuinely new construction principle. Most portfolio construction methods since Markowitz are variations on "same optimizer, better inputs": shrink the covariances, add a Bayesian prior, impose constraints. HRP is a different animal. It changes the algorithm, not the estimates.
- It brought machine learning into portfolio construction in a useful way. Not as a return-prediction black box, which is where most ML in finance fails, but as a tool for discovering structure. Clustering is used here for what clustering is genuinely good at.
- It is robust by construction rather than by patching. The stability comes from the algorithm's structure, not from adding regularization to a fragile method.
- It is widely implemented. HRP is available in mainstream portfolio libraries and is used in practice, which is more than most academic portfolio methods can claim.
The honest limitations
- It is a heuristic, not an optimum. HRP does not solve a stated optimization problem. There is no theorem saying the resulting portfolio is best in any well-defined sense. It is a sensible recipe that empirically behaves well, which is a different kind of claim, and some academics find that unsatisfying.
- The results depend on choices you make. Which clustering linkage method? Which distance metric? Where do you cut the tree? These are user choices and different choices give different portfolios. The method has fewer knobs than a full optimizer, but it is not knob-free.
- The evidence started as Monte Carlo. The original demonstration was simulation-based, and simulations are built from assumptions. Independent out-of-sample evidence on real assets is more mixed, with some studies finding HRP competitive and others finding it does not beat simpler risk parity or even equal weighting by much.
- It still needs a correlation matrix. HRP is far less sensitive to correlation errors than Markowitz, but it is not immune. The tree itself is estimated from correlations, and a badly estimated tree gives you a badly structured allocation.
- Ignoring expected returns is a feature and a cost. Like all risk-based methods, HRP declines to use return forecasts. That is a great defense against the worst input errors, but if you genuinely do have information about returns, HRP has no way to use it.
The one-line takeaway
Lopez de Prado's Hierarchical Risk Parity replaces the flat, everything-competes-with-everything logic of the Markowitz optimizer with a tree of similar assets, allocating risk down the branches, which removes the matrix inversion that makes classical optimization explode and produces portfolios that are more stable and, remarkably, often lower-risk out of sample than the ones explicitly optimized for low risk.