1. Home
  2. Explore
  3. Mathematics
  4. Stochastic Differential Equations

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Stochastic Differential Equations

Stochastic Differential Equations, Numerical Methods, and the Heat Equation

Stochastic differential equations

A stochastic differential equation (SDE) describes how a process changes under both a systematic trend and random fluctuations. A common form is

dXt=μ(t,Xt) dt+σ(t,Xt) dBt,dX_t=\mu(t,X_t)\,dt+\sigma(t,X_t)\,dB_t,dXt​=μ(t,Xt​)dt+σ(t,Xt​)dBt​,

where:

  • XtX_tXt​ is the process at time ttt.

  • μ(t,Xt)\mu(t,X_t)μ(t,Xt​) is the drift, describing its systematic change.

  • σ(t,Xt)\sigma(t,X_t)σ(t,Xt​) is the diffusion coefficient, determining the size of its random fluctuations.

  • BtB_tBt​ is Brownian motion.

Solving an SDE means finding a stochastic process XtX_tXt​ that satisfies the equation and a specified initial condition, such as X0=x0X_0=x_0X0​=x0​. As with ordinary and partial differential equations, an explicit closed-form solution is not generally available, even when a solution exists.

Existence and uniqueness

Under suitable regularity assumptions on the drift and diffusion functions, an SDE has a solution, and that solution is unique once its initial value is specified. A common sufficient set of conditions is:

  • Lipschitz continuity in the state variable: for some constant KKK,

    ∣μ(t,x)−μ(t,y)∣+∣σ(t,x)−σ(t,y)∣≤K∣x−y∣.|\mu(t,x)-\mu(t,y)|+|\sigma(t,x)-\sigma(t,y)| \leq K|x-y|.∣μ(t,x)−μ(t,y)∣+∣σ(t,x)−σ(t,y)∣≤K∣x−y∣.

    This means that small changes in the state cannot cause disproportionately large changes in either coefficient.

  • Linear growth: for some constant KKK,

    ∣μ(t,x)∣2+∣σ(t,x)∣2≤K2(1+∣x∣2).|\mu(t,x)|^2+|\sigma(t,x)|^2 \leq K^2(1+|x|^2).∣μ(t,x)∣2+∣σ(t,x)∣2≤K2(1+∣x∣2).

    This prevents the coefficients from growing too rapidly as the state becomes large.

These are sufficient, technical conditions rather than requirements that must be checked in every application. The main practical point is that a well-behaved SDE can have a unique solution even when that solution cannot be written as a convenient formula.


Explicitly solvable SDEs

Some SDEs have explicit solutions. Recognizing their structure can make it possible to solve them directly, although the same approach does not work for most equations.

Geometric Brownian motion

Consider the equation

dXt=μXt dt+σXt dBt,X0=x0,dX_t=\mu X_t\,dt+\sigma X_t\,dB_t, \qquad X_0=x_0,dXt​=μXt​dt+σXt​dBt​,X0​=x0​,

where μ\muμ and σ\sigmaσ are constants. Both the drift and the random fluctuation are proportional to the current value of the process.

Its solution is

Xt=x0exp⁡(σBt+(μ−σ22)t).X_t=x_0\exp\left(\sigma B_t+ \left(\mu-\frac{\sigma^2}{2}\right)t\right).Xt​=x0​exp(σBt​+(μ−2σ2​)t).

The correction −σ22t-\frac{\sigma^2}{2}t−2σ2​t arises from the second-derivative term in Itô’s formula, the stochastic counterpart of the chain rule. In particular, applying ordinary calculus alone to a function of Brownian motion would miss this term.

One way to find the solution is to look for a function of time and Brownian motion with an exponential dependence on the Brownian-motion variable, then use Itô’s formula and match the resulting drift and diffusion terms to the SDE. In practice, recognizing the exponential form may be more direct than carrying out the full derivation.

Ornstein–Uhlenbeck process

A second solvable example is the Ornstein–Uhlenbeck process:

dXt=−αXt dt+σ dBt,α>0.dX_t=-\alpha X_t\,dt+\sigma\,dB_t, \qquad \alpha>0.dXt​=−αXt​dt+σdBt​,α>0.

Here the drift pulls the process toward 000, while the random noise has constant size rather than being proportional to XtX_tXt​. If XtX_tXt​ is above 000, the drift tends to push it downward; if it is below 000, the drift tends to push it upward. This makes the process a model of mean reversion.

Its solution is

Xt=e−αtX0+σ∫0te−α(t−s) dBs.X_t=e^{-\alpha t}X_0+ \sigma\int_0^t e^{-\alpha(t-s)}\,dB_s.Xt​=e−αtX0​+σ∫0t​e−α(t−s)dBs​.

