Created
July 18, 2021 10:25
-
-
Save rian-dolphin/ffca4ca6eba0461c9dec9d975c904108 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-- Get annualised mean returns | |
mus = (1+daily_returns.mean())**252 - 1 | |
#-- Get covariances and variances | |
#- Variance along diagonal of covariance matrix | |
#- Multiply by 252 to annualise it | |
#- https://quant.stackexchange.com/questions/4753/annualized-covariance | |
cov = daily_returns.cov()*252 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment