Skip to content

Instantly share code, notes, and snippets.

@julian-west
Created September 7, 2019 16:55
Show Gist options
  • Save julian-west/c8dc3e002e282e475d652feb48b900ff to your computer and use it in GitHub Desktop.
Save julian-west/c8dc3e002e282e475d652feb48b900ff to your computer and use it in GitHub Desktop.
#calculate correlation matrix using inbuilt pandas function
correlation_matrix = log_returns_df.corr()
#show first five rows of the correlation matrix
correlation_matrix.head()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment