Hierarchical Equal Risk Contribution
An extension of Hierarchical Risk Parity that combines hierarchical clustering with equal risk contribution principles, ensuring balanced risk allocation both between and within clusters.
Overview
Hierarchical Equal Risk Contribution (HERC), proposed by Thomas Raffinot in 2017, bridges two powerful portfolio construction ideas: the hierarchical clustering approach of HRP and the risk budgeting framework of Equal Risk Contribution (ERC). While HRP bisects a sorted list of assets, HERC splits capital along the dendrogram itself and stops at a set of terminal clusters chosen from the data.
The method operates in two stages. First, it uses hierarchical clustering to identify natural groupings of assets based on their correlation structure. Second, it splits capital between the two sides of each top node of the tree in inverse proportion to their risk (inter-cluster allocation), and then sizes the members of each terminal cluster by naive risk parity (intra-cluster allocation). The sections below state exactly what each step equalizes and what it does not.
This two-level allocation spreads risk both across asset groups and within them, addressing a common criticism of naive risk parity approaches that can still produce concentrated exposures when assets within a group are highly correlated.
Mathematical Formulation
Correlation Distance
As in HRP, the algorithm begins by computing a distance metric from the correlation matrix:
This distance is used to perform agglomerative hierarchical clustering, producing a dendrogram that reveals the natural grouping structure of the assets. The dendrogram is cut into terminal clusters. is chosen from the data by a two-difference gap rule, and is at most 10 and at most one less than the number of assets. The method needs at least three assets.
Inter-Cluster Allocation: Pairwise Risk Splits
HERC does not solve one joint program for equal cluster risk contributions. It descends the dendrogram. Each of the top nodes splits the capital held at that node between its two sides, in inverse proportion to the risk on each side:
where is the capital at the node, and and are the summed cluster risks on the left and right branches under the run's risk measure. The side that carries more risk receives less capital.
Read the equality this produces carefully. It is pairwise and local: it holds between the two sides of each split. It does not mean each of the clusters ends up contributing exactly of total portfolio risk. Only a balanced tree makes the two statements coincide. On an unbalanced tree a cluster deeper in the dendrogram passes through more splits, and its share of risk differs from .
Intra-Cluster Allocation: Naive Risk Parity
Inside a terminal cluster the shipped implementation uses the closed-form naive risk parity rule, not a numerically solved exact equal risk contribution. Each member is sized by the inverse of its own standalone risk, measured on its own with every other member held at zero, and the shares are then normalized:
Under the default risk measure for HERC, variance, the risk term enters squared, so this reduces to inverse-variance weighting inside each cluster:
The difference from exact equal risk contribution is that this rule ignores the covariances between members: it reads only the diagonal. Exact equal risk contribution would require to be equal for all members, which has no closed form in the general case and would need a numerical solve. That solve is not what runs here. The two answers agree when the members inside a cluster are uncorrelated, and diverge as the correlations grow, which is exactly the case clustering creates.
Final Weights
The final portfolio weight for asset in cluster is:
where is the weight allocated to cluster (from the pairwise risk splits) and is asset 's weight within cluster (from naive risk parity).
Risk Measures
The HERC method is flexible in principle about the risk measure used for the allocation. Common options include:
- Variance: The standard portfolio variance .
- Standard deviation: The portfolio volatility .
- Conditional Value at Risk (CVaR): The expected loss beyond the VaR threshold, providing a tail-risk-sensitive allocation.
- Maximum drawdown: The maximum peak-to-trough loss, aligning the allocation with drawdown-based risk management.
On this platform the choice is not exposed. A HERC run always uses variance, with Ward linkage, Pearson codependence, and the sample covariance of daily returns, through riskfolio-lib's hierarchical portfolio model. To get a tail-risk-driven hierarchical allocation instead, select HERC2, which is pinned to CVaR and needs at least four assets. HERC itself still runs on three. If an asset has zero variance over the window, its correlation is undefined and the method does not run. It does not substitute a different configuration under the same name.
Advantages & Limitations
Advantages
- Two-level diversification: Balances risk between the two sides of each top split and spreads capital inside each cluster, which limits hidden concentrations.
- Flexible risk measures, in the published method: The framework can use variance, CVaR or drawdown for the allocation. This platform pins variance for HERC and CVaR for HERC2.
- No matrix inversion: Like HRP, avoids the numerical instability of covariance matrix inversion.
- No return estimates: Purely risk-based allocation that does not depend on expected return forecasts.
Limitations
- Cluster sensitivity: The number of clusters and the clustering method can significantly affect the allocation.
- Group sums are unsupported: Per-name weight bounds and asset exclusions are carried into the descent. Each member's share inside a terminal cluster is fixed by naive risk parity, so a bound limits the capital its cluster can take. A bound that those fixed shares cannot satisfy makes the method refuse the run, rather than change the within-cluster rule. A group sum, such as a sector cap, is not supported in this release, because a sector cuts across branches of the tree.
- No return optimization: Cannot incorporate views on expected returns, potentially missing opportunities.
- Heuristic elements: The hierarchical decomposition is not derived from a single global optimization problem.
References
- Raffinot, T. (2017). "Hierarchical Clustering-Based Asset Allocation." The Journal of Portfolio Management, 44(2), 89-99.
- Raffinot, T. (2018). "The Hierarchical Equal Risk Contribution Portfolio." Working paper, SSRN.
- Lopez de Prado, M. (2016). "Building Diversified Portfolios that Outperform Out of Sample." The Journal of Portfolio Management, 42(4), 59-69.
- Maillard, S., Roncalli, T., & Teiletche, J. (2010). "The Properties of Equally Weighted Risk Contribution Portfolios." The Journal of Portfolio Management, 36(4), 60-70.
Not investment advice. Past performance is not indicative of future results.