I have a time series \"Ser\" and I want to compute volatilities (standard deviations) with a rolling window. My current code correctly does it in this form:
w=10
Typically, [finance-type] people quote volatility in annualized terms of percent changes in price.
Assuming you have daily prices in a dataframe df and there are 252 trading days in a year, something like the following is probably what you want:
df
df.pct_change().rolling(window_size).std()*(252**0.5)