# Hierarchical Risk Parity

Hierarchical Risk Parity (HRP) is a portfolio optimization framework developed in 2016 by Marcos López de Prado that uses graph theory and machine learning to construct diversified portfolios, addressing limitations of traditional mean-variance optimization.

Hierarchical Risk Parity (HRP) is an advanced investment portfolio optimization framework developed in 2016 by Marcos López de Prado. It is a probabilistic graph-based alternative to the prevailing mean-variance optimization (MVO) framework introduced by Harry Markowitz. HRP algorithms apply discrete mathematics and machine learning techniques to create diversified and robust investment portfolios that outperform MVO methods out-of-sample. The framework aims to address the limitations of traditional portfolio construction methods, particularly when dealing with highly correlated assets. Following its publication, HRP has been implemented in numerous open-source libraries and has received multiple extensions.

## Key Features

HRP portfolios have been proposed as a robust alternative to traditional quadratic optimization methods, including the Critical Line Algorithm (CLA) of Markowitz. HRP addresses three central issues commonly associated with quadratic optimizers: numerical instability, excessive concentration in a small number of assets, and poor out-of-sample performance.

HRP leverages techniques from graph theory and machine learning to construct diversified portfolios using only the information embedded in the covariance matrix. Unlike quadratic programming methods, HRP does not require the covariance matrix to be invertible. Consequently, HRP remains applicable even in cases where the covariance matrix is ill-conditioned or singular, conditions under which standard optimizers fail.

Monte Carlo simulations indicate that HRP achieves lower out-of-sample variance than CLA, despite the fact that minimizing variance is the explicit optimization objective of CLA. Furthermore, HRP portfolios exhibit lower realized risk compared to those generated by traditional risk parity methodologies. Empirical backtests have demonstrated that HRP would have historically outperformed conventional portfolio construction techniques.

Algorithms within the HRP framework are characterized by the following features:

- **Machine Learning Approach**: HRP employs hierarchical clustering, a machine learning technique, to group similar assets based on their correlations. This allows the algorithm to identify the underlying hierarchical structure of the portfolio and avoid errors spreading through the entire network.
- **Risk-Based Allocation**: The algorithm allocates capital based on risk, ensuring that assets only compete with similar assets for representation in the portfolio. This approach leads to better diversification across different risk sources while avoiding the instability associated with noisy returns estimates.
- **Covariance Matrix Handling**: Unlike traditional methods like Mean-Variance Optimization, HRP does not require inverting the covariance matrix. This makes it more stable and applicable to portfolios with a large number of assets, particularly when the covariance matrix's condition number is high.

## The Problem: Markowitz's Curse

Portfolio construction is perhaps the most recurrent financial problem. On a daily basis, investment managers must build portfolios that incorporate their views and forecasts on risks and returns. Despite the theoretical elegance of Markowitz's mean-variance framework, its practical implementation is hindered by several limitations that undermine the reliability of solutions derived from the Critical Line Algorithm. A principal concern is the high sensitivity of optimal portfolios to small perturbations in expected returns: even minor forecasting errors can result in significantly different allocations. Given the inherent difficulty of producing accurate return forecasts, numerous researchers have advocated for approaches that forgo expected returns entirely and instead rely solely on the covariance structure of asset returns. This has given rise to risk-based allocation methods, among which risk parity is a widely cited example.

While eliminating return forecasts mitigates some instability, it does not eliminate it. Quadratic programming techniques employed in portfolio optimization require the inversion of a positive-definite covariance matrix, meaning all eigenvalues must be strictly positive. When the matrix is numerically ill-conditioned, that is, when the ratio of its largest to smallest eigenvalue (its condition number) is large, matrix inversion becomes unreliable and prone to significant numerical errors.

The condition number of a covariance, correlation, or any symmetric (and thus diagonalizable) matrix is defined as the absolute value of the ratio between its largest and smallest eigenvalues in modulus. A diagonal correlation matrix, which is equal to its own inverse, exhibits the minimum possible condition number.

