How to do a rolling correlation. corr does Pearson, so you can use it for that.

How to do a rolling correlation. More info on use of as_strided based view_as_windows.