Skip to content

Explore different risk pairity models using MLFinlab, Numpy and Pandas

Notifications You must be signed in to change notification settings

Tim-101/Portfolio-Strategy-Risk-Pairity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Portfolio-Strategy-Risk-Pairity

This project used MLFinLab to optimise portfolio using Hierarchical Risk Pairity (HRP) and Hierarchical Equal Risk Contribution (HERC) models. Both models used agglomerative clustering algorithm to cluster different shares based on their price or returns. The main difference between HERC and HRP is that HERC allocate assets equally in each cluster based on the cluster risk contribution, while HRP is more like a vanilla risk pairity model.

Two techniques were used as our benchmark. Vanilla Risk pairity and equally weighted strategies.

Three different covariance measures were tested as part of this project:

  1. Minimum Covariance Determinant "The basic idea of the algorithm is to find a set of observations that are not outliers and compute their empirical covariance matrix, which is then rescaled to compensate for the performed selection of observations"

  2. Maximum Likelihood Covariance Estimator "Maximum Likelihood Estimator of a sample is an unbiased estimator of the corresponding population’s covariance matrix”

  3. Exponentially-Weighted Covariance Matrix Use exponential smoothing technique to create an accurate representation of our stocks covariance. Hence, more recent price/returns information carry more weight compared to older information

From my experiments, I found no significant differences between these covariance estimators. Hence, for this project I chose Exponentially-Weighted Covariance Matrix since I personally quite love the idea of exponential smoothing to create better estimation of the stock covariance matrix.

Lastly, I backtested the all portfolio models. Overall, for the selected set of shares, I found that equally weighted is just as good or even better compared to other techniques. This seems to confirm that basic risk pairity model does not work for Australian shares. You can find the article writen by Schroders regarding risk pairity for Australian stock here: Risk Pairity - No Free Lunch

Please note that I'm in no way an expert in finance. Hence, this result should be taken with a grain of salt.
USE THIS MODEL AT YOUR OWN RISK

About

Explore different risk pairity models using MLFinlab, Numpy and Pandas

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published