Skip to content
All library documents

Estimating Realized Variance from Irregularly Sampled Returns

Article Quant Q&A · Author: gyoza419

Summary

The document discusses how to estimate variance when price observations arrive at uneven intervals. One approach is to aggregate log returns into daily returns and estimate daily variance from the squared daily returns, often using a zero-mean assumption. Another approach rescales each interval return to a daily equivalent under the assumption that variance grows linearly with elapsed time, so returns scale with the square root of time.

A further answer gives a time-normalized estimator: sum squared price changes and divide by the total elapsed time across the observation span. Its rationale is that summed squared increments approximate integrated variance as observations become dense, even when intervals are nonuniform. Averaging each squared return after dividing by its own interval length can overweight densely sampled periods. The scaling assumptions have limits; intraday and overnight equity volatility can differ, so a more realistic time-of-day variance profile may be needed. The estimator also depends on the intended target, such as daily return variance versus variance over the observed span.

Key ideas

  • Summing intraday log returns gives the daily log return, which can be used to estimate daily variance.
  • Rescaling interval returns to daily equivalents assumes variance grows linearly with time.
  • Dividing summed squared price changes by total elapsed time accommodates uneven observation intervals.
  • Averaging individually time-normalized squared returns can overweight periods with frequent sampling.
  • Intraday and overnight volatility may differ, making uniform time scaling inaccurate.

Tags

Full text
# Calculating Daily Realized Variance with Non-Constant Sampling


# Calculating Daily Realized Variance with Non-Constant Sampling












I was able to obtain some tick data on a particular asset and I wanted to calculate the daily realized variance of the asset. After browsing through a few threads here, it seems the formula to calculate daily realized variance is simply (assuming you have constant time intervals):

Where R^2 is the squared log returns from the constant time interval t, with a total of m time intervals during the day. If I had minute to minute tick data, I would ideally sample every minute and the calculation would be straightforward.

However, my tick data is slightly sporadic ranging from 30 second intervals to 2-3 hours over the course of a trading day. Can I still use the same formula to calculate daily realized variance and just take the sum of squared log returns? Or will I have to account for the varying time differences?

## Answer by Soumirai (score 1)

https://quant.stackexchange.com/a/60022

If by "daily realized variance" you mean variance of daily returns, then you can sum all returns for each given day (because they are log returns, you can sum them) and compute the average of their squares (which is daily variance computed with the assumption of 0 mean, very often made in practice):

$DailyVariance = \frac{1}{N}\sum_n^N{(DailyReturn_n)^2}$

Otherwise if you don't want to lose information by summing all returns for each day, you can re-scale each of your return to get its equivalent daily return. A basic assumption is that variance scales linearly with time. So volatility (and returns) scale with $\sqrt{T}$.

Example: if you have a 1-hour return, it is 24 times smaller than a day. So you would scale it by $\sqrt{24}$ to get an "equivalent daily return". For a 30-min return you would scale it by $\sqrt{48}$ etc. And then you can use the $DailyVariance$ formula, with the squares of these "equivalent daily returns".

Once again that assumes that variance is distributed linearly with time. That is a strong assumption that is likely not true. Equity markets are typically more volatile intraday than overnight. So if you want to get more sophisticated, instead of scaling variance (i.e. square returns) by $T$ (i.e. returns by $\sqrt{T}$), you can scale them by a more sophisticated function of the time period of your return: you define a distribution for your variance intraday, and use it to scale your returns.

Further Example In Response to Comments:

## Answer by Andrea (score 1)

https://quant.stackexchange.com/a/82393

My favourite method is the following

Given

- $N+1$ times $T_i$ (possibly non uniform and already rescaled to the correct units: one day, one year, or else)

- $N+1$ observations $X_i$

The sample volatility is

$\sigma^2 \sim \frac{\sum (X_i-X_{i-1})^2}{\sum T_i-T_{i-1}} = \frac{\sum (X_i-X_{i-1})^2}{T_N - T_0}$

The intuition comes from the quadratic variation

$\sum (X_i-X_{i-1})^2 \rightarrow \int_0^T \sigma^2 \, dt$

when the partition goes to 0 even if it is not uniform (see https://en.wikipedia.org/wiki/Quadratic_variation#Definition).

Some of the other answers suggest to rescale each individual contribution, something like

$\sigma^2 \sim \frac{1}{N} \sum \left ( \frac{X_i-X_{i-1}}{\sqrt{T_i-T_{i-1}}} \right )^2 = \frac{1}{N} \sum \frac{(X_i-X_{i-1})^2}{T_i-T_{i-1}}$

This puts disproportionate weight on areas with more frequent sampling.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.