Skip to main content

Optimisation

This page is a technical deep dive into our optimisation implementation of our various blocks, layers and paths. We recommend reading our introduction and our model pages to fully understand where this deep dive fits in the PathLit ecosystem. These are quick reads and well spent time!

Allocation strategies#

l3ewp - Equally-Weighted Portfolios#

takes the covariances between the assets and computes the equally-weighted portfolio weights.

What is the math PathLit uses?

Objective Function:#

Let wiw_i be the weight of the iith asset of NN total assets in a portfolio, the allocation is:

wi=1N,i={1,...,N}w_i = \frac{1}{N}, \quad i=\{1,...,N\}

l3ivp - Inverse-Volatility Portfolios#

takes the covariances between the assets and computes the inverse-volatility weighted portfolio weights.

What is the math PathLit uses?

Objective Function: Let wiw_i be the weight of the iith asset of NN total assets in a portfolio and Σ\Sigma be the estimated covariance matrix, the allocation is:

w=σ11Tσ1,where,σ2=diag(Σ)\mathbf{w} = \frac{\sigma^{-1}}{\mathbf{1}^T \sigma^{-1}}, \quad \hbox{where,} \quad \sigma^2=diag(\Sigma)

l3rpp - Risk-Parity Portfolios#

takes the covariances between the assets and computes the risk-parity weighted portfolio weights.

What is the math PathLit uses?

Objective Function: Let wiw_i be the weight of the iith asset of NN total assets in a portfolio and Σ\Sigma be the estimated covariance matrix, the allocation is:

minwi,j=1N(wi(Σw)iwj(Σw)j)2s.t.1Tw=1,w0\begin{aligned} \min_{\mathbf{w}} \quad & \sum_{i,j=1}^N (w_i(\Sigma \mathbf{w})_i - w_j(\Sigma \mathbf{w})_j)^2\\ \textrm{s.t.} \quad & \mathbf{1}^T\mathbf{w}=1, \\ &\mathbf{w}\geq0 \\ \end{aligned}

l3mdp - Maximum Diversification Portfolios#

takes the covariances between the assets and computes the maximum diversification weighted portfolio weights.

What is the math PathLit uses?

Objective Function:

Let wiw_i be the weight of the iith asset of NN total assets in a portfolio and Σ\Sigma be the estimated covariance matrix, the allocation is:

minwwTσwTΣwwhere,σ2=diag(Σ)s.t.1Tw=1\begin{aligned} \min_{\mathbf{w}} \quad & \frac{\mathbf{w}^T \sigma}{\sqrt{\mathbf{w}^T \Sigma \mathbf{w}}} \quad \hbox{where,} \quad \sigma^2 = diag(\Sigma)\\ \textrm{s.t.} \quad & \mathbf{1}^T\mathbf{w}=1 \\ \end{aligned}

l3mdcp - Maximum Decorrelation Portfolios#

takes the covariances between the assets and computes the maximum decorrelation weighted portfolio weights.

What is the math PathLit uses?

Let wiw_i be the weight of the iith asset of NN total assets in a portfolio and Σ\Sigma be the estimated covariance matrix, the allocation is:


Objective Function:

minwwTCwwhere,C=diag(Σ)12 Σ diag(Σ)12s.t.1Tw=1\begin{aligned} \min_{\mathbf{w}} \quad & \mathbf{w}^T \mathbf{C} \mathbf{w} \quad \hbox{where,} \quad \mathbf{C} = diag(\Sigma)^{-\frac{1}{2}} \ \Sigma \ diag(\Sigma)^{-\frac{1}{2}}\\ \textrm{s.t.} \quad & \mathbf{1}^T\mathbf{w}=1 \\ \end{aligned}

l3gmvp - Global Minimum Variance Portfolios#

takes the covariances between the assets and computes the global minimum-variance weighted portfolio weights.

What is the math PathLit uses?

Let wiw_i be the weight of the iith asset of NN total assets in a portfolio and Σ\Sigma be the estimated covariance matrix, the allocation is:

Objective Function:

minwwTΣws.t.1Tw=1\begin{aligned} \min_{\mathbf{w}} \quad & \mathbf{w}^T \Sigma \mathbf{w} \\ \textrm{s.t.} \quad & \mathbf{1}^T\mathbf{w}=1 \\ \end{aligned}

l3hrp - Hierarchical Risk-Parity Portfolios#

takes the covariances between the assets and computes the hierarchical risk-parity weighted portfolio weights.

As per Prado's seminal work that introduced HRP:

HRP applies modern mathematics (graph theory and machine learning techniques) to build a diversified portfolio based on the information contained in the covariance matrix. However, unlike quadratic optimizers, HRP does not require the invertibility of the covariance matrix. In fact, HRP can compute a portfolio on an ill-degenerated or even a singular covariance matrix, an impossible feat for quadratic optimizers. Monte Carlo experiments show that HRP delivers lower out-of-sample variance than CLA, even though minimum-variance is CLA’s optimization objective. HRP also produces less risky portfolios out-of-sample compared to traditional risk parity methods.

The algorithm can be broken down into 3 major steps:

  1. Hierarchical Tree Clustering
  2. Matrix Seriation
  3. Recursive Bisection

Refer to Prado's paper for in depth analysis of the algorithm:

Source: Lopez de Prado, Marcos. (2016). Hierarchical Portfolio Construction: Dispelling Markowitz's Curse. SSRN Electronic Journal. 10.2139/ssrn.2708678.

Framework#