Hello, I am computing daily volatility as the standard deviation of the returns/movements at the top of the order book for a symbol. that is, midpoint = bid+ask/2 return = new_midpoint+old_midpoint / old_midpoint volatility = std_dev (return..) What do you think about this? Is there some source where I can backtest my computation? For aggregate volatility numbers, I simply maintain a 20-day moving average the daily volatility numbers. Any suggestions are most welcome. thanks, Sam
I'm confused about your midpoint. Is this tick-by tick? Bid and ask at the close on a given day? Also, it is more common to use the natural log of the relative return. If you still want to use your midpoint idea: return relative = ( midpoint / midpoint [last period] ) ln of return relative = ln( return relative ) volatility = standard deviation ( ln of return relative )
Thanks for your reply. Yes, I am computing tick by tick returns and then their standard deviation to get the daily volatility. 2 follow-up questions: why is "logarithm" of the return required in this case? Do you think simply averaging daily volatilities to get aggregate volatility over a certain period (say 20 days) recommended? I am thinking we need to do something special to get the monthly o or 20-day average. thanks, Sam
Volatility = stddev(ln of return relative)*sqrt(365) or sqrt(252) if you prefer trading days over calendar days. Also, your standard dev. is calculated over a period of time, such as 20 days for monthly volatility, or 5 days for weekly volatility.