Knowledge base · Risk Parity & Portfolio Construction

Hierarchical Risk Parity, step by step

HRP Deep Dive · By · 8 October 2026 · 11 min read

If you trade more than one instrument or strategy inside a prop account, you are already running a portfolio. The drawdown limit applies to the sum of everything you hold. Allocating that limited risk budget badly is how a trader with three decent strategies still breaches a 6% floor.

Classic mean-variance optimisation answers the allocation question by inverting the covariance matrix. In practice that inversion is unstable: small estimation errors in correlation produce wild swings in weights. Hierarchical Risk Parity (HRP), introduced by Marcos López de Prado in 2016, avoids the inversion altogether. It builds a tree of how assets relate, then splits risk down that tree.

This article walks through the four steps on a sample of eight futures-style return series: equity indices (ES, NQ), Treasuries (ZN, ZB), metals (GC, SI) and energy (CL, NG). The returns are simulated from a factor model so the build is reproducible. Every figure below is produced by the same TypeScript that ships with this site, so the numbers are real outputs, not illustrations.

Step 1: correlation to distance

Start with the correlation matrix of returns. In the order the data arrived, it looks like noise.

GCESZNCLNQSIZBNGGCESZNCLNQSIZBNG1.000.08-0.030.060.060.83-0.03-0.010.081.00-0.050.040.830.04-0.090.08-0.03-0.051.00-0.01-0.040.000.82-0.020.060.04-0.011.000.020.05-0.020.820.060.83-0.040.021.000.03-0.060.040.830.040.000.050.031.00-0.02-0.02-0.03-0.090.82-0.02-0.06-0.021.00-0.02-0.010.08-0.020.820.04-0.02-0.021.00
Fig. 1 · Correlation matrix of 8 futures-style return series in arbitrary order. White = positive, amber = negative.

Correlation is not a distance: it runs from −1 to 1, and it does not satisfy the triangle inequality. HRP converts it with

dij = √(½ (1 − ρij))

which maps ρ = 1 to a distance of 0 and ρ = −1 to a distance of 1. Two series that move together are now close.

GCESZNCLNQSIZBNGGCESZNCLNQSIZBNG0.000.680.720.690.690.290.720.710.680.000.730.690.290.690.740.680.720.730.000.710.720.710.300.710.690.690.710.000.700.690.710.300.690.290.720.700.000.700.730.690.290.690.710.690.700.000.710.710.720.740.300.710.730.710.000.710.710.680.710.300.690.710.710.00
Fig. 2 · Correlation distance d = √(½(1 − ρ)). 0 means perfectly correlated, 1 means perfectly anti-correlated.

López de Prado then takes one more step: the Euclidean distance between each pair of columns of that matrix. Two assets end up close if they have similar distances to everything else, which makes the clustering less sensitive to a single noisy pairwise estimate.

Step 2: tree clustering

With distances in hand, single-linkage agglomerative clustering repeatedly merges the two closest clusters until one remains. The result is a tree, or dendrogram.

ZNZBCLNGGCSIESNQ
Fig. 3 · Single-linkage tree. Branch height is the distance at which two clusters merge.

Read it from the bottom. Assets that join low on the tree behave alike. Here ES and NQ pair off immediately, as do ZN and ZB, GC and SI, CL and NG. The tree recovered the four factor groups without being told they exist.

Step 3: quasi-diagonalisation

The tree gives an ordering of its leaves. Reordering the rows and columns of the correlation matrix by that ordering moves similar assets next to each other, so large correlations collect along the diagonal.

ZNZBCLNGGCSIESNQZNZBCLNGGCSIESNQ1.000.82-0.01-0.02-0.030.00-0.05-0.040.821.00-0.02-0.02-0.03-0.02-0.09-0.06-0.01-0.021.000.820.060.050.040.02-0.02-0.020.821.00-0.01-0.020.080.04-0.03-0.030.06-0.011.000.830.080.060.00-0.020.05-0.020.831.000.040.03-0.05-0.090.040.080.080.041.000.83-0.04-0.060.020.040.060.030.831.00
Fig. 4 · The same matrix, rows and columns reordered by the tree. The block structure appears on the diagonal.

This is the matrix from Figure 1. Nothing about the data changed, only the order. Strong within-block correlation, weak between-block correlation is now visible at a glance. The step is called quasi-diagonalisation because the matrix is not literally diagonal, but its mass is concentrated near the diagonal.

Step 4: recursive bisection

Now allocate. Start with every asset at weight 1. Split the ordered list into two halves. For each half compute its variance using inverse-variance weights inside it. Give each half a share of the parent’s weight in inverse proportion to its variance:

α = 1 − Vleft / (Vleft + Vright)

The left half’s weights are multiplied by α and the right half’s by 1 − α. Then repeat inside each half until every asset stands alone.

ZNZBCLNGGCSIESNQ50.4%18.2%2.8%1.3%10.9%3.5%8.0%4.8%
Fig. 5 · Recursive bisection splits risk down the tree. Bars are final HRP weights.

Because the ordering came from the tree, each split separates groups that are genuinely different. Risk is shared between clusters first and only then between members of a cluster. No matrix is ever inverted.

AssetAnn. vol (rel.)EqualInverse-varianceMin-varianceHRP
ZN0.4512.5%47.8%92.5%50.4%
ZB0.7512.5%17.2%-22.4%18.2%
CL1.9012.5%2.7%3.5%2.8%
NG2.8012.5%1.2%-0.6%1.3%
GC0.9012.5%11.9%25.8%10.9%
SI1.6012.5%3.8%-8.5%3.5%
ES1.0012.5%9.7%10.5%8.0%
NQ1.3012.5%5.7%-0.8%4.8%
Table 1 · HRP weights against equal weight, inverse-variance and unconstrained minimum-variance. Negative weight = short.

Compare the columns. Equal weight gives NG the same capital as ZN although NG is about six times as volatile, so NG dominates the risk. Minimum-variance is the textbook optimum, and it shows exactly why practitioners distrust it: it puts over 90% in ZN and shorts ZB to hedge it, a leveraged spread bet built on one correlation estimate. Nudge that estimate and the trade flips.

HRP stays long-only, keeps every cluster in the portfolio and lands close to inverse-variance here, because these clusters barely correlate with each other. That closeness is the point: HRP gets the diversification of a risk-based allocation without the instability of an inverse. Its edge over inverse-variance grows when clusters do overlap, because it budgets risk to a cluster as a whole before splitting it among members, and López de Prado’s out-of-sample tests show lower realised variance than both alternatives.

What this means inside a prop account

You probably do not hold ten futures at once in a challenge. The same logic applies to strategies. Treat each strategy’s daily P&L as a return series and run the four steps:

  1. Two strategies that both buy breakouts on index futures will join low on the tree. Size them as one risk unit, not two.
  2. A mean-reversion strategy on rates will sit on a different branch. It deserves its own share of the drawdown budget.
  3. Recursive bisection then tells you how much of your daily loss limit each cluster should be allowed to use.

The result is a risk budget that respects how your strategies actually co-move, which is exactly what a hard drawdown floor punishes you for getting wrong.

Limits worth knowing

  • HRP uses historical correlation. Correlations jump towards 1 in stress, so the tree you estimate in calm markets can understate concentration in a crash.
  • The bisection splits the ordered list in halves, not along the tree’s own branches. Variants such as HERC follow the tree more faithfully.
  • With very short histories (a few weeks of strategy P&L) every estimate is noisy. Use as long a window as your strategies have existed.

Reference: López de Prado, M. (2016). Building Diversified Portfolios that Outperform Out of Sample. Journal of Portfolio Management, 42(4).

Next in the series: running HRP on your own strategy P&L in Python, and how to turn the weights into per-strategy daily loss limits.

Education only, not financial advice. Trading carries a high risk of loss.

Keep reading
Prop Firm Strategy

Best Futures Prop Firms in 2026: Pick Rules, Not Hype

Compare the best futures prop firms in 2026 by drawdown, payout rules and trading style. Check the fine print before you buy an evaluation.

11 min read · 25 Oct 2026
Prop Firm Strategy

How to Pass the FundedNext Futures Challenge: A Risk Plan for Every Account Size

Compare FundedNext Futures Challenge targets, trailing drawdown and consistency rules, then build a practical risk plan for $25K–$150K accounts.

9 min read · 24 Oct 2026
Prop Firm Strategy

The5ers Review 2026: Programs, Rules and Payouts Explained

Compare The5ers Growth, High Stakes, Bootcamp and Futures programs, understand drawdown and payout rules, and choose a plan that matches your trading style.

10 min read · 24 Oct 2026
Drag to see the whole figure