RSJ Portfolio Portfolio Optimization

← All posts

2026-10-18

What Is Hierarchical Risk Parity? A Plain-Language Explainer

What Is Hierarchical Risk Parity? A Plain-Language Explainer
portfolio optimization modern portfolio theory portfolio correlation portfolio optimization hierachical risk parity minimize volatility minimize semivariance maximize sharpe

What Is Hierarchical Risk Parity? A Plain-Language Explainer

If you have ever opened an optimizer and found hierarchical risk parity sitting in the objective dropdown next to minimum volatility and maximum Sharpe ratio, you have probably asked a very simple question: what does this thing actually do, and when should I pick it?

This article answers that in plain language. No covariance matrices to invert, no Greek letters. Just the idea, the analogy, the mechanics in one paragraph, and an honest look at what hierarchical risk parity (HRP) does and does not do for you.

The Question in Plain Language

Hierarchical risk parity is an allocation method that groups similar assets into clusters before it assigns weights. Capital is then spread across those clusters, so the portfolio ends up exposed to genuinely different sources of risk rather than to the same risk wearing five different tickers.

Contrast that with classic mean-variance optimization. Mean-variance looks at the sample of historic returns and asks: which combination of assets gives the best trade-off between return and variance? The answer is mathematically clean and, in practice, often uncomfortable — it happily piles weight onto a handful of assets whose correlations happened to look favourable in that particular sample. Change the date range by a few months and the allocation can look completely different.

HRP takes a different route. Instead of trusting the raw numbers in a large covariance matrix, it first asks which assets behave alike, then shares risk out across the resulting groups. The payoff, in one sentence: holdings that correlate weakly with each other produce a portfolio whose volatility is lower than the sum of its parts, at a broadly similar level of expected return.

This is written for investors and quants who have heard the term and want to understand it before committing to an objective in an optimizer. If that’s you, keep reading.

A Real-World Analogy: Diversifying a Team, Not Just Hiring

Imagine you are building a ten-person team. You could hire ten people with near-identical skills — ten backend developers, say. You have ten headcounts, but you have one capability. The first hard problem that falls outside backend work stops the whole group.

A stock portfolio behaves the same way. Ten positions in ten semiconductor companies look diversified on a holdings screen. On the days that matter, they move together, because they respond to the same shocks.

HRP’s clustering step is the equivalent of sorting your candidates into groups first: the backend people, the designers, the analysts, the people who talk to customers. Then it picks representatives from each group, rather than from the pool as a whole.

The “parity” part is the second half of the idea. Within and across those groups, risk is shared out rather than concentrated in whichever asset looked best in the historic sample. If one cluster is historically quiet, it does not automatically get a huge weight — it gets its share.

And the volatility link is straightforward: when the groups move for different reasons, a bad day in one group is partly offset by the others. That is the entire point. Less common movement means less portfolio volatility.

How Hierarchical Risk Parity Works Under the Hood

Three steps. That’s genuinely all you need to hold in your head.

  1. Estimate the structure. From historic end-of-day prices, compute how the candidate assets co-move — a correlation or covariance estimate.
  2. Build a hierarchy. Convert those relationships into distances and grow a tree of clusters. Assets that behave similarly sit close together on the tree; weakly related assets sit far apart.
  3. Allocate risk top-down through the tree. Split capital between the two main branches, then split each branch between its children, and keep going down. Risk is divided recursively rather than derived by inverting one large matrix.

Here is the shape of that computation, purely for intuition — you do not have to write this yourself:

import numpy as np
import pandas as pd
from scipy.cluster.hierarchy import linkage
from scipy.spatial.distance import squareform

prices = pd.read_csv("prices.csv", index_col=0, parse_dates=True)
returns = np.log(prices).diff().dropna()

# 1. structure: how do the candidates co-move?
corr = returns.corr()

# 2. hierarchy: correlation -> distance -> tree of clusters
dist = np.sqrt(0.5 * (1 - corr))
tree = linkage(squareform(dist, checks=False), method="single")

# 3. allocation: walk the tree top-down, splitting risk at every node
#    (this is the part that replaces inverting the covariance matrix)

The practical consequence of step 3 is the interesting bit. Mean-variance optimization needs the inverse of the covariance matrix, and that inverse becomes unstable when you have many assets or when several of them are highly correlated — exactly the situations where the numbers stop being trustworthy. HRP’s recursive splitting avoids that inversion entirely, which is why it tends to produce more sensible weights on long, messy candidate lists.

The statistics behind the clustering and the risk model belong in the product’s own concept documentation, not in an explainer. What matters here is the shape: cluster first, then share risk across clusters.

