Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Rolling Beta in Jupyter

Hi guys ,

Is there another way to calculate "rolling_beta" in Jupyter since "pd.ols" doesn't work ?

rolling_beta = pd.ols(y=S1, x=S2, window_type='rolling', window=30)
spread = S2 - rolling_beta.beta['x'] * S1
spread.name = 'spread'

Thks