NOV19
SAT2022

Itô's Lemma

Applying df=tfdt+xfdXt+12xxfσ2dtdf = \partial_t f\,dt + \partial_x f\,dX_t + \tfrac{1}{2}\partial_{xx} f\,\sigma^2 dt to finish the derivation.
Itô's LemmaItô CalculusGeometric Brownian MotionTaylor expansionlog-normal

Attention Conservation Notice

The 3rd post in a series of 5 in which the Black-Scholes-Merton Model for pricing European put and call options is derived.

  1. Brownian Motion as a Symmetric Random Walk Limit
  2. Stochastic Differential Equations & Geometric Brownian Motion

This follows Stephen Blyth's Excellent Book An Introduction to Quantitative Finance closely, with embellishment using python and some additional notes. This is probably:

  • not very helpful if you pragmatically want to price an option
  • overwhelming if you don't like math
  • may miss some of the contexts you'd want if you have a lot of mathematical maturity

Now what?

In the previous post, we learned about stochastic differential equations and we derived geometric Brownian motion, a possible process for the evolution of a stock over time that has some reasonable assumptions:

dSt=μStdt+σStdWtdS_t = \mu S_t dt + \sigma S_t d W_t

Now that we have a form for StS_t, a good next step is to figure out the distribution of StS_t under the assumptions of geometric Brownian motion. To do this, we will need some additional tools, namely Itô's lemma.

Some Motivation

Kiyosi Itô in 1978

In the last post, we initially looked at the differential equation dSt=μ(St,t)dt+σ(St,t)dWtdS_t = \mu(S_t, t)dt + \sigma(S_t, t) d W_t, where WtW_t is the derivative of a Brownian motion (or a Wiener process) and μ,σ\mu, \sigma are deterministic functions of time tt and the stock price at time tt, StS_t. From this we derived geometric Brownian motion, but let's consider the more general form for a bit.

To start, let's make this a simpler function. Suppose our stock price at time tt is given by the stochastic differential equation:

dSt=μ(t)dt+σ(t)dWtdS_t = \mu(t) dt + \sigma(t)dW_t

Then μ,σ\mu, \sigma are deterministic functions of time (as opposed to non-deterministic functions of time and StS_t) and we can write an integral solution like so:

St=0tμ(s)ds+0tσ(s)dWsS_t = \int_0^t \mu(s) ds + \int_0^t \sigma(s)dW_s

Nice! We have the price as a weighted sum of integrals. We can't easily solve it in terms of WsW_s, but we can get the mean and variance.

Since every dWsdW_s has a mean of 0 (WN(0,1)W \sim \mathcal{N}(0, 1)), E[St]=0tμ(s)ds\mathbb{E}[S_t] = \int_0^t \mu(s) ds, the integral of the drift function.

Similarly, since dWsdW_s has a variance of 1 and are i.i.d., Var[St]=0tσ2(s)\mathrm{Var}[S_t] = \int_0^t \sigma^2(s), or the integral of the variance of each step in the continuous random walk

This is all well and good, but what do you do when you have a more complex process StS_t that appears on both sides of the stochastic differential equation? Something like dSt=μ(St,t)dt+σ(St,t)dWtdS_t = \mu(S_t, t)dt + \sigma(S_t, t) d W_t ?

We can't follow the same steps above. Instead, we want to rewrite StS_t as a function of a simpler process YtY_t where YtY_t takes the simpler form above. That is, St=f(t,Yt)S_t = f(t, Y_t), and dYt=μ(t)dt+σ(t)dWtdY_t = \mu(t)dt + \sigma(t) dW_t.

Itô's lemma is used to find this transformation, and once we have that transformation we can find the mean and higher moments of the process (variance, skewness, kurtosis, etc). We will also see in a later blog post that this is very helpful for changing the underlying numeraire, which is a very useful technique.

Handy Dandy Taylor Expansion

Consider a function f(St,t)f(S_t, t) of StS_t and suppose that StS_t is deterministic and ff is twice differentiable.

Then taking the Taylor series, we get

Δf=ftΔt+122f(St)2Δ(St)2+2fSttΔStΔt+122ft2(Δt)2\Delta f = \frac{\partial f}{\partial t}\Delta t + \frac{1}{2} \frac{\partial^2 f}{\partial (S_t)^2}\Delta (S_t)^2 + \frac{\partial^2 f}{\partial S_t \partial t}\Delta S_t \Delta t + \frac{1}{2} \frac{\partial^2 f}{\partial t^2}(\Delta t)^2 + ...

Now suppose that

ΔSt=μΔt+σΔtW\Delta S_t = \mu \Delta t + \sigma \sqrt{\Delta t} W, WN(0,1)W \sim \mathcal{N}(0, 1)

Then

(ΔSt)2=σ2ΔtW2+O(Δt32)(\Delta S_t)^2 = \sigma^2 \Delta t W^2 + O(\Delta t^{\frac{3}{2}})

Since E(W2)=1\mathbb{E} (W^2) = 1[1] and Var(W2)=2\mathrm{Var}(W^2) = 2[2] then (ΔSt)2σ2Δt(\Delta S_t)^2 \to \sigma^2 \Delta t as Δt0\Delta t \to 0 and we have

ΔfδfδtΔt+δfδStΔSt+12δ2fδ2St2σ2Δt\Delta f \approx \frac{\delta f}{\delta t}\Delta t + \frac{\delta f}{\delta S_t}\Delta S_t + \frac{1}{2} \frac{\delta^2 f}{\delta^2 S_t^2} \sigma^2 \Delta t

