Hierarchical risk parity (HRP) is a method for deciding how much of a portfolio to hold in each asset. It uses a clustering technique from machine learning to arrange assets into a tree according to how closely their returns move together, and then divides capital in stages down that tree, giving less to the riskier branch at each split. The result is a portfolio that is diversified across groups of related assets as well as within them.
The method was proposed by Marcos López de Prado in a 2016 paper in the Journal of Portfolio Management. It was designed as an alternative to classical mean-variance optimization, which often produces unstable and concentrated portfolios. HRP needs only the covariance matrix of returns and does not require that matrix to be inverted, which is the source of most of the instability in the classical approach.
The problem it addresses
Under modern portfolio theory, optimal weights are found by inverting the covariance matrix of asset returns. Inversion magnifies estimation errors. The more assets there are, and the more highly correlated they are, the worse the problem becomes. Small changes in the inputs lead to large changes in the weights, and portfolio optimization of this kind frequently does worse on new data than simply weighting assets equally. When there are more assets than observations, the matrix cannot be inverted at all.
A plain inverse-variance or risk parity allocation avoids inversion but ignores how assets relate to one another. HRP sits between the two. It uses the correlation structure, but only to group and order assets, not to solve an optimization.
The three steps
- Tree clustering. Correlations are converted into distances, and assets are merged into clusters one pair at a time, the closest first, until all are joined in a single tree. This is hierarchical clustering, a form of unsupervised learning.
- Quasi-diagonalization. The rows and columns of the covariance matrix are reordered so that similar assets sit next to each other.
- Recursive bisection. The ordered list is split in two. Capital is divided between the halves in inverse proportion to their variance. Each half is then split again, and the process repeats until every asset has a weight.
Formulas and example
The distance between two assets is derived from their correlation:
At each bisection, the share of capital given to the first of the two groups is:
- is the correlation between assets and , and is their distance, which runs from 0 to 1.
- and are the variances of the two groups, each computed with inverse-variance weights inside the group.
- is the fraction allocated to the first group. The second receives .
Two assets with a correlation of 0.8 have a distance of √(0.2 ÷ 2) = √0.1 = 0.32. Two uncorrelated assets have a distance of √0.5 = 0.71, and two with a correlation of −1 have a distance of 1.
For the allocation, suppose a split produces a group of equities with a variance of 0.04 and a group of bonds with a variance of 0.01. The equities receive 1 − 0.04 ÷ 0.05 = 0.20 of the capital and the bonds receive 0.80. Each group's share is then divided among its own members in the same way at the next level.
Properties
Because the calculation involves no matrix inversion, HRP works even when the covariance matrix is poorly estimated or cannot be inverted. Its weights change less when the inputs change, which reduces turnover at each rebalancing. Every asset receives a positive weight, so the portfolio is never concentrated in a few holdings in the way that minimum-variance portfolios often are.
Assets compete for capital mainly within their own cluster. If ten similar equity funds and two bond funds are included, the ten equity funds share the equity allocation among themselves instead of swamping the portfolio. This gives diversification that reflects the structure of the data. In the simulations reported in the original paper, HRP portfolios had lower out-of-sample variance than minimum-variance portfolios, even though minimum variance is the stated objective of the latter.
Limitations and later work
HRP uses only risk information. It takes no account of expected returns, so it is a method of risk-based asset allocation and not a way of maximizing the Sharpe ratio. It still depends on estimated variances and correlations, which shift over time and rise together in a crisis.
Design choices affect the result. Different rules for measuring the distance between clusters give different trees. The standard algorithm also splits the ordered list into two equal halves at each step, which does not always follow the natural boundaries of the clusters found in the first step. Later variants divide along the tree itself, choose the number of clusters by a statistical criterion, or replace variance with other risk measures.
Independent tests give mixed results. In some data sets HRP has outperformed classical optimization and equal weighting after costs, and in others the advantage over simple inverse-volatility weighting is small. As with any method tuned on history, there is a risk of overfitting in the choice of settings. HRP is one of several techniques grouped under AI-driven portfolio optimization, and it does not remove market risk or promise a better return.