Assume a 10 bar historical volatility on a daily bar chart. Also assume the days have to following closes;
Day 0: | 24.5 |
Day 1: | 25.25 |
Day 2: | 23.0 |
Day 3: | 21.5 |
Day 4: | 22.0 |
Day 5: | 24.75 |
Day 6: | 26.0 |
Day 7: | 26.5 |
Day 8: | 27.5 |
Day 9: | 26.0 |
Day 10: | 25.5 |
First, divide the day’s close by the previous day’s close. Find the logarithm of this value.
Divide Results | Log Results | ||
Day 0: | 24.5 | ||
Day 1 | 25.25 | 1.0306 | .0131 |
Day 2: | 23.0 | .9109 | .-.0405 |
Day 3: | 21.5 | .9348 | -.0293 |
Day 4: | 22.0 | 1.0233 | .01 |
Day 5: | 24.75 | 1.125 | .0516 |
Day 6: | 26.0 | 1.0505 | .0214 |
Day 7: | 26.5 | 1.0192 | .0083 |
Day 8: | 27.5 | 1.0377 | .0161 |
Day 9: | 26.0 | .9455 | -.0243 |
Day 10: | 25.5 | .9808 | -.0084 |
Next, add all of the above logarithmic values together and divide by 10 to get the logarithmic mean:
.0131 - .0405 - .0293 + .0100 + .0516 + .0214 + .0083 + .0161 - .0243 - .0084 =.018
.018 / 10 = .0018
Now, for each of the last 9 bars and the current bar, once again divide the bar’s close by the previous bar’s close. Find the logarithm of this value, subtract the above calculated logarithmic mean, and square this value.
Log Results | Subtract Value | Square | |
Day 1: | .0131 | .0113 | .000128 |
Day 2: | -.0405 | -.0423 | .001789 |
Day 3: | -.0293 | .0275 | .000756 |
Day 4: | .01 | .0082 | .000067 |
Day 5: | .0516 | .0498 | .002480 |
Day 6: | .0214 | .0196 | .000384 |
Day 7: | .0083 | .0065 | .000042 |
Day 8: | .0161 | .0143 | .000204 |
Day 9: | -.0243 | .0225 | .000501 |
Day 10: | -.0084 | .0066 | .000044 |
Add all of the above values together, divide by 9, and get the square root of this value:
.000128 + .001789 + .000756 + .000067 + .002480 + .000384 + .000042 + .000204 + .000501 + .000044 = .006395
.006395 / 9 = .000711
Square root of .000711 = .026656
Multiple by 15.81139 (since it’s daily);
.026656 * 15.81139 = .421468
Finally, multiply this value by 100 to get the historical volatility:
.421468 * 100 = 42.1468