# 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 Portfoliostakes the covariances between the assets and computes the equally-weighted portfolio weights.

*What is the math PathLit uses?*

#### #

Objective Function:Let $w_i$ be the weight of the $i$th asset of $N$ total assets in a portfolio, the allocation is:

### #

l3ivp - Inverse-Volatility Portfoliostakes the covariances between the assets and computes the inverse-volatility weighted portfolio weights.

*What is the math PathLit uses?*

Objective Function: Let $w_i$ be the weight of the $i$th asset of $N$ total assets in a portfolio and $\Sigma$ be the estimated covariance matrix, the allocation is:

### #

l3rpp - Risk-Parity Portfoliostakes the covariances between the assets and computes the risk-parity weighted portfolio weights.

*What is the math PathLit uses?*

Objective Function: Let $w_i$ be the weight of the $i$th asset of $N$ total assets in a portfolio and $\Sigma$ be the estimated covariance matrix, the allocation is:

### #

l3mdp - Maximum Diversification Portfoliostakes the covariances between the assets and computes the maximum diversification weighted portfolio weights.

*What is the math PathLit uses?*

Objective Function:

Let $w_i$ be the weight of the $i$th asset of $N$ total assets in a portfolio and $\Sigma$ be the estimated covariance matrix, the allocation is:

### #

l3mdcp - Maximum Decorrelation Portfoliostakes the covariances between the assets and computes the maximum decorrelation weighted portfolio weights.

*What is the math PathLit uses?*

Let $w_i$ be the weight of the $i$th asset of $N$ total assets in a portfolio and $\Sigma$ be the estimated covariance matrix, the allocation is:

Objective Function:

### #

l3gmvp - Global Minimum Variance Portfoliostakes the covariances between the assets and computes the global minimum-variance weighted portfolio weights.

*What is the math PathLit uses?*

Let $w_i$ be the weight of the $i$th asset of $N$ total assets in a portfolio and $\Sigma$ be the estimated covariance matrix, the allocation is:

Objective Function:

### #

l3hrp - Hierarchical Risk-Parity Portfoliostakes 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:

- Hierarchical Tree Clustering
- Matrix Seriation
- 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.