Institutional investors have long realized the need to achieve their return requirements with portfolios that are not concentrated in a few assets. As a result, different portfolio allocation mechanisms have been probed and risk-balanced approaches to asset allocation have gained popularity.


Copyright: – “Portfolio construction by risk parity in the context of machine learning.”


One of the most famous portfolio construction methods is the 1952 Markowitz model, which assembles a portfolio of assets based on a certain risk, defined as volatility, for which the expected return is maximized. Plotting volatility and expected return on a graph gives an indication of a portfolio with the best possible expected return for a given level of risk, also known as an efficient frontier. Besides aiming for the highest risk/return ratio, other approaches seek to achieve only the lowest risk (global minimum variance portfolio), a minimum correlation and volatility between asset classes (minimum correlation portfolio), a classical balance (60% equities / 40% bonds) or equal volatility contribution to the overall portfolio (risk parity). Depending on the overall investment objective, any of these and other portfolio construction approaches can be advantageous. As it is incredibly difficult to predict future performance, estimation errors can easily arise in the computation of a risk/return matrix, and thus approaches that neglect the return are frequently favored for their prediction accuracy. In risk parity, capital allocation is balanced and adjusted based solely on the risk characteristics of the asset, with the lowest amount of capital allocated to the riskiest asset. This type of portfolio construction is often used to preserve and grow capital over the long term.

Hierarchical risk parity (HRP), as proposed in Lopez de Prado (1) combines structural observations of data (graph theory) with machine learning to build a diversified portfolio. It builds on the concept of risk-parity and adds the correlations between assets to the risk-weighting of assets to determine portfolio construction. By doing this, HRP allocates less capital to similar assets and thus decreases the possibility of cluster risk.

In simple terms, the hierarchical risk parity algorithm executes the following three steps:

  1. Clustering: Assets are agglomerated in hierarchical clusters based on their return correlations, such that highly correlated assets are grouped together. The instrument used to perform this step is called the hierarchical tree clustering algorithm.
  2. Sorting: Data of the similar investments which were identified above are now grouped together so that the cluster structure becomes evident. The instrument used to perform this step is called the simple seriation algorithm.
  3. Assigning weights: In the last step, the optimal amount, hierarchy, and weight of clusters are determined using recursive bisection. First, the identified clusters are broken up into sub-clusters, starting with the biggest cluster and continuing top-down. Second, asset weights are determined based on the variance of each sub-cluster.

This three-step process introduces a hierarchy that allows an asset to compete for weighting only within its own group, rather than with the entire portfolio.

The objective of the hierarchical risk parity approach is to preserve and grow capital over the long term. Unlike the returns of an asset, which can vary wildly over time, the risk characteristics of assets are slower to change and remain stable over time. With this knowledge, we can construct the portfolio in such a way that drawdowns can be well cushioned. The reverse however also holds true, where if we come out of a market drawdown and enter a bull market, the portfolio is still overweight on the less-risky assets and thereby lags in performance as our riskier assets gain in momentum. One further drawback of the HRP is that it can identify as little as two and as many as an infinite amount of clusters. This can still lead to over-or under- allocation of risk to one or another asset within a portfolio.

A variant of the HRP, the hierarchical equal risk contribution (HERC) addresses this and other issues. HERC builds its clusters based on risk measure correlations and determines an optimal number of clusters according to data heterogeneity (using the gap index). Based on these self-defined clusters, asset weights are determined. To illustrate how this can result in different clustering compared to a classical asset-class-based approach, picture a portfolio with assets in equities, fixed income, foreign exchange, and commodity markets and assume that Australian government bonds would be one of the markets within this portfolio. In a classical asset-based allocation, Australian bonds would be pre-allocated to the fixed income cluster and given a specific weight based on the risk sentiment within the fixed income cluster. When using HERC, the portfolio construction mechanism foregoes the pre-definition of its assets into asset classes and focuses on the more important risk characteristics of its assets. In the example, the underlying characteristics of the Australian bond would be more important than its name or asset class definition. Depending on the market environment, the underlying risk metrics of Australian bonds could be much more similar to those of other commodity markets, such that the Australian bond would be classified with other commodities rather than as a fixed income security.

Another significant advantage of HERC vs HRP is that HRP is limited to using volatility as a risk measure. HERC expands this and allows for further risk measures such as value at risk, expected shortfall, maximum drawdown and others. The portfolio manager can choose the metric most suited for the targets of the portfolio.

The following is a graphical representation of the clustering and sorting outcomes of a HERC algorithm.

Image 1: Clustering outcome with HERC

  Image 2: Sorting outcome with HERC

As portfolio theory evolves, so will the corresponding applied approaches to better achieve the underlying investment objectives. For us, HERC currently serves as a great tool to achieve a risk-balanced portfolio.

Tom Capital AG is an investment boutique that applies machine learning to the entire investment process, from data selection to portfolio construction. Do not hesitate to contact us at for more information or inquiries.


(1)Marcos López de Prado, The Journal of Portfolio Management Summer 2016, 42 (4) 59-69; DOI:

(2) López de Prado, Marcos and López de Prado, Marcos, Building Diversified Portfolios that Outperform Out-of-Sample (May 23, 2016). Journal of Portfolio Management, 2016; , Available at SSRN: or

(3) Raffinot, Thomas, The Hierarchical Equal Risk Contribution Portfolio (August 23, 2018). Available at SSRN: or

Read the original article: