Skip to content

Instantly share code, notes, and snippets.

@techwithshadab
Created November 3, 2021 20:57
Show Gist options
  • Save techwithshadab/fdeebb9ea802b8fe63b118a98c4ce3fe to your computer and use it in GitHub Desktop.
Save techwithshadab/fdeebb9ea802b8fe63b118a98c4ce3fe to your computer and use it in GitHub Desktop.
# Correlation Matrix
corr = df.corr()
f, ax = plt.subplots(figsize=(10, 8))
sns.heatmap(corr, mask=np.zeros_like(corr, dtype=np.bool), annot=True, square=True, ax=ax, xticklabels=stock_list, yticklabels=stock_list)
plt.title("Correlation between Equities")
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment