Tutorials › Stochastic Calculus › Generator Calculations for Standard Diffusions

Diffusions and the Markov Property · Tutorial 352 of 600

Generator Calculations for Standard Diffusions

Learn to calculate and verify the generator of four standard diffusions, including how each drift and diffusion coefficient determines its first- and second-order terms.

Advanced 12 min read

What You'll Learn

  • State the infinitesimal generator on suitable test-function domains.
  • Derive the drift and second-order terms from Itô’s formula.
  • Calculate the generator of Brownian motion and geometric Brownian motion.
  • Calculate and check the Ornstein–Uhlenbeck generator, including its short-time second moment.
  • Calculate the CIR generator and identify its behavior at the zero boundary.
  • Avoid confusing the diffusion coefficient with the coefficient of the second derivative.

From an SDE to Its Generator

The infinitesimal generator records the first-order change in the expected value of a test function over a short time interval. For a diffusion with drift \(b(x)\) and diffusion coefficient \(a(x)\), the drift contributes a first-derivative term, while Brownian quadratic variation produces a second-derivative term. The coefficient of that second-order term is one half the squared diffusion coefficient. This tutorial calculates that operator for four standard models and checks selected calculations directly from short-time expectations.

Work on a filtered probability space \((\Omega,\mathcal{F},(\mathcal{F}_t)_{t\ge0},\mathbb{P})\) carrying a Brownian motion \(B_t\). For an initial state \(x\), consider a continuous solution \(X_t^x\) of \(dX_t^x=b(X_t^x)\,dt+a(X_t^x)\,dB_t\), with \(X_0^x=x\). The Ito integral here and below is taken with a progressively measurable integrand \(H_s\) satisfying \(\mathbb{E}\int_0^T H_s^2\,ds<\infty\) on each time interval where it is used. The standard global Lipschitz and linear growth conditions on \(b\) and \(a\) are sufficient for a unique strong solution with finite second moments. The CIR diffusion, whose diffusion coefficient is not globally Lipschitz, will instead be considered under its usual positive-parameter, nonnegative-solution assumptions.

Definition: For a time-homogeneous Markov diffusion \(X_t^x\), its generator on a test function \(f\) is \(\mathcal{L}f(x)=\lim_{h\downarrow0}\big(\mathbb{E}[f(X_h^x)]-f(x)\big)/h\), when this limit exists. For the diffusions below, the stated test-function domains are twice continuously differentiable functions with compact support on the indicated state space. For CIR, derivatives at zero are understood as right derivatives.

The following calculation justifies the formula used throughout. In the Ito multiplication table, \(dB_t\,dB_t=dt\), \(dB_t\,dt=0\), and \(dt\,dt=0\); the second-order term in Ito’s formula is the contribution of the first of these rules.

Theorem: Suppose \(X_t^x\) is a continuous solution of the SDE above and \(f\) is twice continuously differentiable. Suppose \(f(X_h^x)\) is integrable, \(\mathcal{L}f=b f'+\tfrac12 a^2 f''\) is bounded and continuous, and \(a(X_s^x)f'(X_s^x)\) is progressively measurable with \(\mathbb{E}\int_0^T a(X_s^x)^2f'(X_s^x)^2\,ds<\infty\). Then the generator limit exists and equals \(\mathcal{L}f(x)=b(x)f'(x)+\tfrac12a(x)^2f''(x)\).

Proof. Ito’s formula for the time-independent function \(f\) has \(f_t=0\), \(f_x=f'\), and \(f_{xx}=f''\), so it gives \(df(X_t^x)=f'(X_t^x)b(X_t^x)\,dt+f'(X_t^x)a(X_t^x)\,dB_t+\tfrac12 f''(X_t^x)a(X_t^x)^2\,dt\). The stochastic integral has a progressively measurable integrand in \(\mathcal{L}^2\), by the stated integrability assumption. The Ito isometry makes it square-integrable; it is a martingale with conditional expectation of each future increment, given the current filtration, equal to zero. This property follows first for adapted step integrands from the zero conditional mean of Brownian increments and then for \(\mathcal{L}^2\) integrands by the Ito-isometry limit. Taking expectations in the integrated formula therefore yields \(\mathbb{E}[f(X_h^x)]-f(x)=\int_0^h\mathbb{E}[\mathcal{L}f(X_s^x)]\,ds\). Path continuity implies \(\mathcal{L}f(X_s^x)\to\mathcal{L}f(x)\) almost surely as \(s\downarrow0\). Boundedness of \(\mathcal{L}f\) permits dominated convergence, so the average of these expectations over \([0,h]\) tends to \(\mathcal{L}f(x)\). Dividing by \(h\) proves the generator limit and the formula. \(\square\)

Four Generator Calculations

Proposition: On the stated test-function domains, the generators of Brownian motion, geometric Brownian motion, the Ornstein–Uhlenbeck diffusion, and the CIR diffusion are, respectively, \(\tfrac12 f''(x)\), \(\mu x f'(x)+\tfrac12\sigma^2x^2 f''(x)\), \(\kappa(\theta-x)f'(x)+\tfrac12\eta^2 f''(x)\), and \(\kappa(\theta-x)f'(x)+\tfrac12\sigma^2x f''(x)\).

Proof. Each formula follows by substituting the drift and diffusion coefficient of the corresponding SDE into the theorem. For Brownian motion the coefficients are \(b(x)=0\) and \(a(x)=1\), giving \(\tfrac12 f''(x)\). For geometric Brownian motion they are \(b(x)=\mu x\) and \(a(x)=\sigma x\), giving \(\mu x f'(x)+\tfrac12\sigma^2x^2 f''(x)\). For the Ornstein–Uhlenbeck SDE \(dX_t=\kappa(\theta-X_t)\,dt+\eta\,dB_t\), they are \(b(x)=\kappa(\theta-x)\) and \(a(x)=\eta\), giving the stated formula. For the CIR SDE \(dr_t=\kappa(\theta-r_t)\,dt+\sigma\sqrt{r_t}\,dB_t\), the squared diffusion coefficient is \(a(x)^2=\sigma^2x\) on the nonnegative state space, giving its stated formula. For compactly supported test functions in each domain, the resulting \(\mathcal{L}f\) is bounded and continuous, including at the CIR boundary \(x=0\). The theorem applies whenever its stated integrability assumptions hold. \(\square\)

Worked Example: Brownian Motion Applied to a Fourth Power

For Brownian motion started at \(x=1\), calculate the generator’s action on \(f(x)=x^4\), then check the result from the short-time expectation. This polynomial is not compactly supported, but both calculations are valid because Brownian motion has finite moments of every order on finite time intervals.

The derivatives are \(f'(x)=4x^3\) and \(f''(x)=12x^2\). Brownian motion has drift \(0\) and diffusion coefficient \(1\), so \(\mathcal{L}f(x)=\tfrac12(12x^2)=6x^2\), and \(\mathcal{L}f(1)=6\).

For the independent check, \(X_h^1=1+B_h\), where \(B_h\) is normal with mean \(0\), variance \(h\), and fourth moment \(3h^2\). Expanding and using its odd moments of zero gives \(\mathbb{E}[(1+B_h)^4]=1+6h+3h^2\). Thus \(\big(\mathbb{E}[f(X_h^1)]-f(1)\big)/h=6+3h\), which tends to \(6\) as \(h\downarrow0\), matching the generator calculation.

Worked Example: Geometric Brownian Motion Applied to the Logarithm

Let \(dS_t=\tfrac14 S_t\,dt+\tfrac12 S_t\,dB_t\), with \(S_0=2\), and calculate the generator applied to \(f(s)=\log s\). The state space is \((0,\infty)\). Although the logarithm is not compactly supported, the calculation is valid: the explicit solution is positive, and the Ito integrand for \(f\) is the constant \(\tfrac12\), which is in \(\mathcal{L}^2\) on every finite interval.

Here \(f'(s)=1/s\) and \(f''(s)=-1/s^2\). Substitution into the geometric Brownian generator gives \(\mathcal{L}f(s)=\tfrac14s(1/s)+\tfrac12(\tfrac12)^2s^2(-1/s^2)=\tfrac14-\tfrac18=\tfrac18\).

For a direct check, Ito’s formula has \(f_t=0\), \(f_s=1/s\), \(f_{ss}=-1/s^2\). Its drift term is \(\tfrac14-\tfrac18=\tfrac18\), and its stochastic integrand is \(\tfrac12\). This integrand is progressively measurable and has expected squared integral \(\mathbb{E}\int_0^T(1/2)^2\,dt=T/4<\infty\). The stochastic integral is a square-integrable martingale of mean zero. Equivalently, the explicit solution gives \(\log S_h=\log2+(\tfrac14-\tfrac18)h+\tfrac12 B_h\), so \(\mathbb{E}[\log S_h]=\log2+\tfrac18h\). The expected short-time difference divided by \(h\) is exactly \(\tfrac18\), as required.

Worked Example: Checking an Ornstein–Uhlenbeck Second Moment

Consider \(dX_t=2(1-X_t)\,dt+\tfrac32\,dB_t\), with \(X_0=2\), and use \(f(x)=x^2\). The derivatives are \(f'(x)=2x\) and \(f''(x)=2\). The generator is \(\mathcal{L}f(x)=2(1-x)(2x)+\tfrac12(\tfrac32)^2(2)=4x(1-x)+\tfrac94\). At \(x=2\), this is \(4(2)(-1)+\tfrac94=-8+\tfrac94=-\tfrac{23}{4}\).

Check the value directly using the explicit Ornstein–Uhlenbeck solution. At time \(h\), \(X_h=1+e^{-2h}+\tfrac32\int_0^h e^{-2(h-s)}\,dB_s\). The deterministic integrand \(e^{-2(h-s)}\) is progressively measurable, and its squared integral has finite expectation on \([0,h]\). By the Ito isometry, the stochastic integral has mean zero and variance \(\int_0^h e^{-4(h-s)}\,ds=(1-e^{-4h})/4\). Consequently, \(\mathbb{E}[X_h^2]=(1+e^{-2h})^2+\tfrac{9}{16}(1-e^{-4h})\).

Differentiate the first term at \(h=0\): its derivative is \(2(1+1)(-2)=-8\). The derivative of the variance term is \(\tfrac{9}{16}\cdot4=\tfrac94\). Their sum is \(-8+\tfrac94=-\tfrac{23}{4}\), agreeing with the generator. In particular, the variance coefficient is \(\eta^2/(2\kappa)=\tfrac{9}{16}\), not \(\eta^2/(4\kappa)\).

Worked Example: CIR Drift at a Positive State

Take the CIR model \(dr_t=2(\tfrac32-r_t)\,dt+\sqrt{r_t}\,dB_t\), starting from \(r_0=1\). Its parameters satisfy \(\kappa=2\), \(\theta=\tfrac32\), and \(\sigma=1\); assume the usual nonnegative CIR solution. For the coordinate function \(f(r)=r\), the derivatives are \(f'(r)=1\) and \(f''(r)=0\). Therefore \(\mathcal{L}f(r)=2(\tfrac32-r)\), and at \(r=1\) the generator is \(2(\tfrac12)=1\).

For a check, the SDE’s stochastic integrand is \(\sqrt{r_s}\), which is progressively measurable. The CIR first moment is finite on bounded time intervals, so \(\mathbb{E}\int_0^T r_s\,ds<\infty\); hence this integrand is in \(\mathcal{L}^2\), and its Ito integral is a square-integrable martingale with mean zero. Taking expectations in the integrated SDE gives \(m'(t)=2(\tfrac32-m(t))\), \(m(0)=1\). Solving yields \(m(t)=\tfrac32-\tfrac12e^{-2t}\). Thus \((m(h)-m(0))/h=\tfrac12(1-e^{-2h})/h\to1\), confirming the generator value. The second-order term is still present for nonlinear tests: for \(f(r)=r^2\), it is \(\tfrac12 r f''(r)\), not \(\tfrac12 f''(r)\).

Reading the Coefficients Correctly

In one dimension, the coefficient multiplying \(f'\) is the drift \(b(x)\); the coefficient multiplying \(f''\) is \(\tfrac12a(x)^2\), where \(a(x)\) is the diffusion coefficient in the SDE. Squaring the diffusion coefficient is essential. The resulting operators can be compared directly:

DiffusionDrift coefficientDiffusion coefficientGenerator
Brownian motion\(0\)\(1\)\(\tfrac12 f''\)
Geometric Brownian motion\(\mu x\)\(\sigma x\)\(\mu x f'+\tfrac12\sigma^2x^2f''\)
Ornstein–Uhlenbeck\(\kappa(\theta-x)\)\(\eta\)\(\kappa(\theta-x)f'+\tfrac12\eta^2f''\)
CIR\(\kappa(\theta-x)\)\(\sigma\sqrt{x}\)\(\kappa(\theta-x)f'+\tfrac12\sigma^2x f''\)

Common mistake. For geometric Brownian motion, writing \(\tfrac12\sigma x f''(x)\) is incorrect: it uses the diffusion coefficient without squaring it. The Ito correction is \(\tfrac12(\sigma x)^2 f''(x)=\tfrac12\sigma^2x^2f''(x)\). For CIR, squaring \(\sigma\sqrt{x}\) instead gives \(\sigma^2x\), so the second-order coefficient is \(\tfrac12\sigma^2x\). At the boundary \(x=0\), that second-order coefficient vanishes; the drift coefficient there is \(\kappa\theta\). These coefficient checks are a practical way to catch errors before applying a generator.

Check Your Understanding

For each calculation, identify the drift and diffusion coefficients before applying the generator formula.

  1. For Brownian motion and \(f(x)=x^3\), compute \(\mathcal{L}f(x)\).
  2. For \(dS_t=\mu S_t\,dt+\sigma S_t\,dB_t\), calculate \(\mathcal{L}f(s)\) when \(f(s)=s^2\).
  3. For \(dX_t=\kappa(\theta-X_t)\,dt+\eta\,dB_t\), evaluate \(\mathcal{L}f(x)\) for \(f(x)=x^2\).
  4. For the CIR generator, evaluate \(\mathcal{L}f(0)\) for a twice continuously differentiable \(f\) on \([0,\infty)\).
  5. Explain why the second-order coefficient for geometric Brownian motion contains \(x^2\), whereas the CIR coefficient contains \(x\).