The first term decays exponentially with time, reflecting the drift’s pull toward 000. The second term collects the effects of random shocks over time, with earlier shocks weighted less heavily because of the exponential decay. For a deterministic initial value, the mean is

E[Xt]=X0e−αt.\mathbb{E}[X_t]=X_0e^{-\alpha t}.E[Xt​]=X0​e−αt.

Thus, the mean approaches 000 as time increases, although random fluctuations continue to affect the process.


Numerical solution of differential equations

When no useful explicit formula is available, numerical methods approximate a solution over a discrete grid of time and, where relevant, space points.

Finite difference method for an ordinary differential equation

For an ordinary differential equation

u′(t)=f(t,u(t)),u'(t)=f(t,u(t)),u′(t)=f(t,u(t)),

the time interval can be divided into steps of size hhh. A first-order Taylor approximation gives the Euler method:

ui+1≈ui+hf(ti,ui),u_{i+1}\approx u_i+h f(t_i,u_i),ui+1​≈ui​+hf(ti​,ui​),

where uiu_iui​ approximates the solution at time tit_iti​ and ti+1=ti+ht_{i+1}=t_i+hti+1​=ti​+h.

For example, consider

u′(t)=5u(t)+2,u(0)=0,u'(t)=5u(t)+2, \qquad u(0)=0,u′(t)=5u(t)+2,u(0)=0,

and approximate the solution at t=1t=1t=1 using two steps of size h=12h=\frac12h=21​:

  1. At the first step,

    u(12)≈u(0)+12(5u(0)+2)=1.u\left(\frac12\right)\approx u(0)+\frac12\left(5u(0)+2\right)=1.u(21​)≈u(0)+21​(5u(0)+2)=1.
  2. At the second step,

    u(1)≈u(12)+12(5u(12)+2)=92.u(1)\approx u\left(\frac12\right)+\frac12 \left(5u\left(\frac12\right)+2\right) =\frac92.u(1)≈u(21​)+21​(5u(21​)+2)=29​.

The approximation is updated repeatedly using the differential equation to calculate the slope at the current point. Under suitable conditions, decreasing hhh improves the approximation, and the numerical values converge to the true solution as the step size approaches zero.

Extension to partial differential equations

For a function of time and space, such as v(t,x)v(t,x)v(t,x), a numerical method divides the time-space domain into a grid. Values at known boundary points and earlier time points are used to approximate values at neighboring grid points. Repeating this process fills in the grid and produces an approximation at the desired point.

The principle is similar to the ODE method, but the calculation must account for changes in more than one variable. The specific update rule depends on the PDE and its boundary conditions.


Numerical solution of SDEs

An SDE adds a difficulty that ordinary finite differences do not face: random fluctuations mean that a future value is not determined by a single slope. It depends on the Brownian-motion path.

Euler–Maruyama method

Suppose a Brownian-motion path has been fixed. Over a time step of size hhh, the SDE can be approximated by

Xi+1≈Xi+μ(ti,Xi)h+σ(ti,Xi)ΔBi,X_{i+1}\approx X_i+ \mu(t_i,X_i)h+ \sigma(t_i,X_i)\Delta B_i,Xi+1​≈Xi​+μ(ti​,Xi​)h+σ(ti​,Xi​)ΔBi​,

where

ΔBi=Bti+1−Bti.\Delta B_i=B_{t_{i+1}}-B_{t_i}.ΔBi​=Bti+1​​−Bti​​.

For a fixed path, each increment ΔBi\Delta B_iΔBi​ is known, so the update can be performed step by step. This method is called the Euler–Maruyama method.

For Brownian motion, increments over non-overlapping time intervals are independent, and each increment satisfies

ΔBi∼N(0,h).\Delta B_i\sim N(0,h).ΔBi​∼N(0,h).

Thus, a simulated path can be generated by drawing a sequence of independent normal random variables with mean 000 and variance hhh, then applying the update at each step.

Monte Carlo simulation

A single simulated Brownian-motion path produces one approximate trajectory of XtX_tXt​. Different paths generally produce different outcomes. Monte Carlo simulation captures this variability by generating many paths:

  1. Choose a time step hhh and generate Brownian-motion increments.

  2. Use the numerical update rule to calculate the process along that path.

  3. Record the value of interest, such as XTX_TXT​ at a terminal time TTT.

  4. Repeat the procedure for many independently generated paths.

The recorded terminal values approximate the probability distribution of XTX_TXT​. The same simulations can also be used to estimate quantities such as expectations or probabilities.

A smaller time step generally gives a more accurate approximation of the continuous-time process, but it requires more computation. The step size must therefore balance accuracy against computational cost.


Tree methods

A tree method approximates the possible outcomes of Brownian motion using a discrete branching process. Brownian motion can be obtained as a limit of suitably scaled random walks, so a random walk provides a basis for approximating it.

