      ave = pd.expanding_mean(df0.ret)     df0['desvdeprom'] = df0.ret - ave     df0['acum'] = df0['desvdeprom'].cumsum()     df0['rangorolled'] = pd.expanding_apply(df0.acum, rango)     df0['datastd']  =   pd.expanding_std(df0.ret)     df0['rango_rangostd'] = np.log(df0.rangorolled/df0.datastd)     df0['tiempo0'] = np.log(range(0,len(df0.index)+0))     df0 = df0.dropna()     model0 = pd.ols(y=df0['rango_rangostd'], x=df0['tiempo0'], intercept=False)     return model0.beta  