The quadratic variation of a process is an extension of the notion of the total variation of a function, but rather than summing the absolute values of the changes of a function sampled at a sequence of times, the squares are summed. This has important applications in stochastic calculus, appearing in the integration by parts and change of variables formulas for stochastic integration. The quadratic variation also has applications to the study of martingales, occuring in the Ito isometry and Burkholder-Davis-Gundy inequalities.

An important example is for a Brownian motion $W$. In this case, the quadratic variation is $[W]_{t}=t$ and, by Lévy’s theorem, this fact characterizes Brownian motion among all local martingales. Quadratic variations are well defined for all cadlag martingales and, more generally, all semimartingales.

In standard, non-stochastic calculus, quadratic variation does not play a large role. This is because it is equal to zero for all continuously differentiable processes and, in fact, for all continuous finite variation processes. Furthermore, it can be shown if any continuous deterministic process has a well defined quadratic variation along all partitions (http://planetmath.org/Partition3), then it is zero.

In the following definitions, we assume the existence of a probability space $(\Omega,\mathcal{F},\mathbb{P})$.

## 1 discrete time processes

Let $(X_{t})$ be a stochastic process, with time ranging over the nonnegative integers $t=0,1,2,\ldots$. Then, the quadratic variation $[X]$ is the process

 $[X]_{t}=\sum_{s=1}^{t}(X_{s}-X_{s-1})^{2}.$

Similarly, for processes $X,Y$, the quadratic covariation $[X,Y]$ is defined by

 $[X,Y]_{t}=\sum_{s=1}^{t}(X_{s}-X_{s-1})(Y_{s}-Y_{s-1}).$

Note that $[X,Y]$ is bilinear and symmetric in interchanging $X$ and $Y$. The quadratic variation is alternatively given by $[X]=[X,X]$, and the covariation can be written in terms of the quadratic variation by the polarization identity,

 $[X,Y]=([X+Y]-[X-Y])/4.$

## 2 quadratic variation on an interval

Now suppose that $(X_{t})$ is a stochastic process with time $t$ running over the interval $[0,T]$, for some $T>0$. If $P$ is a partition of the interval,

 $P=\left\{0=\tau_{0}\leq\tau_{1}\leq\cdots\leq\tau_{m}=T\right\}$

then we can define the quadratic variation and covariation along the partition $P$ by

 $\displaystyle[X]^{P}\equiv\sum_{k=1}^{m}(X_{\tau_{k}}-X_{\tau_{k-1}})^{2},$ $\displaystyle[X,Y]^{P}\equiv\sum_{k=1}^{m}(X_{\tau_{k}}-X_{\tau_{k-1}})(Y_{% \tau_{k}}-Y_{\tau_{k-1}}).$

The mesh of the partition is $|P|=\max_{k}(\tau_{k}-\tau_{k-1})$. Given a sequence of partitions $P_{n}$ with mesh going to zero as $n\rightarrow\infty$, the quadratic variation and covariation are defined by

 $[X]_{T}\equiv\lim_{n\rightarrow\infty}[X]^{P_{n}},\ [X,Y]_{T}\equiv\lim_{n% \rightarrow\infty}[X,Y]^{P_{n}}.$

It is only required that these limits exist under convergence in probability, which is much weaker than requiring convergence for all or almost all $\omega\in\Omega$. The limits are not guaranteed to exist. If they do, then the quadratic variation and covariation are said to exist along the sequence of partitions $P_{n}$.

More generally, random partitions can be used where the times $\tau_{k}$ are random variables, usually stopping times. In this case, the processes $X,Y$ are required to satisfy additional properties in order for their values at a random time to make sense, normally that they are right-continuous or cadlag. The mesh of each partition $P_{n}$ is then a random variable, and is only required to tend to zero in probability as $n\rightarrow\infty$.

If the quadratic variation (respectively, covariation) exists along all such sequences of non-stochastic, or deterministic, partitions then it is easily shown to be independent of the sequence of partitions used. In this case, we simply say that the quadratic variation $[X]_{T}$ (resp. covariation $[X,Y]_{T}$) exists without referring to the partitions used.

## 3 quadratic variation as a process

Suppose that $(X_{t})$ and $(Y_{t})$ are stochastic processes with time index running over the nonnegative real numbers, $t\in\mathbb{R}_{+}$. In this case, the quadratic variation and covariation can be defined as as above over the interval $[0,t]$, for each $t>0$.

However, in continuous-time, defining it in this way does not determine the sample paths of the processes $[X]_{t}$, $[X,Y]_{t}$. This is because these random variables are only defined $\mathbb{P}$-almost everywhere at each $t$, which does not say anything about their joint properties at uncountably many times. It is possible to remedy this by requiring that the quadratic variation and covariation be right-continuous. That is, we take a right-continuous version of the processes.

Alternatively, the limits can be taken simultaneously at all times. If $P$ is a partition of $\mathbb{R}_{+}$,

 $P=\left\{0=\tau_{0}\leq\tau_{1}\leq\tau_{2}\leq\cdots\uparrow\infty\right\}$

then the quadratic variation and covariation along the partition $P$ are the processes

 $\displaystyle[X]^{P}_{t}\equiv\sum_{k=1}^{\infty}\left(X_{\tau_{k}\wedge t}-X_% {\tau_{k-1}\wedge t}\right)^{2},$ $\displaystyle[X,Y]^{P}_{t}\equiv\sum_{k=1}^{\infty}\left(X_{\tau_{k}\wedge t}-% X_{\tau_{k-1}\wedge t}\right)\left(Y_{\tau_{k}\wedge t}-Y_{\tau_{k-1}\wedge t}% \right).$

Since $\tau_{k}\rightarrow\infty$, all but finitely many terms in these sums will be zero. As above, the partition $P$ may be random, in which case $\tau_{k}$ are random variables.

Now suppose that $P_{n}$ is a sequence of such partitions whose mesh over the bounded intervals $[0,t]$, $|P_{n}^{t}|\equiv\max_{k}(\tau_{k}\wedge t-\tau_{k-1}\wedge t)$ tends to zero in probability as $n\rightarrow\infty$. Then the quadratic variation and covariation along $P_{n}$ is defined by the limits

 $[X]\equiv\lim_{n\rightarrow\infty}[X]^{P_{n}},\ [X,Y]\equiv\lim_{n\rightarrow% \infty}[X,Y]^{P_{n}}.$

If the quadratic variation or covariation exists along all such sequences of deterministic partitions then, as above, they are simply said to exist without making reference to the partitions used.

As squares of real numbers are positive, it follows that the quadratic variation is an increasing process and, by the polarization identity, if $[X],[Y],[X,Y]$ all exist then the quadratic covariation is a difference of increasing functions, and so is a finite variation process.

The quadratic variation and covariation are sometimes written as

 $[X]_{t}=\int_{0}^{t}\,(dX)^{2},\ [X,Y]_{t}=\int_{0}^{t}\,dX\,dY,$

and in differential notation,

 $d[X]_{t}=(dX_{t})^{2},\ d[X,Y]_{t}=dX_{t}\,dY_{t}.$

If we write $\Delta X_{t}\equiv X_{t}-X_{t-}$ for the jump of a cadlag process at time $t$ then, as a consequence of ucp convergence,

 $\Delta[X]_{t}=(\Delta X_{t})^{2},\ \Delta[X,Y]_{t}=\Delta X_{t}\Delta Y_{t}.$

These identities hold simultaneously for all times $t>0$, with probability one.