Hierarchical Risk Parity
Using machine learning and graph theory to build resilient portfolios without matrix inversion.
What is it?
Hierarchical Risk Parity (HRP) is a modern portfolio optimization technique developed by Marcos López de Prado. It uses machine learning—specifically hierarchical clustering—to group similar investments together and allocate risk downwards through the "tree" of assets.
How It Works
Unlike traditional Mean-Variance Optimization, HRP does not require the inversion of a covariance matrix (a mathematical step that often leads to extreme, unstable weights in traditional models). Instead, it follows a robust 3-step process:
- Tree Clustering: HRP first determines the distances (correlations) between all assets in the portfolio and builds a hierarchical tree mapping out which assets behave most similarly to each other.
- Quasi-Diagonalization: The algorithm reorganizes the covariance matrix based on the clustering tree, so similar investments are placed close to each other along the diagonal.
- Recursive Bisection: The algorithm splits the tree top-down, allocating risk inversely proportional to the variance at each branch level. High-variance branches get lower weights, and risk is ultimately distributed equally across the main independent clusters.
Why It Matters
Because HRP groups assets by clusters rather than treating the whole market as one interconnected web, a shock to single asset like Tesla only affects its immediate peers (e.g., other high-beta tech stocks). Traditional optimizers would aggressively shift weights across the entire portfolio as correlations break down. HRP portfolios are therefore drastically more stable and computationally robust out-of-sample.
Run Machine Learning Optimization
Generate a Hierarchical Risk Parity tree mathematically aligned to your custom portfolio. Build robust allocations today.
Optimize Portfolio