As the number of correlated (or multicollinear) assets in a portfolio increases, the condition number rises. At high levels, this leads to severe numerical instability, whereby slight modifications in any matrix entry may result in drastically different inverses. This phenomenon, often referred to as Markowitz's curse, encapsulates the paradox wherein increased correlation among assets heightens the theoretical need for diversification yet simultaneously increases the likelihood of unstable optimization outcomes. Consequently, the potential benefits of diversification are frequently overshadowed by estimation errors.

These problems are exacerbated as the dimensionality of the covariance matrix increases. The estimation of each covariance term consumes degrees of freedom, and in general, a minimum of 1/2 N(N+1) independent and identically distributed (IID) observations is required to estimate a non-singular covariance matrix of dimension N. For example, constructing an invertible covariance matrix of dimension 50 necessitates at least five years of daily IID observations. However, empirical evidence suggests that the correlation structure of financial assets is highly unstable over such extended periods. These difficulties are highlighted by the observation that even naïve allocation strategies, such as equally weighted portfolios, have frequently outperformed both mean-variance and risk-based optimizations in out-of-sample tests.

## The Solution: Hierarchical Risk Parity

The HRP algorithm addresses Markowitz's curse in three steps:

1. **Hierarchical Clustering**: Assets are grouped into clusters based on their correlations, forming a hierarchical tree structure.
2. **Quasi-Diagonalization**: The correlation matrix is reordered to place similar assets together along the diagonal, exploiting the block structure of the clustered tree.
3. **Recursive Bisection**: Capital is allocated recursively down the tree, splitting weights inversely proportional to the variance of each cluster, ensuring that risk is distributed across clusters and assets.

This three-step process allows HRP to bypass the need for matrix inversion and to exploit the hierarchical structure of asset correlations, leading to more stable and diversified portfolios.

## Extensions and Implementations

Since its introduction, HRP has been implemented in numerous open-source libraries, making it accessible to practitioners and researchers. These implementations often include variations and extensions, such as incorporating different clustering algorithms, handling missing data, or integrating with other risk management techniques. The framework has also been extended to address dynamic portfolio rebalancing and to incorporate alternative risk measures beyond variance.

The versatility of HRP has made it a popular choice in quantitative finance, particularly for portfolios with a large number of assets where traditional optimizers struggle. Its reliance on machine learning and graph theory aligns with broader trends in [artificial-intelligence](https://www.wikiprompt.org/wiki/artificial-intelligence) and [machine-learning](https://www.wikiprompt.org/wiki/machine-learning) applications in finance.

## Reception and Impact

HRP has been well-received in the financial community as a practical solution to the limitations of Markowitz's framework. Its emphasis on robustness and out-of-sample performance has resonated with practitioners who face real-world constraints such as estimation error and market instability. The framework's ability to handle ill-conditioned covariance matrices has been particularly valued in high-dimensional settings, where traditional methods often fail.

While HRP is not without its critics, who point to its reliance on historical correlations and the potential for overfitting in clustering, it has nonetheless established itself as a significant contribution to portfolio optimization. Its development reflects a broader shift toward incorporating computational and machine learning techniques in finance, a trend that continues to evolve with advances in [deep-learning](https://www.wikiprompt.org/wiki/deep-learning) and [generative-ai](https://www.wikiprompt.org/wiki/generative-ai).

As of the current state of knowledge, HRP remains an active area of research, with ongoing work exploring its theoretical foundations and practical refinements. Its impact is evident in the proliferation of open-source tools and the growing body of literature that builds upon its principles.

## External links

- [Wikipedia: Hierarchical Risk Parity](https://en.wikipedia.org/wiki/Hierarchical_Risk_Parity)

---
Source: https://www.wikiprompt.org/wiki/hierarchical-risk-parity
License: CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/)
Last updated: 2026-09-14T06:30:05.408289+00:00
