Tutorials › Stochastic Calculus › Measuring Quadratic Variation from Simulated Paths

Computational Projects in Stochastic Calculus · Tutorial 593 of 600

Measuring Quadratic Variation from Simulated Paths

Compute quadratic-variation sums from simulated paths and distinguish their expected convergence to elapsed time from the variability seen on any one finite grid.

Intermediate 10 min read

What You'll Learn

  • Define a squared-increment statistic on a time partition.
  • Derive its expectation, variance, and mean-square convergence for Brownian motion.
  • Interpret how grid refinement affects finite-grid variability.
  • Compute quadratic-variation sums from a nested simulated path record.
  • Estimate simulation error when averaging results across independent paths.
  • Recognize why one finite simulation need not equal elapsed time.

What a Simulated Quadratic-Variation Sum Measures

A Brownian path is simulated at finitely many time points, so its quadratic variation is not observed as a continuous-time limit. Instead, one computes a squared-increment sum on a grid and compares it with the elapsed time. Refining the grid gives a sequence of statistics whose expected value stays fixed while their variability decreases. This distinction matters: a single finite-grid sum can differ noticeably from elapsed time without contradicting Brownian quadratic variation.

Work on a filtered probability space \((\Omega,\mathcal{F},(\mathcal{F}_t)_{t\ge0},\mathbb{P})\) carrying a standard Brownian motion \(B_t\). Its increments on disjoint intervals are independent, and \(B_{t_i}-B_{t_{i-1}}\) has distribution \(N(0,t_i-t_{i-1})\). An Ito integral, if used, is defined for a progressively measurable integrand \(H_s\) in \(\mathcal{L}^2\), meaning \(\mathbb{E}\int_0^T H_s^2\,ds<\infty\). No stochastic integral is needed for the finite-grid calculation below.

Definition: For a partition \(0=t_0<t_1<\cdots<t_n=T\), let \(\Delta t_i=t_i-t_{i-1}\) and \(\Delta B_i=B_{t_i}-B_{t_{i-1}}\). The quadratic-variation statistic on this grid is \(Q_\Pi=\sum_{i=1}^n(\Delta B_i)^2\). For \(n\) equal intervals of length \(h=T/n\), write \(Q_n=\sum_{i=1}^n(\Delta B_i)^2\).

The target \(T\) is elapsed time, not a value that each squared increment must equal. The rule \(dB_t\,dB_t=dt\) summarizes the limiting behavior of these sums as the mesh tends to zero; it is not an assertion that \((\Delta B_i)^2=\Delta t_i\) on every interval. In particular, the variance of a finite-grid statistic quantifies the fluctuations that remain in a simulation.

Finite-Grid Mean, Variance, and Convergence

Theorem: For any deterministic partition of \([0,T]\), \(\mathbb{E}[Q_\Pi]=T\) and \(\operatorname{Var}(Q_\Pi)=2\sum_{i=1}^n(\Delta t_i)^2\). Thus, along any sequence of partitions whose mesh tends to zero, \(Q_\Pi\to T\) in \(L^2(\mathbb{P})\).

Proof. Each increment is independent of the other increments and has distribution \(N(0,\Delta t_i)\). If \(Z\sim N(0,v)\), then \(\mathbb{E}[Z^2]=v\) and \(\mathbb{E}[Z^4]=3v^2\). Therefore \(\mathbb{E}[(\Delta B_i)^2]=\Delta t_i\), and

$$ \operatorname{Var}\big((\Delta B_i)^2\big) =\mathbb{E}\big[(\Delta B_i)^4\big]-\left(\mathbb{E}\big[(\Delta B_i)^2\big]\right)^2 =3(\Delta t_i)^2-(\Delta t_i)^2 =2(\Delta t_i)^2. $$

Linearity of expectation gives \(\mathbb{E}[Q_\Pi]=\sum_i\Delta t_i=T\). Independence of the increments implies independence of their squares, so the variance of their sum is the sum of their variances. This gives the stated variance. Since the mean is \(T\),

$$ \mathbb{E}\big[(Q_\Pi-T)^2\big] =\operatorname{Var}(Q_\Pi) =2\sum_i(\Delta t_i)^2 \le 2|\Pi|\sum_i\Delta t_i =2T|\Pi|, $$

where \(|\Pi|=\max_i\Delta t_i\) and \((\Delta t_i)^2\le|\Pi|\Delta t_i\). The right side tends to zero when the mesh tends to zero, which is precisely convergence in \(L^2(\mathbb{P})\). \(\square\)

