CONTENTS

Exercise: Quadratic Variation by Simulation

Prerequisites: Brownian Motion

Problem

The lesson states that the quadratic variation of Brownian motion on [0,T][0, T] is deterministic:

i=0n1(Wti+1Wti)2L2Tas maxi(ti+1ti)0\sum_{i=0}^{n-1}(W_{t_{i+1}} - W_{t_i})^2 \xrightarrow{L^2} T \quad \text{as } \max_i(t_{i+1} - t_i) \to 0

This exercise asks you to verify the statement numerically and quantify the rate of convergence.

  1. Simulate a single Brownian path on [0,1][0, 1] using a uniform grid of nn points. For n=10,100,1000,10000n = 10, 100, 1000, 10000, compute the sample quadratic variation Qn=i=0n1(Wti+1Wti)2Q_n = \sum_{i=0}^{n-1}(W_{t_{i+1}} - W_{t_i})^2. Report each value.
  2. Compare to the first-order variation Vn=i=0n1Wti+1WtiV_n = \sum_{i=0}^{n-1}|W_{t_{i+1}} - W_{t_i}| at the same grid sizes. Describe how VnV_n scales with nn, and contrast with QnQ_n.
  3. For the n=1000n = 1000 case, repeat the simulation N=1000N = 1000 times and plot (or summarise statistics of) the empirical distribution of QnQ_n. Is the limit exactly T=1T = 1, or does it fluctuate? Report the sample mean and standard deviation, and compare the standard deviation to the theoretical 2T/n\sqrt{2T/n} prediction.
  4. Conceptually: explain in one paragraph why VnV_n \to \infty is consistent with QnTQ_n \to T.

Hint

Use rng.standard_normal(n) to generate the i.i.d. Gaussian increments. For part 3, the theoretical variance of QnQ_n under a uniform grid is Var(Qn)=2T2/n\operatorname{Var}(Q_n) = 2T^2/n.
Jump to the solution when you're ready.