Calculating Monthly Realized Variance from Daily Returns
Summary
The document explains how to calculate monthly realized variance from daily log-price data when daily returns are centered by their monthly average. Its answer says to sum the squared deviations across the month rather than average them. It writes this as the sum of squared daily returns minus the monthly mean and relates that quantity to the more familiar sum of squared returns.
The explanation assumes equally spaced intramonth observations and uses a month of 22 trading days as its illustration. It notes that subtracting the estimated mean can matter at monthly frequency, while in some high-frequency settings that effect is small enough to ignore. The post offers a mathematical reformulation rather than empirical comparisons, and its conclusions depend on the sampling convention and return definition used. Readers should check that their target paper’s realized-variance convention matches this centered sum before applying it elsewhere.
Key ideas
- Monthly realized variance is computed by summing squared daily returns after subtracting the monthly mean return.
- The monthly mean is the average of the intramonth returns, while the squared deviations are summed.
- Under the stated setup, the centered sum is related to the conventional sum of squared returns.
- The exposition assumes equally spaced observations and illustrates the calculation with 22 days per month.
- Mean-centering effects may be negligible in some high-frequency settings, but the post cautions that this need not hold for monthly data.
Tags
Full text
# Compute monthly realized variance from daily data
# Compute monthly realized variance from daily data
I am confused about the correct formula to compute monthly realized variance from daily data. What is the first sigma in the picture: sum or average? I mean, after subtracting each observation from monthly mean and then squaring each difference, should I just take the sum for each month or take the average?
## Answer by Pleb (score 0, accepted)
https://quant.stackexchange.com/a/73940
### You should take the sum:
The non-standard definition of realized variance in the paper of Moreira, A., & Muir, T. (2017), is an attempt to avoid an excessive amount of "infill" mathematical notation otherwise found in standard high-frequency econometrical literature. In essence, the entire paper is void of mathematical notation and only seek to define statistical models/methods where absolute necessary.
### Reformulation:
Let $X_t$ be the log-price process, $t \geq 0$ denote the $t$'th month in your dataset and define $n$ as the "intramonth periods" (the authors assume $n=22$ days for each month). We can then define a sequence of partitions between each month $t-1=t_0 < t_1 < \cdots < t_n = t$ such that $\sup_i t_i - t_{i-1} \rightarrow 0$ for $n \rightarrow \infty$. This just implies that, as $n$ increases the distance between each intramonth timepoint converges to 0.
Furthermore, under the assumption of equidistant time-spacing of the intramonth periods, $t_i = \frac{i}{n}$ for $i=1,\ldots,n$, we can redefine the realized variance between $t-1$ and $t$ as follows:$\;^{1}$
\begin{align*} RV_t &= \sum_{i=1}^n \left( \left(X_{\frac{i}{n}} - X_{\frac{(i-1)}{n}}\right)- \frac{1}{n} \sum_{i=1}^n \left(X_{\frac{i}{n}} - X_{\frac{(i-1)}{n}}\right) \right)^2\\ &= \sum_{i=1}^n \left( R_{i,t}- \frac{1}{n} \sum_{i=1}^n R_{i,t} \right)^2\\ &= \sum_{i=1}^n \left( R_{i,t}- \bar{R}_{t} \right)^2\\ &\overset{\star}{=} \sum_{i=1}^n R_{i,t}^2 \end{align*}
where $\bar{R}_{t} = \frac{1}{n} \sum_{i=1}^n R_{i,t}$. The second equality is analogous to the definition of RV in the aforementioned paper and the last equality is standard for high-frequency econometrical papers dealing with intraday sampling frequencies.
Conclusively, after subtracting the monthly average ($\bar{R}_t$) from the intramonth periods ($R_{i,t}$) and then squaring the difference, you need to sum the squared differences.
1 The time-spacing between each intramonth period is then, $\Delta_i = t_i - t_{i-1} = \frac{i}{n} - \frac{i-1}{n}=\frac{1}{n} = \frac{1}{22}$, which is where the $\frac{1}{22}$ in the sum comes from.
$\star$ Very often high-frequency econometrical papers deal with intraday periods of different sizes. Between each day the effect of the estimated mean ($\bar{R}_t$) on realized variance/volatility, is very small and often negligible. As such it's safe to ignore (See this answer for details). However, this can not be said for intramonth periods.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.