Deriving the Drift-Corrected Variance of Log Returns
Summary
The document explains how to calculate sample variance from consecutive close-to-close log returns while accounting for their estimated drift. The question begins with a sum of squared log returns and asks how the drift adjustment appears in an alternative expression. The answer identifies a misplaced parenthesis and gives the corrected relationship: subtract the squared cumulative log return as a separate correction term, scaled by the sample size and its degrees-of-freedom adjustment.
The derivation expands each return after subtracting the average return, then uses the fact that the individual log returns sum to the log of the ratio between the final and initial prices. This simplifies the cross term and yields the compact formula. The explanation is algebraic and applies to a finite sample of close-to-close returns; it does not discuss annualization, serial dependence, or volatility estimation from intraday or range-based data.
Key ideas
- Drift-corrected sample variance is computed by centering each log return on the average log return.
- The individual log returns sum to the log return from the initial close to the final close.
- Expanding the centered squares produces a correction involving the squared cumulative log return.
- The correction must be outside the sum, with the sample-size factors applied separately.
Tags
Full text
# variance of log return
# variance of log return
Suppose $C_i$ is i-day's closed price, when drift is small, we have the close to close variance $$\sigma^2 =\dfrac{1}{n}\sum\limits^n_{i = 1}\left(\log\left(\dfrac{C_i}{C_{i-1}}\right)\right)^2.$$ If we adjust this for the drift, $$\sigma^2 =\dfrac{1}{n-1}\sum\limits^n_{i = 1}\left(\left(\log\left(\dfrac{C_i}{C_{i-1}}\right)\right)^2 - \dfrac{\log\left(\left(\dfrac{C_n}{C_0}\right)\right)^2}{n(n-1)}\right).$$ I don't know how to obtain the later one in the bracket? I know the original one should be $$\left(\log\left(\dfrac{C_i}{C_{i-1}}\right) - \dfrac{\log\left(\dfrac{C_n}{C_0}\right)}{n}\right)^2$$
## Answer by msitt (score 3, accepted)
https://quant.stackexchange.com/a/33487
You have the parentheses in the wrong place! The correct formula is $$ \sigma^2 = \frac{1}{n-1}\left(\sum_{i=1}^n\ln^2\left(\frac{C_i}{C_{i-1}}\right)\right)-\frac{1}{n(n-1)}\ln^2\left(\frac{C_n}{C_{0}}\right) $$ To see this, start with your original formula and expand. $$ \begin{align} \sigma^2 &= \frac{1}{n-1}\sum\left[\ln\left(\frac{C_i}{C_{i-1}}\right)-\frac{1}{n}\ln\left(\frac{C_n}{C_0}\right)\right]^2 \\ &= \frac{1}{n-1}\left[\sum\ln^2\left(\frac{C_i}{C_{i-1}}\right)-\sum\frac{2}{n}\ln\left(\frac{C_n}{C_0}\right)\ln\left(\frac{C_i}{C_{i-1}}\right)+\sum\frac{1}{n^2}\ln^2\left(\frac{C_n}{C_0}\right)\right] \\ &= \frac{1}{n-1}\left[\sum\ln^2\left(\frac{C_i}{C_{i-1}}\right)-\frac{2}{n}\ln^2\left(\frac{C_n}{C_0}\right)+\frac{1}{n}\ln^2\left(\frac{C_n}{C_0}\right)\right] \\ &= \frac{1}{n-1}\left[\sum\ln^2\left(\frac{C_i}{C_{i-1}}\right)-\frac{1}{n}\ln^2\left(\frac{C_n}{C_0}\right)\right] \\ &= \frac{1}{n-1}\sum_{i=1}^n\ln^2\left(\frac{C_i}{C_{i-1}}\right)-\frac{1}{n(n-1)}\ln^2\left(\frac{C_n}{C_{0}}\right) \end{align} $$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.