What Is Hierarchical Risk Parity? A Plain-Language Explanation
Most portfolio conversations start with which stocks to buy. The harder question arrives immediately afterwards: how much of each?
Answer that with the textbook method — mean-variance optimization — and you often get something that looks wrong. A handful of positions absorb most of the capital. The weights shift noticeably when you move the start date by a month. Nothing in the output explains why the allocator fell in love with one particular stock.
Hierarchical risk parity (HRP) is a different answer to the sizing question, built specifically for that failure mode. It is also one of the allocation methods you can select in RSJ Portfolio without writing code. This article explains what HRP does, how it works, and when it beats the classics.
The Question, in Plain Language
Hierarchical risk parity is an asset allocation method that groups similar assets into clusters, then spreads risk across those clusters rather than across individual assets.
The “hierarchical” part is what separates HRP from ordinary risk parity. Traditional risk parity hands every asset an equal share of portfolio risk and ignores the fact that two banks, two semiconductor makers and two oil majors are not independent bets. HRP looks at correlations first, builds a hierarchy of similar assets, and only then decides how much capital each group receives.
Why bother? Because mean-variance optimization inverts the covariance matrix of returns. Inversion is unforgiving with noisy inputs. Correlation and variance estimates come from limited history, and when several assets move together the matrix approaches singularity. Inverting a near-singular matrix amplifies noise instead of cancelling it — which is exactly why optimized portfolios concentrate into a few positions and reshape themselves on every re-run. HRP never inverts the matrix. It works with distances and a tree.
# Mean-variance optimization: needs expected returns plus a matrix inverse
# w = argmax( mu @ w - lambda * w.T @ Sigma @ w ) # mu is the noisy input here
# Hierarchical risk parity: same covariance data, no mu, no inverse
# 1. cluster assets by correlation
# 2. bisect the tree
# 3. allocate across clusters in inverse proportion to their variance
The payoff is a portfolio that is diversified by construction and typically less volatile than either a naive equal-weight basket or a fragile mean-variance result — with no return forecast required. For the mechanics behind that, see Correlation and Volatility: A Long-Term Investor’s Guide.
A Real-World Analogy: Building a Team, Not a Roster
Think about assembling a football squad. You do not field five star strikers, even if strikers are the ones who score. A team needs a goalkeeper, defenders, midfielders — roles whose weaknesses are covered by the other roles. When the attack has a bad day, the defence is still doing its job.
Assets behave the same way:
- Two stocks in the same sector are two strikers. They share a skill set, so they fail together.
- A utility and a growth tech name are a defender and a striker. Different failure modes, different conditions.
- Twenty highly correlated stocks are a roster, not a team. It looks diversified on the holdings screen and behaves like one position during a drawdown.
HRP first sorts the squad by role — that is the clustering step, and the roles are determined purely by how the assets’ returns move together. Then it hands out playing time: capital is distributed so no single cluster dominates the risk budget. A group of five near-identical stocks counts as one unit, so none of those five can double-count the others’ risk.
Two caveats:
- The grouping reacts to downside behaviour. Assets that crash together land in the same cluster, because the correlation estimate includes the bad days, not just the calm ones.
- The analogy strains once volatilities diverge. A low-volatility cluster and a high-volatility cluster are not interchangeable players, and HRP handles that by weighting clusters inversely to their variance. The clustering idea survives even where the sports metaphor does not.
How HRP Works Under the Hood (Briefly)
Four steps, in order.
Step 1 — Estimate a correlation (or covariance) matrix from historical returns. This is the only input. There is no expected-return vector.
Step 2 — Convert correlation into distance and build a tree. Correlation is not a distance: identical assets have correlation 1 but should have distance 0. The standard transform is:
import numpy as np
# returns: T x N matrix of historical returns, one column per asset
corr = np.corrcoef(returns, rowvar=False)
dist = np.sqrt(0.5 * (1.0 - corr)) # 0 for identical assets, 1 for perfectly opposed
A hierarchical clustering algorithm (single, average or complete linkage) then merges the closest assets pairwise into a dendrogram — a tree whose lowest branches hold the most similar assets.
Step 3 — Quasi-diagonalize the covariance matrix. Reorder rows and columns so similar assets sit next to each other. The numbers do not change; the matrix simply stops being shuffled, which is what makes the structure readable.
Step 4 — Recursively bisect the tree and allocate. Split the tree in two, measure the variance of each half, assign capital to the halves in inverse proportion to that variance, then repeat inside each half until you reach individual assets.
That is the whole algorithm, and two properties fall out of it: HRP is deterministic (same data in, same weights out), and it never needs a return forecast. It is not the only risk-based method worth knowing — Minimum Volatility vs Maximum Sharpe Ratio: Which to Choose? covers the trade-offs between two alternatives.
Doing this by hand means wiring up a linkage function, a quasi-diagonalization and your own recursive bisection — the hard way. RSJ Portfolio ships HRP as a selectable objective, alongside minimum volatility, maximum Sharpe ratio, minimum semi variance and conditional value at risk, so you can compare methods on identical inputs.
Why It Matters: Stability, Diversification, and Downside Protection
- Less estimation error. No matrix inversion means the result is far less sensitive to a noisy correlation estimate. Small changes in the data produce small changes in the weights.
- Diversification that bites. Equal weighting spreads capital; HRP spreads risk across correlated groups, which is what actually moves portfolio volatility.
- Downside awareness. Clustering on correlation puts assets that fall together in crises on the same branch, so the allocator refuses to over-commit to them.
- It scales. HRP still produces weights when the number of assets approaches or exceeds the number of observations — the case where covariance inversion breaks down.
- It composes with other choices. In RSJ Portfolio you select HRP as the objective and pair it with one of eight risk models, so the risk estimator can be matched to your data instead of assumed.
Common Misconceptions About HRP
“HRP is just equal weighting with extra steps.” No. Equal weighting gives every asset the same weight. HRP derives each asset’s weight from its cluster’s variance, so a quiet, low-volatility branch receives more capital than a volatile one. The weights are generally unequal — that is the point.
“HRP ignores returns entirely.” It ignores expected returns, which is a deliberate trade rather than an oversight, because forecasts are the noisiest input in the classic framework. You can still layer constraints or return views on top of the risk-based allocation.
“HRP only makes sense for large portfolios.” It runs on small candidate lists too. The diversification benefit simply grows as the number of weakly related assets grows.
“HRP is a black box.” The opposite. The dendrogram is inspectable, the linkage rule is explicit, and the algorithm is deterministic. You can point at a branch and explain why those assets ended up together.
“HRP replaces mean-variance optimization.” It is a robust alternative for the situation where the inputs are unreliable — which, with real historical data, is most of the time. It is not a claim that return forecasting is worthless.
How RSJ Portfolio Makes HRP Practical
Implementing HRP is the easy part. Supplying it with clean, comparable price history is the work — and that is the layer RSJ Portfolio handles for you, as a Windows desktop application with a single-user license.
The workflow:
- Build a candidate list. Search symbols and assemble the stocks you are considering.
- Choose HRP as the allocation method, then select a risk model and your weight constraints.
- Set data range and local currency, and let the software fetch prices from the supported data providers.
- Run the optimizer and read the resulting allocation together with the cluster structure behind it.
- Export the allocation when you want to take the result further.
Data fetching, price cleaning, caching and currency conversion happen automatically, so there is no pipeline to build. Install the app from the downloads page — and verify the hash first:
# After downloading the installer from the downloads page:
# compare the printed hash with the SHA-512 published next to the versioned filename.
Get-FileHash .\RSJ-Portfolio-Setup.exe -Algorithm SHA512
For parameters, the user guide’s recommendation chapter covers the optimizer settings and results; the concept chapter covers the statistical background. The features page lists every allocation method and all eight risk models.
FAQ
How is HRP different from traditional risk parity?
Traditional risk parity allocates risk equally across all assets, ignoring correlations. HRP first clusters assets by correlation, then allocates risk across clusters, so it avoids overconcentrating in highly correlated groups. That makes HRP more robust when assets are not independent.
Do I need to forecast returns to use HRP?
No. HRP is a risk-based allocation method that uses only the covariance or correlation matrix of historical returns. It does not require expected return forecasts, which are often noisy and unreliable. This is one of its main advantages over mean-variance optimization.
Can HRP be used with any asset class?
Yes, HRP is agnostic to asset class. It works with stocks, bonds, commodities, or any set of assets for which you have historical price data. The clustering step simply groups assets by their return correlation, regardless of what they are.
How does RSJ Portfolio implement HRP?
RSJ Portfolio includes HRP as one of its selectable allocation methods. You build a candidate list, choose HRP as the objective, select a risk model and weight constraints, and the software computes the allocation. It handles data fetching, cleaning and currency conversion automatically, so you can focus on analysis.
Conclusion: Where HRP Fits in Your Toolkit
HRP is a clustering-based allocation method that reduces volatility by diversifying across correlated groups, not just across tickers. You give up the expectation of return forecasting in exchange for stability: no matrix inversion, no fragile weights, no dependence on the noisiest input in the pipeline.
It suits investors who want a data-driven, reproducible allocation and are honest about how little they know about next year’s returns. If your candidate list is full of stocks that move together — and most watchlists are — HRP is the more defensible way to size them. To see how it behaves on your own list, download the installer from the downloads page and run it as the objective, or start with the user guide to set your parameters deliberately.
Related posts
- Correlation and Volatility: A Long-Term Investor’s Guide
- Minimum Volatility vs Maximum Sharpe Ratio: Which to Choose?
- How to Build a Low Correlation Stock Portfolio, Step by Step