Serving the Quantitative Finance Community

 
User avatar
ffyring
Topic Author
Posts: 0
Joined: July 14th, 2002, 3:00 am

Computing volatility

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!
 
User avatar
FDAXHunter
Posts: 14
Joined: November 5th, 2002, 4:08 pm

Computing volatility

August 5th, 2003, 12:46 pm

4. You want to assume that Mean(r) = 0, most likely.You could always run some GARCH estimator on it, if you feel techie. Why you'd want to? No idea... but you asked for suggestions.
 
User avatar
Rutger
Posts: 0
Joined: October 10th, 2002, 11:36 am

Computing volatility

August 5th, 2003, 1:23 pm

Hi,depending on your underlying security you might use a different set of methods.1. For stockmarket or optionmarket holidays might not be relevant and hence the vol should be upscaled with about 250 trading days and not 365. If your in the energy business pricing is around the clock also on holidays and hence 365 might not be totally wrong.2. It is common to use log prices for return calculations. "X1/X2" will not yield any usable return numbers, or?3. With regards to using 20 trading days, it certainly depend on what you want to achieve. For risk mgt this is way to short. If you want a comparable rolling vol window, using the same amount of days is good. If not, it won't matter if you miss a day for a holiday since it will an estimate of the standard deviation anyhow just having different confidence bands. Good Luck!Rutger
 
User avatar
Aaron
Posts: 4
Joined: July 23rd, 2001, 3:46 pm

Computing volatility

August 5th, 2003, 3:01 pm

In addition to Rutger's excellent answer, I have some comments:(1) "20 day volatility" usually means 20 trading days. Thus you would just use the last 20 values to compute the standard deviation rather than worrying about date. Longer intervals, such as 4 week, 1 month or 1 year, are usually defined on a calendar basis as you have done.(2) Annualize using the actual length of your interval, not automatically 365. For example if you have 16 data points covering 23 calendar days, counting from the beginning of the first to the end of the last interval, your annualization factor should be (16*365/23)^2. If you like to be precise, you can use 365.2422.(3) There are arguments for weighting observations by the square root of the measurement interval, so a three day return (Friday to Monday) would get 3^0.5 weight in the standard deviation. Other weightings are useful in certain circumstances.
 
User avatar
ffyring
Topic Author
Posts: 0
Joined: July 14th, 2002, 3:00 am

Computing volatility

August 6th, 2003, 6:07 am

Thanks for all replies!As Rutger suggested, my data is from the energy business. I have exchange-traded contracts as underlying (only traded on businessdays) but I consider the underlying to "move" even if the exchange is closed. Monday opening is always a bit from friday close. Perhaps Aarons weighting suggestion could be useful here.Fredrik