as the title suggests, where has the rolling function option in the ols command in Pandas migrated to in statsmodels? I can't seem to find it.
Pandas tells me doom is in the works:
FutureWarning: The pandas.stats.ols module is deprecated and will be removed in a future version. We refer to external packages like statsmodels, see some examples here: http://statsmodels.sourceforge.net/stable/regression.html
model = pd.ols(y=series_1, x=mmmm, window=50)
import statsmodels.api as sm
model = sm.OLS(series_1, mmmm, window=50).fit()
I thought one way could be either using a combination of pandas rolling window function, apply and statsmodels OLS, e.g.
Alternatively, maybe the rolling VAR function in statsmodels can somehow be used for rolling regression by feeding the right inputs - see http://statsmodels.sourceforge.net/0.6.0/generated/statsmodels.tsa.vector_ar.dynamic.DynamicVAR.html