I am trying to find the rolling correlation of 5 periods between columns ['High'] and ['Low'].
I manage to calculate it but there is an error:
FutureWarning: pd.rolling_corr is deprecated for Series and will be removed in a future version, replace with Series.rolling(window=5).corr(other=)
Tried replacing it but it doesnt work. Any help?
import pandas as pd
df_Gold = pd.read_csv('GoldData.csv')
df_Gold['High_Low'] = pd.rolling_corr(df_Gold['High'],df_Gold['Low'],5)
print(df_Gold.tail())
Try using
Notice