Why It Matters and Where It Fits

HRP is a tool for a job, not a universal winner.

  • It sits alongside several other selectable objectives — minimum volatility, maximum Sharpe ratio, minimum semi variance and conditional value at risk — each of which answers a different question.
  • It is most useful when the candidate list is long and the correlation structure is messy. That is precisely where naive equal weighting and unstable optimizers both struggle.
  • It does not remove the need for decisions. The result still depends on the risk model and the weight constraints you choose. HRP changes how risk is split, not how risk is estimated.

If you are still deciding between objectives, the sibling article on minimum volatility vs maximum Sharpe ratio covers that choice directly.

Common Misconceptions About Hierarchical Risk Parity

Four things people get wrong, and what is actually true.

  • “HRP guarantees lower volatility than any other method.” No. It is a different allocation rule. Whether it produces a lower-volatility portfolio depends on the data, the risk estimator and the constraints you select.
  • “HRP predicts returns.” It does not. It is a risk-allocation method. It has no opinion about which cluster will outperform — only about how much risk each one deserves.
  • “Clustering is a one-off.” The hierarchy is estimated from a chosen historic window. Change the date range, or change the price cleaning settings, and the grouping — and therefore the weights — can change.
  • “More assets always means better diversification.” Not if they cluster together. Ten stocks that behave as one asset still count as one bet.

Using Hierarchical Risk Parity in RSJ Portfolio

RSJ Portfolio is a Windows desktop application that builds a statistically optimized portfolio from historic end-of-day prices, and hierarchical risk parity is one of its selectable allocation methods. The optimizer is managed end to end — there is no covariance matrix to assemble and no clustering code to write.

The workflow looks like this:

  1. Configure the run. Choose the data provider, the local currency, the date range and the cleaning settings.
  2. Build a candidate list. Search for symbols and assemble the universe you want the optimizer to consider.
  3. Run the optimizer. Select the objective (hierarchical risk parity, or one of the others), the risk estimator and the weight constraints.
  4. Read the allocation. The optimizer returns the resulting weights directly. The parameters and results are documented in detail in the guide’s recommendation chapter.

Doing this the hard way means sourcing and cleaning price series, estimating correlations, building a dendrogram and coding recursive bisection by hand — the product exists so that you do not have to.

If some of your candidates are quoted in different currencies, the application has a defined conversion path; the data and currencies chapter documents it, and the dedicated article on getting multi-currency price data right covers the pitfalls.

FAQ

Is hierarchical risk parity better than minimum volatility or maximum Sharpe ratio?

Not universally. In RSJ Portfolio, hierarchical risk parity is one of several selectable objectives, alongside minimum volatility, maximum Sharpe ratio, minimum semi variance and conditional value at risk. Which one suits you depends on what you are optimizing for, and on the risk model and weight constraints you choose.

Do I need to code the clustering myself to use hierarchical risk parity?

No. RSJ Portfolio is a Windows desktop application that builds a statistically optimized portfolio from historic end-of-day prices. You configure the data provider, currency, date range and cleaning settings, build a candidate list, select the objective and parameters, and the optimizer returns the allocation. Coding the hierarchy by hand is the hard way, not a requirement.

What data does hierarchical risk parity need?

It works from historic end-of-day prices. In RSJ Portfolio you choose the data provider, the local currency and the date range, and the application applies its price cleaning pipeline and local cache before the optimizer runs. The data and currencies chapter of the user guide covers the details.

Does hierarchical risk parity guarantee a lower-volatility portfolio?

No method guarantees an outcome. Hierarchical risk parity allocates capital across clusters of weakly correlated assets, which is intended to reduce the volatility of the resulting portfolio, but the actual result depends on the historic window, the risk estimator and the weight constraints you select.

Conclusion: Try It on Your Own Candidate List

The one-line definition is worth memorising: cluster similar assets, then share risk across the clusters. Everything else — the distance metric, the linkage, the recursive splitting — is machinery in service of that idea.

The practical next step is to see what it does with your universe. Install the Windows application, work through the configuration before your first run rather than after it, and start from the recommended starting parameters instead of guessing. The guide’s getting started chapter covers the requirements, the settings worth touching first and how to read the results.

Before you run the installer, you can verify the download: the downloads page publishes a SHA-512 alongside the versioned filename.

# Compare the output against the hash published on the downloads page
Get-FileHash .\RSJPortfolio-Setup-<version>.exe -Algorithm SHA512

When you are ready for the details, the single-user license and pricing page explains what the license includes and where to check out.

Related posts

EU label: AI-generated content