- Published on
Hierarchical Risk Parity, A Modern Portfolio Construction Method
- Authors
- Name
- Tails Azimuth
Table of Contents
Hierarchical Risk Parity: A Modern Portfolio Construction Method
We present a cutting-edge method for constructing financial portfolios, called Hierarchical Risk Parity (HRP). This method overcomes challenges posed by traditional techniques, by using modern mathematics and machine learning. HRP works in three steps: Tree Clustering, Quasi-Diagonalization, and Recursive Bisection. The approach is based on the information in the covariance matrix without requiring its inversion, and it works even with singular matrices.
Tree Clustering
Given a matrix of observations , we first generate a correlation matrix. A distance measure is defined, and an distance matrix is created.
We use tree structures to hierarchically cluster financial assets. The goal is to group together the closest financial assets in terms of their distance measure, providing a hierarchical structure that represents the similarities between the assets.
In mathematical terms:
The algorithm performs clustering based on a new distance measure , which computes the distance between column vectors of . Eventually, we create clusters by minimizing .
Python | Julia |
---|---|
|
|
Quasi-Diagonalization
The next stage rearranges the covariance matrix to group similar investments together along the diagonal. The result is a quasi-diagonal matrix that simplifies the allocation of investments.
Python | Julia |
---|---|
|
|
Recursive Bisection
The last stage is the allocation of assets, leveraging the quasi-diagonal matrix. The algorithm recursively bisects the sorted list of original items into subsets and allocates investments in inverse proportion to their aggregated variances.
The algorithm follows:
- Initialize list of items and assign a unit weight to all items .
- For each subset with more than one item:
- Bisect into two subsets and .
- Define the variance of each subset based on the covariance matrix of its constituents.
And so, the portfolio is constructed.
Python | Julia |
---|---|
|
|
Comparing Portfolio Risk Strategies: HRP vs. CLA vs. IVP
This blog presents a Monte Carlo simulation study comparing three portfolio allocation strategies: Hierarchical Risk Parity (HRP), Critical Line Algorithm (CLA), and Inverse Variance Portfolio (IVP). We find that while CLA aims for the lowest in-sample risk, it performs the worst in out-of-sample tests. Specifically, HRP yields the lowest out-of-sample variance, making it preferable for risk parity investors who often employ leverage.
Key Findings:
- HRP portfolios have 72.47% lower variance than CLA portfolios and 38.24% lower variance than IVP portfolios.
- HRP improves the out-of-sample Sharpe ratio of a CLA strategy by about 31.3%.
Methodology
Three key steps are followed:
- Generate 10 series of random Gaussian returns for 520 observations (equivalent to 2 years of daily history), with random shocks and correlation structure.
- Compute HRP, CLA, and IVP portfolios looking back at 260 observations (a year of daily history).
- Rebalance portfolios every 22 observations (equivalent to a monthly frequency).
This procedure is repeated 10,000 times.
Python | Julia |
---|---|
|
|
Insights and Interpretations
- CLA's optimization program aims for the lowest variance but ends up with the highest out-of-sample variance.
- IVP disregards the correlation structure, which affects its performance.
- HRP combines diversification across all investments and clusters of investments, making it more robust to both common and idiosyncratic shocks.
Flexibility and Scalability
The HRP method is flexible and allows for variations. It can incorporate forecasted returns and other econometric methods.
Python | Julia |
---|---|
|
|
Mathematical Insight
In simpler terms, let's consider two vectors and . The correlation variable is used to derive a distance measure defined as:
This distance measure is proven to be a true metric, providing a robust way to measure how similar or different two portfolios are.
References
- De Prado, M. L. (2018). Advances in financial machine learning. John Wiley & Sons.
- De Prado, M. M. L. (2020). Machine learning for asset managers. Cambridge University Press.