Error in formula of volatility with pandas

0

Good: I have these two lines of code where I want to calculate the returns of an action and the volatility of the action.

GFG['Log_Ret'] = np.log(GFG['Close'] / GFG['Close'].shift(1))

GFG['Volatility'] = pd.rolling_std(GFG['Log_Ret'], window=252) * np.sqrt(252)

When I try to see the volatility, I get this error: module 'pandas' has no attribute 'rolling_std'

What can I do? ... I see the pack of pandas and that's the function

    
asked by Napoleon Ricaurte 26.06.2018 в 15:30
source

0 answers