In a simple binomial tree, each step has two possible moves, typically upward or downward. After several steps, many different paths are possible, but paths can meet at the same node. The probabilities of reaching terminal nodes follow the binomial distribution. For example, after five independent steps with equal probabilities of moving up or down, the probabilities associated with the different numbers of upward moves are

132,532,1032,1032,532,132.\frac{1}{32},\quad \frac{5}{32},\quad \frac{10}{32},\quad \frac{10}{32},\quad \frac{5}{32},\quad \frac{1}{32}.321​,325​,3210​,3210​,325​,321​.

A tree method evaluates the process at the possible nodes and combines those values with the probabilities of reaching them. This replaces a large collection of continuous Brownian-motion paths with a finite set of discrete possibilities.

The method can use more than two branches at each step. For example, a trinomial tree allows an upward move, no move, or a downward move. With an appropriate scaling of the steps, such trees can also approximate Brownian motion.

Accuracy can be improved by decreasing the time step, increasing the number of possible moves at each step, or both. Tree methods are especially useful when the problem depends on the path taken, not only on the final value. For example, an early-exercise decision may depend on the process’s value at each node and on the information available up to that point.


The heat equation

The heat equation is a partial differential equation that models the spreading of heat through space over time. For a one-dimensional, perfectly insulated rod, a common form is

∂u∂t=12∂2u∂x2,\frac{\partial u}{\partial t} = \frac12\frac{\partial^2u}{\partial x^2},∂t∂u​=21​∂x2∂2u​,

where u(t,x)u(t,x)u(t,x) represents the heat distribution at position xxx and time ttt. The variable ttt describes time, while xxx describes location along the rod.

If the initial heat distribution is known as u(0,x)=v(x)u(0,x)=v(x)u(0,x)=v(x), the equation determines how that distribution changes over time. The rod is treated as very long, and heat moves only along its spatial axis.

Linearity and superposition

The heat equation is linear. If u1(t,x)u_1(t,x)u1​(t,x) and u2(t,x)u_2(t,x)u2​(t,x) are solutions, then their sum is also a solution:

u1(t,x)+u2(t,x).u_1(t,x)+u_2(t,x).u1​(t,x)+u2​(t,x).

More generally, suitable weighted sums or integrals of solutions remain solutions. This property is called superposition.

Superposition is useful because a complicated initial heat distribution can be understood as a combination of point-source distributions. Finding the solution for a point source therefore provides a building block for solving the equation with more general initial data.

The Dirac delta initial condition

A point source at the origin is represented by the Dirac delta function, written δ(x)\delta(x)δ(x). It is concentrated at x=0x=0x=0 and is zero elsewhere in the distributional sense, with total mass 111. Physically, it represents an idealized amount of heat concentrated at a single point at time 000.

For the heat equation above, the solution starting from this point source is

p(t,x)=12πtexp⁡(−x22t),t>0.p(t,x)=\frac{1}{\sqrt{2\pi t}} \exp\left(-\frac{x^2}{2t}\right), \qquad t>0.p(t,x)=2πt​1​exp(−2tx2​),t>0.

This is the probability density of a normal distribution with mean 000 and variance ttt. As time passes, the initially concentrated heat spreads out in a bell-shaped distribution. The same mathematical pattern appears in Brownian motion: the location of a Brownian particle at time ttt, starting at 000, has this normal distribution.

Solution for a general initial distribution

The point-source solution can be shifted to a source at any location and then combined with other shifted solutions. For initial data u(0,x)=v(x)u(0,x)=v(x)u(0,x)=v(x), the resulting solution is the convolution

u(t,x)=∫−∞∞v(y) 12πtexp⁡(−(x−y)22t) dy.u(t,x)=\int_{-\infty}^{\infty} v(y)\, \frac{1}{\sqrt{2\pi t}} \exp\left(-\frac{(x-y)^2}{2t}\right)\,dy.u(t,x)=∫−∞∞​v(y)2πt​1​exp(−2t(x−y)2​)dy.

Here, the initial heat at each location yyy contributes to the heat at xxx at time ttt, weighted by the Gaussian distribution describing how heat spreads from yyy to xxx. This formula gives an explicit solution for a broad class of initial conditions.


Connection to the Black–Scholes equation

After an appropriate change of variables, the Black–Scholes equation can be transformed into a heat equation. The heat equation’s explicit solution can then be used to obtain a corresponding solution for the transformed financial problem.

In this interpretation, the terminal payoff plays the role of the initial data for a backward heat equation. Integrating that payoff against a Gaussian kernel produces the value at an earlier time. The connection illustrates how the heat equation’s solution method also applies to certain financial pricing problems.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent