Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Rolling.cov with offset window is expanding not rolling #16058
Code Sample, a copy-pastable example if possible
import pandas as pd import numpy as np idx = pd.date_range('2017-01-01', periods=24, freq='1h') ss = pd.Series(np.arange(len(idx)), index=idx) (ss.rolling('2h').cov() == ss.expanding().cov()).iloc[2:].any() # this should be False!!
When using Rolling.cov with an offset window like '2h' the window is expanding and not rolling
Rolling should not be equal to expanding cov - but it is equal.