I am interested in calculating high frequency 5-minute intraday volatility. I am going to use the standard Realized volatility which is the square root of the sum of squared log returns.

Given X is the log price of a stock the log return Y is calculated as $$ log \ returns = Y = \frac{x_i+1}{x_i} $$

Then the realized variance is the sum of the squared log returns:

$$ Realized\ Variance = \sum\limits_{i=1}^{n} (y_{t_{i}})^2 $$

$$ Realized \ Volatility = \sqrt{\sum\limits_{i=1}^{n} (y_{t_{i}})^2 } $$

For 5-minute realized volatility n = 78 (there are 6.5 hours in the NYSE trading day)

Now if Y is the log returns and the mean of Y is assumed to be zero you can also calculate a standard deviation

$$ standard \ deviation = \sqrt{\frac{1}{N}\sum\limits_{i=1}^{N} (y_i)^2}$$

So you can see the only difference between the Realized Volatility of Y and the standard deviation of Y is the $ \frac{1}{N} $ term in the standard deviation calculation.

Can you explain the significance of this? Why does realized variance not have 1/N and how can the 2 be interpreted?

reference https://en.wikipedia.org/wiki/Realized_variance


2 Answers 2


It is all a matter of frequency. For instance if you want to get annual realized volatility you multiply your last expression by $\sqrt{(N*251)}$ or the second to last expression by $\sqrt{(251)}$.

In other words, your last expression is the 5-min realized volatility whereas the second to last expression is the daily realized volatility.

  1. Your definition of a log return is wrong, it is $y_i = \ln{(x_{i+1}/x_i)}$

  2. You have 5-min returns so you are going to first compute 5-min variance:

$Variance = \frac{1}{N}\sum_{i=1}^N y_i^2 = \sum_{i=1}^N w_iy_i^2$

Here we have $w_i = 1/N$. By doing this you assume that the $y_i$ are iid, a relatively strong assumption. The "identically distributed" means that variance is linearly distributed in time. If you don't suppose them to be identically distributed (for instance if you think that mid-day returns are less volatile than end of day returns), you can use a different weighting by changing the $w_i$.

  1. You may want to incorporate the overnight return in your computation as well. It can matter or not, it depends on which purpose you are computing the variance for. If it is for an intraday purpose only then you don't need it.

If you want to work with volatilities longer than intraday, you should include the overnight move with an appropriate weighting $w_i$. For instance if you assume that the distribution of that overnight return is the same as that of a 5-min intraday return (probably a very bad assumption), you can also use $w_i=1/N$.

Other example: overnight time is $24-6.5 = 17.5$ hours, or $17.5 * 60 / 5 = 210$ periods of 5 minutes, so you can consider that the overnight move consists of 210 5-min returns. For instance 209 zeros and one $y_i$. Or 210 times $y_i/210$. It will obviously increase your number of observations $N$ by 210 for each overnight return you include.

  1. Last, if you are not interested by 5-min variance (i.e. the variance of 5 min returns), you can scale it to obtain the variance for a different time horizon. Again this scaling is done under assumptions of how variance is distributed across time. If again we assume it is linearly distributed across time, you would have to scale your 5-min variance by 288 to get a daily variance, because there are 288 times 5-min in a day. And if you want to get a yearly variance from your daily variance, again you can multiply it by 365 (or 252, depending on how you account for non-business days...)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.