Skip to content

Instantly share code, notes, and snippets.

@yuyasugano
Created September 24, 2020 12:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuyasugano/2554945a000a9011cf991665274a83a7 to your computer and use it in GitHub Desktop.
Save yuyasugano/2554945a000a9011cf991665274a83a7 to your computer and use it in GitHub Desktop.
Pandas correlation graph for financial assets
%matplotlib inline
fig = plt.figure(figsize=(15, 7))
ax3 = fig.add_subplot(1, 1, 1)
correlation_change.plot(ax=ax3)
ax3.set_xlabel('Date')
ax3.set_ylabel('Pearson correlation coefficient')
ax3.set_title('21days rolling change correlations with the key DawJones')
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment