Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: [Hierarchial Risk Parity Model] #200

Open
adityaabothra opened this issue Oct 5, 2020 · 5 comments
Open

Feature request: [Hierarchial Risk Parity Model] #200

adityaabothra opened this issue Oct 5, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@adityaabothra
Copy link

I am making a Hierarchial risk parity Model as my project.
Since it was on your roadmap, will like to create a pull request.
I definitely will take some time and inputs from you, but I believe
I should be able to complete a Weight distribution for assets for diversification.
Ping if needed

@adityaabothra adityaabothra added the enhancement New feature or request label Oct 5, 2020
@robertmartin8
Copy link
Owner

Hi @adityaabothra

HRP has been implemented (see docs here), but I'm quite interested in improving it to allow users to specify expected returns.

Robert

@adityaabothra
Copy link
Author

Correct if I am wrong in understanding your requirement.
You want user to specify return expected for a corresponding risk.
my query would be
1.Total risk will be given by user, or calculated by the corresponding return entered by user?
2. does this change has to be just a method separately calculated or has something to change within the risk parity clustering, like will such return affect the risk parity on its own?

@robertmartin8
Copy link
Owner

Really sorry for the slow response.

HRP essentially works as follows:

  1. Compute a distance matrix from the covariance matrix
  2. Form hierarchical clusters based on the distance matrix
  3. Starting from the bottom of the tree, allocate to assets in order to make local minimum-variance portfolios, then proceed upwards (alternatively, can think of it as top down recursive).

The boldened part of step 3 is what I would like to enhance. Rather than just making local minimum-variance portfolios, can we incorporate expected returns, for example, by making local max-sharpe portfolios?

The local allocation is done here, so in principle, we could do something like:

alpha = 1 - first_variance / (first_variance + second_variance)
# change to
alpha = 1 - first_sharpe / (first_sharpe + second_sharpe)

Though we can probably do better by writing down the analytical expression for unconstrained 2 asset max-sharpe.

Speaking of constraints, that would be another major improvement to this HRP implementation. Is it possible to "naturally" put weight constraints on the HRP allocation? Seems quite difficult owing to the recursive nature of allocation, but there are some papers (like this) that describe how it might be done.

Best,
Robert

@adamhwang
Copy link

+1 to HRP weight constraints
+1 to local max-sharpe portfolios

@adityaabothra
Copy link
Author

adityaabothra commented Aug 30, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants