out_beta.append(model_ols.coef_[0][0])
return pd.DataFrame({'beta': out_beta}, index=out_dates)
df_beta = rolling_beta(df_rtn_stocks['NDX'].values.reshape(-1, 1),
    df_rtn_stocks['CRM'].values.reshape(-1, 1), df_rtn_stocks.index.values, 255
    )
Deprecated rolling window option in OLS from Pandas to Statsmodels