-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem?
I was looking at the source code for HRPOpt
and noticed that it prefers to compute the covariance as opposed to using the constructor supplied covariance matrix. I read through the earlier discussion, and was reading the code because I was interested in the implementation.
Describe the feature you'd like
I believe the following change to HRPOpt.optimize
would allow users to supply both returns and a pre-shrunk covariance matrix and get the expected results:
if self.cov_matrix is not None:
cov = self.cov_matrix
corr = risk_models.cov_to_corr(self.cov_matrix).round(6)
else:
corr, cov = self.returns.corr(), self.returns.cov()
I'm testing out this change locally and if I can get all your unit tests to pass I'd like to submit a pull request.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request