August 5th, 2003, 12:43 pm
Suppose that I have a time series X = {x1,x2,x3,...,x_N}. This is daily closing prices of a security, so x1 and x2 may not be the prices of consecutive dates since there are holidays.I want to compute the volatility of that time-series, but I am not certain how to do it. Say that I want to compute the 20-days volatility of a stock returns at the date "lastdate". My "algorithm" for computing that has been 1. Compute Return Series R = {x2/x1, x3/x2, x4/x3, ..., X_N/X_{N-1} 2. firstdate = lastdate - 20 3. If that date is a holiday, find first date after that where I have a closing price 4. compute standard deviation of the k values from firstdate to lastdate that are tradingdays. 5. scale standard deviation from daily to yearly by multiplicating with sqrt(365).Should I do it differently? All thoughts are welcome!