# 2 – M2L5 02 Historical Volatility V3

Say we want to get a sense of how our returns are going to vary in the future. That is to say, we want to estimate the volatility of a stock we’ve invested in. How do we do it? Well, the simplest way is to calculate the standard deviation of the log returns of some price data that we have for this stock, eg data from the past. This is called historical volatility. The first step is to calculate log returns from prices. The first log return datum will be undefined since there is no price datum from the time point proceeding it. So, if you start with n plus one price data, you will now have n log returns. Then, the formula for volatility is the formula for standard deviation, where the observations are log returns. One thing to keep in mind is that, since volatility is defined as the standard deviation, it treats log returns that are above and below the mean the same way. This is because in the calculation of standard deviation, price differences relative to the mean are squared, so that negative and positive differences are combined into one quantity. So, after doing these calculations for this small dataset, we’d get sigma equals 0.025. Since our dataset consisted of daily prices, this is the estimate of the daily volatility. Sometimes though, instead of having a price for every day, you might only have a price for every week, or a price for every month. If you take these data, calculate the log returns, and then calculate the standard deviation, you would get a different number for the volatility. For example, for stocks, the standard deviation of daily log returns is typically around 0.006 to 0.03, while the standard deviation of weekly log returns is typically around 0.01 to 0.07. If you think about it, this makes sense. This is just telling you that stock prices change more over the course of a week than over the course of a day. So weekly returns vary more widely than daily returns. So your volatility estimate depends on the time frequency of the underlying price data. But we want to be able to come up with a volatility number that we can compare across different situations and datasets. In order to do this, people typically calculate a value that corresponds to the standard deviation of annual log returns. If you don’t have several years of data, and you can’t calculate the standard deviation of annual log returns, you can calculate the standard deviation of log returns of another frequency and extrapolate it to an annual one. This is called calculating the annualized volatility. And we’re going to talk about it in the next lesson.