For equal intervals, \(\operatorname{Var}(Q_n)=2T^2/n\). Consequently the standard deviation is \(T\sqrt{2/n}\): doubling the number of grid intervals decreases the standard deviation by a factor of \(1/\sqrt{2}\), not by a factor of \(1/2\). This is a statement about the distribution across simulated paths. It does not guarantee that the statistics from one particular sequence of simulated paths decrease monotonically toward \(T\).

Worked Example: Expected Fluctuation on Two Equal Grids

Take \(T=1\). Find the mean, variance, and standard deviation of \(Q_n\) for \(n=4\) and \(n=16\).

For \(n=4\), each time increment has length \(1/4\). The mean is \(T=1\), and the variance is \(2T^2/n=2/4=1/2\). The standard deviation is \(\sqrt{1/2}=1/\sqrt{2}\).

For \(n=16\), each time increment has length \(1/16\). The mean is again \(1\), and the variance is \(2/16=1/8\). The standard deviation is \(\sqrt{1/8}=1/(2\sqrt{2})\).

Check: the variance ratio is \((1/2)/(1/8)=4\), so the standard deviation ratio is \(\sqrt{4}=2\). This agrees with refining the grid from 4 to 16 intervals: the standard deviation falls from \(1/\sqrt{2}\) to \(1/(2\sqrt{2})\). It does not say that every observed value at \(n=16\) must be closer to 1 than every observed value at \(n=4\).

Computing a Nested Simulated Path Record

For an actual simulation, generate Brownian increments on a grid and add them cumulatively to obtain the path values. A nested grid retains the old time points when new ones are inserted. The increments on the finer grid then split the coarser increments: the two finer increments within an interval must sum to that interval's original increment. The following exact decimal record illustrates the calculation. Treat the displayed values as the simulated increments being analyzed; the arithmetic is exact for those displayed values.

Worked Example: Refining One Path from One to Eight Intervals

On \([0,1]\), suppose the level-one increment is \(0.5\). At each refinement, the listed increments split each previous increment into two. Compute \(Q_n\) at levels \(n=1,2,4,8\), and compare each value with elapsed time 1.

At level 1 the sole increment is \(0.5\), so \(Q_1=(0.5)^2=0.25\).

At level 2 the increments are \(0.75,-0.25\). They sum to \(0.75-0.25=0.5\), preserving the level-one increment, and

$$ Q_2=(0.75)^2+(-0.25)^2=0.5625+0.0625=0.625. $$

At level 4 the increments are \(0.8,-0.05,0.15,-0.4\). The first pair sums to \(0.75\) and the second to \(-0.25\), so the coarse increments are preserved. Squaring and adding gives

$$ Q_4=(0.8)^2+(-0.05)^2+(0.15)^2+(-0.4)^2 =0.64+0.0025+0.0225+0.16 =0.825. $$

At level 8, split these four increments as \((0.65,0.15)\), \((0.225,-0.275)\), \((0.325,-0.175)\), and \((0.05,-0.45)\). Each pair sums to its parent increment. Their squared contributions are \(0.4225+0.0225=0.445\), \(0.050625+0.075625=0.12625\), \(0.105625+0.030625=0.13625\), and \(0.0025+0.2025=0.205\). Hence \(Q_8=0.445+0.12625+0.13625+0.205=0.9125\).

Check: the successive absolute errors from elapsed time 1 are \(0.75\), \(0.375\), \(0.175\), and \(0.0875\), since \(1-0.25=0.75\), \(1-0.625=0.375\), \(1-0.825=0.175\), and \(1-0.9125=0.0875\). This particular record moves toward 1, but monotone improvement is not guaranteed for other simulated paths. The theorem predicts decreasing variability across the distribution, not a prescribed direction for every realized sequence.

A useful implementation check is to verify the nesting identity before comparing levels. If an old increment is \(\delta\) and its two children are \(\delta_1,\delta_2\), confirm \(\delta_1+\delta_2=\delta\). Then recompute the statistic directly from the increments at each level. Do not infer the finer statistic by merely copying the coarser one: in general, \(\delta_1^2+\delta_2^2\) differs from \((\delta_1+\delta_2)^2\).

Averaging Across Simulated Paths

Grid refinement and replication address different sources of variation. Refinement decreases the variance of \(Q_n\) for an individual path. Averaging across independent simulated paths decreases the variance of the estimated mean for a fixed grid. To see the second effect, let \(Q_n^{(1)},\ldots,Q_n^{(M)}\) be the statistics from \(M\) independent Brownian paths on the same grid, and let \(\overline Q_{n,M}=M^{-1}\sum_{j=1}^M Q_n^{(j)}\).

Proposition: For \(M\ge1\), \(\mathbb{E}[\overline Q_{n,M}]=T\) and \(\operatorname{Var}(\overline Q_{n,M})=2T^2/(nM)\) on an equal grid.

Proof. Each \(Q_n^{(j)}\) has expectation \(T\) and variance \(2T^2/n\) by the theorem. Therefore linearity gives \(\mathbb{E}[\overline Q_{n,M}]=M^{-1}\sum_{j=1}^M T=T\). The path simulations are independent, so their statistics are independent and the variance of their sum is the sum of their variances. Thus

$$ \operatorname{Var}(\overline Q_{n,M}) =\frac{1}{M^2}\sum_{j=1}^M\operatorname{Var}(Q_n^{(j)}) =\frac{1}{M^2}\,M\frac{2T^2}{n} =\frac{2T^2}{nM}. $$

This calculation includes \(M=1\), when it reduces to the single-path variance. \(\square\)

Worked Example: Four Paths on a Four-Interval Grid

For illustration, take \(T=1\), \(n=4\), and four independent simulated paths. Suppose their observed squared-increment sums are \(0.5,0.75,1.25,1.5\). Compute the sample average and the estimated standard error based on the sample variance.

The average is \((0.5+0.75+1.25+1.5)/4=4/4=1\). The deviations from this average are \(-0.5,-0.25,0.25,0.5\); their squares sum to \(0.25+0.0625+0.0625+0.25=0.625=5/8\). The unbiased sample variance is \((5/8)/(4-1)=5/24\). The estimated standard error of the average is therefore \(\sqrt{(5/24)/4}=\sqrt{5/96}\).

Check: the observed average equals the target 1, but this is a feature of these four displayed observations, not a guarantee for every simulation. The theoretical standard deviation of the average is \(\sqrt{2/(4\cdot4)}=\sqrt{1/8}=1/(2\sqrt{2})\), from the proposition. The sample-based estimate \(\sqrt{5/96}\) need not equal that theoretical value in a small sample.

Common Pitfalls and Interpretation

Do not treat the target as a pathwise identity. A mistaken calculation may replace every \((\Delta B_i)^2\) by \(\Delta t_i\), concluding that \(Q_\Pi=T\) on every grid. The correction is that each increment is random: its squared value has mean \(\Delta t_i\), but it is not fixed at that value. For instance, on a single interval of length \(1/4\), an increment of \(0.5\) has square \(0.25\), while an increment of \(0.25\) has square \(0.0625\). Both are possible values of an increment with distribution \(N(0,1/4)\); neither changes the expected square \(1/4\).

Do not confuse convergence in mean square with one-run behavior. The theorem's \(L^2\) conclusion says that the expected squared error tends to zero as the mesh shrinks. It does not imply that the values from one finite run must approach the target monotonically. Compare several independently simulated paths, or report the grid statistic alongside its theoretical standard deviation. If the average over paths is being used, state both the number of paths and the number of time intervals: its variance depends on their product \(nM\).

For equal grids on \([0,T]\), the identity \(\operatorname{Var}(Q_n)=2T^2/n\) also gives a diagnostic for code. If simulated values across many independent paths have a mean far from \(T\), check the increment scaling: increments over a step \(T/n\) should have variance \(T/n\), not variance \(T\). If the mean is plausible but the spread is too large, check whether the grid has the intended number of intervals and whether increments are being squared before summation.

Check Your Understanding

Use the definitions and formulas above. When comparing a statistic with elapsed time, specify whether you mean one simulated path or an average across independent paths.

  1. For \(T=2\) and \(n=8\), compute the theoretical mean and variance of \(Q_n\).
  2. Explain why splitting an increment \(\delta\) into \(\delta_1+\delta_2=\delta\) does not generally preserve the squared-increment sum.
  3. For \(T=1\), \(n=4\), and \(M=10\), compute the theoretical variance of the average statistic across paths.
  4. In the nested-path example, verify that the two level-8 increments \(0.225\) and \(-0.275\) sum to their level-4 parent increment.
  5. Does \(L^2\) convergence imply that every finite-grid value is closer to \(T\) after each refinement? Explain.