Portfolio Construction — pfolio Academy

Hierarchical Risk Parity (HRP): a robust alternative to mean-variance optimisation

Hierarchical Risk Parity (HRP) is a portfolio optimisation method that allocates capital by exploiting the hierarchical structure of asset correlations, rather than inverting the covariance matrix as mean-variance optimisation does. Its defining advantage is robustness to estimation error—making it a practical and increasingly adopted alternative for self-directed investors building systematic portfolios.

What Hierarchical Risk Parity is

HRP was introduced by Marcos López de Prado in his 2016 paper Building Diversified Portfolios that Outperform Out-of-Sample, published in the Journal of Portfolio Management. It was designed to address a well-documented weakness of classical Modern Portfolio Theory: that inverting the covariance matrix amplifies estimation errors, producing portfolios that are theoretically optimal but practically fragile.

The method uses machine learning techniques—specifically, graph theory and hierarchical clustering—to organise assets into a tree structure based on their pairwise correlations. Assets that behave similarly are grouped together. Capital is then allocated down the tree, with similar assets sharing a budget and dissimilar clusters receiving independent allocations. This process does not require inverting the covariance matrix, and is therefore far less sensitive to noise in correlation estimates.

HRP produces a fully invested, long-only portfolio with weights that reflect the relative risk contribution of each asset and cluster. Unlike risk parity (which equalises risk contributions across all assets regardless of their relationships), HRP respects the natural groupings in the data and allocates more carefully within and across those groups.

How it works

The HRP algorithm proceeds in three steps. First, it computes the correlation matrix of asset returns and converts it into a distance matrix. Second, it applies hierarchical clustering to this distance matrix, producing a dendrogram—a tree diagram that shows which assets are most similar and how clusters relate to one another. Third, it allocates weights by recursively bisecting the tree: at each split, capital is divided between the two sub-clusters in proportion to their inverse variance (a form of risk parity applied locally within the tree).

The result is a set of weights that diversifies across clusters as well as within them. Assets that are highly correlated receive lower combined weight than they would in an unconstrained mean-variance portfolio, because the algorithm recognises that they are effectively the same source of risk. Assets in distinct clusters—with low correlation to everything else—receive proportionally higher weights, consistent with the principle that uncorrelated risk sources are valuable.

HRP does not require expected return estimates, only the covariance (or correlation) matrix. This is both a strength and a limitation: it avoids the extreme sensitivity to expected return inputs that makes MVO unstable in practice, but it also means the method cannot tilt towards assets with higher expected returns.

What the evidence shows

López de Prado (2016) tested HRP against mean-variance optimisation and inverse-variance weighting across simulated and real asset universes. HRP consistently produced lower out-of-sample volatility and higher Sharpe ratios than MVO, with the gap widening as the number of assets increased and as the quality of the covariance estimate deteriorated. The key driver of outperformance was not superior return prediction, but the avoidance of errors introduced by matrix inversion.

Subsequent research by Raffinot (2017, Hierarchical Clustering-Based Asset Allocation) extended the approach and confirmed that hierarchical methods systematically outperform classical optimisation approaches in out-of-sample tests on multi-asset portfolios, particularly over horizons of three to five years. The improvement is most pronounced during periods of market stress, when covariance estimates are least stable.

Limitations and trade-offs

HRP's primary limitation is that it is purely risk-based: it does not incorporate expected return estimates and therefore cannot target a specific return level or place a portfolio on the efficient frontier as MVO does. For investors who have high-quality return estimates—or who are managing a portfolio where expected return differences between assets are material—MVO with robust estimation may be preferable.

The method is also sensitive to the choice of linkage criterion used in the hierarchical clustering step, and different implementations may produce meaningfully different portfolios from the same data. As with any systematic method, back-tested results should be interpreted with appropriate scepticism about the degree to which they reflect real-world achievable performance.

Hierarchical Risk Parity in pfolio

HRP is one of the three portfolio construction methods available in pfolio, alongside mean-variance optimisation (default) and equal weight. It is particularly suited to investors who want systematic diversification without relying on expected return estimates that are difficult to forecast reliably. See how we build portfolios for a comparison of all three methods, and explore model portfolios at pfolio.io/portfolios.

Related articles

Disclaimer
This article constitutes advertising within the meaning of Art. 68 FinSA and is for informational purposes only. It does not constitute investment advice. Investments involve risks, including the potential loss of capital.

Get started now

It is never too early and it is never too late to start investing. With pfolio, everybody can be their own wealth manager.
pfolio — start investing for free, broker-agnostic DIY portfolio management
This website uses cookies. Learn more in our Privacy Policy