From 7eab02052b62c5eacc805a72c20be41ef75d8ee6 Mon Sep 17 00:00:00 2001 From: Tyler Trzecki Date: Tue, 26 Apr 2022 17:11:53 -0500 Subject: [PATCH] Pandas.rolling_corr() Deprecated Pandas has deprecated rolling_corr. The plot of the rolling correlation between EUROSTOXX and VSTOXX is shown in the proposed change. --- B03898_06_codes/Chapter 6 Notebook.ipynb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/B03898_06_codes/Chapter 6 Notebook.ipynb b/B03898_06_codes/Chapter 6 Notebook.ipynb index 050977c..49ea688 100644 --- a/B03898_06_codes/Chapter 6 Notebook.ipynb +++ b/B03898_06_codes/Chapter 6 Notebook.ipynb @@ -619,9 +619,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "pd.rolling_corr(log_returns['EUROSTOXX'], \n", - " log_returns['VSTOXX'], \n", - " window=252).plot(figsize=(10,8))\n", + "log_returns['EUROSTOXX'].rolling(252).corr(log_ret['VSTOXX']).plot(figsize=(10,8))" "plt.ylabel('Rolling Annual Correlation')" ], "language": "python", @@ -1043,4 +1041,4 @@ "metadata": {} } ] -} \ No newline at end of file +}