Taking limits we obtain Itô's lemma

Itô's Lemma

With limits, we get

df=dfdtdt+dfdStdSt+12d2fdSt2σ2dtdf = \frac{df}{dt}dt + \frac{df}{dS_t}dS_t + \frac{1}{2}\frac{d^2f}{dS_t^2} \sigma^2 dt

If dSt=μ(St,t)dt+σ(St,t)dWtdS_t = \mu(S_t, t) dt + \sigma(S_t, t) dW_t, then we can substitute and get

dfdtdt+dfdSt(μ(St,t)dt+σ(St,t)dWt)+12d2fdSt2σ2(St,t)dt\frac{df}{dt}dt + \frac{df}{dS_t} (\mu(S_t, t) dt + \sigma(S_t, t) dW_t) + \frac{1}{2}\frac{d^2f}{dS_t^2} \sigma^2(S_t, t) dt

grouping dtdt terms gives us the most well-known form of the lemma:

(dfdt+dfdStμ(St,t)+12d2fdSt2σ2(St,t))dt+dfdStσ(St,t)dWt(\frac{df}{dt} + \frac{df}{dS_t} \mu(S_t, t) + \frac{1}{2}\frac{d^2f}{dS_t^2} \sigma^2(S_t, t))dt + \frac{df}{dS_t} \sigma(S_t, t) dW_t

Itô's Lemma is easiest to remember in the following form: If dx=μdt+σdWtdx = \mu dt + \sigma d W_t then

df=dfdtdt+dfdxdx+12d2fdx2dx2df = \frac{df}{dt}dt + \frac{df}{dx}dx + \frac{1}{2}\frac{d^2f}{dx^2} dx^2

where dx2dx^2 is defined by the identities dt2=0,dtdWt=0,(dWt)2=dtdt^2 = 0, dtdW_t = 0, (dW_t)^2 = dt

Plainly put, the derivative of a function of a random variable and time is a term about time, a term about the random variable, and a term reflecting the quadratic variation of the underlying Brownian motion (Wiener process). This final (memorable) form makes it much clearer that Itô's lemma is the stochastic calculus counterpart to the chain rule.[3]

Applied to Geometric Brownian Motion

Applying Itô's lemma to logSt\log S_t where StS_t follows geometric Brownian motion:

Let f(St)=logStf(S_t) = \log S_t. Then

ft=0\frac{\partial f}{\partial t} = 0

fSt=1St\frac{\partial f}{\partial S_t} = \frac{1}{S_t}

2fSt2=1St2\frac{\partial^2f}{\partial S_t^2} = -\frac{1}{S_t^2}

Applying Itô's lemma gives us

d(logSt)=(1StStμ12σ2St21St2)dt+σSt1StdWt=(μ12σ2)dt+σdWtd(\log S_t) = (\frac{1}{S_t} S_t \mu - \frac{1}{2} \sigma^2 S_t^2 \frac{1}{S_t^2}) dt + \sigma S_t \frac{1}{S_t}d W_t = (\mu - \frac{1}{2}\sigma^2)dt + \sigma dW_t

Thus, logSt\log S_t follows standard Brownian motion and is normally distributed. Specifically,

logSTStN(logSt+(μ12σ2)(Tt),σ2(Tt))\log S_T | S_t \sim \mathcal{N}(\log S_t + (\mu - \frac{1}{2}\sigma^2)(T - t), \sigma^2(T - t))

showing that under geometric Brownian motion the distribution of logSTSt\log S_T | S_t is log-normal.

We can use this information to temper our expectations about the next step in a stock.

In the plot[4] above, the

red

line is a geometric Brownian motion process with μ=0\mu = 0 and σ=0.2\sigma = 0.2. The

green

points are drawn from logSTStN(logSt+(μ12σ2)(Tt),σ2(Tt))\log S_T | S_t \sim \mathcal{N}(\log S_t + (\mu - \frac{1}{2}\sigma^2)(T - t), \sigma^2(T - t)), showing a distribution of where the next point is likely to fall. We can see in this plot that almost every actual fell within the predicted distribution. It also kind of looks like a Christmas wreath

Extra Notes

  1. Note [1]

    For XN(0,1)X \sim \mathcal{N}(0,1), E[X2]=Var(X)+(E[X])2=1\mathbb{E}[X^2] = \mathrm{Var}(X) + (\mathbb{E}[X])^2 = 1.

    [back]
  2. Note [2]

    If XX is standard normal then X2χ2(1)X^2 \sim \chi^2(1), which has variance 22.

    [back]
  3. Note [3]

    Itô calculus extends classical calculus to stochastic processes via the Itô integral Yt=0tHsdXsY_t = \int_0^t H_s\, dX_s for adapted HH and semimartingale XX.

    Financially, YtY_t tracks the value of holding HsH_s units of an asset whose price follows XsX_s, highlighting why the chain rule analogy matters for hedging arguments.

    [back]
  4. Note [4]

    Make your own predictions with the same log-normal approximation:

    from cytoolz import compose_left
    import numpy as np
    
    def predict_next_step(s0: float, mu: float = 0., sigma: float = 0.2) -> float:
        def ito_after(st) -> float:
            sig_sq = sigma**2
            return np.random.normal(np.log(st) + (mu - 0.5 * sig_sq), sig_sq)
        return compose_left(ito_after, np.exp)(s0)
    
    print([predict_next_step(100) for _ in range(20)])
    [back]