Skip to content

Instantly share code, notes, and snippets.

@Zmey56
Created May 11, 2022 21:09
Show Gist options
  • Save Zmey56/c98ea987d1ec80889b35771e2e5a8261 to your computer and use it in GitHub Desktop.
Save Zmey56/c98ea987d1ec80889b35771e2e5a8261 to your computer and use it in GitHub Desktop.
return_data_2021 = data_2021.pct_change()
cum_daily_return = (1 + return_data_2021).cumprod()
var_matrix_2021 = return_data_2021.cov()
var_matrix_2021.head()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment