### Tutorial on Itˆ o’s Formula

Zheng-Liang Lu

Department of Computer Science & Information Engineering National Taiwan University

November 18, 2019

### Agenda

• Wiener process.

• Generalized Wiener process (Itˆo process).

• Itˆo integral.

• Martingale.

• Quadratic variation of Wiener process.

• Itˆo’s formula.

• Calculation examples.

• Black-Scholes option pricing theory.

### Wiener Process

• A process W is called the Wiener process if the following conditions hold:

(1) W (0) = 0.

(2) The process W has independent increments: if r < s ≤ t < u, then W (u) − W (t) ⊥ W (s) − W (r ).

(3) For s < t, W (t) − W (s) ∼ N(0, t − s).

(4) W has continuous trajectories.

• Note that W has a nowhere-differentiable trajectory (see the next page).

### Itˆ o Process

• A stochastic process X (t) is given by X (t) = a +

Z t 0

µ(s, X (s))ds + Z t

0

σ(s, X (s))dW (s), (1) where a is the initial condition of X (0), µ(t, X (t)) and

σ(t, X (t)) are two adapted^{1} processes, and W (t) is a Wiener
process.

• The third item at the right-hand side of Equation (1) is to be defined.

1Let X and Y be stochastic processes. Y is adapted to Ft^{X}-filtration if Y is
Ft^{X}-measurable.

### Itˆ o Integral

• Let g be a process satisfying the following conditions:

• g is square-integrable, that is, Z b

a

Eg^{2}(s) ds < ∞.

• g is adapted to the F_{t}^{W}-filtration.

• We define the Itˆo integral as follows:

Z b a

g (s)dW (s) , lim

∆t→0 n−1

X

k=0

g (t_{k}) [W (t_{k+1}) − W (t_{k})] .

• Why using theforward increments?

• Because we cannot foresee the future.

• Then the following relations hold:

E

Z b a

g (s)dW (s)

= 0, (2)

E

"

Z b a

g (s)dW (s)

^{2}#

= Z b

a

Eg^{2}(s) ds, (3)

andRb

a g (s)dW (s) is F_{b}^{W}-measurable.^{2}

2We could say that the integral is deterministic at time b.

### Sketch of Proof for Equation (2)

E

Z b a

g (s)dW (s)

≈ E

"_{n−1}
X

k=0

g (tk)∆W (tk)

#

=

n−1

X

k=0

E [g (t_{k})] E [∆W (t_{k})] (∵ W (tk) ⊥ ∆W (t_{k}))

= 0.(∵ E[∆W (tk)] = 0)

### Sketch of Proof for Equation (3)

• For all i , j with i 6= j , we first calculate

E [∆W (t_{i})∆W (t_{j})] = E [∆W (t_{i})] E [∆W (t_{j})] = 0.

• Note that the first equality results from the property of independent increments.

• Then Equation (3) is proved as follows.

E

"

Z b a

g (s)dW (s)

^{2}#

≈ E

n−1

X

k=0

g (t_{k})∆W (t_{k})

!2

=

n−1

X

k=0

Eg^{2}(tk) E ∆W^{2}(tk) +
X

i

X

j

E [g (t_{i})g (t_{j})] E [∆W (t_{i})∆W (t_{j})]

=

n−1

X

k=0

Eg^{2}(t_{k}) E ∆W^{2}(t_{k})

=

n−1

X

k=0

Eg^{2}(tk)

(tk+1− t_{k})

→ Z b

a

Eg^{2}(s)
ds.

### Martingale

^{3}

• A stochastic process X is called an F_{t}-martingaleif the
following condition hold.

• For all t, E [ |X (t)| ] < ∞.

• X is adapted to the filtration {Ft}t≥0.

• For all s and t with s ≤ t, E [ X (t) | Fs] = X (s).

• Now let X (t) =Rt

0 g (s)dW (s) with 0 ≤ t^{0} < t.

• Then we have E

h

X (t) F_{t}^{W}0

i

= X (t^{0}) +E

Z t

t^{0}

g (s)dW (s) F_{t}^{W}0

= X (t^{0}).

• By Equation (2), every stochastic integral is a martingale.

3It is a notion of fair games.

### Digression: Is the Market a Martingale?

• For stock markets, the stock prices are not martingales.

• Consider that you deposit S (0) in the bank with r ≥ 0.

• Then S (t) = S (0)e^{rt}, which is riskless.

• Or we rewrite the equation above like

E[S (t) | F_{0}] = e^{rt}S (0) ≥ S (0).

• This implies that the riskless asset is asubmartingale.

• Because ofrisk aversion, one should expect a higher return for taking higher risk, that is,

E[S^{0}(t) | F_{0}] > e^{rt}S^{0}(0),
where S^{0}(t) is a process of one risky asset.

### Digression: Risk-Neutral Valuation & Martingale

• Under a physical measure P, it is known that
E^{P}S^{0}(t) F0 > e^{rt}S^{0}(0).

• Let Y (t) = e^{−rt}S^{0}(t).

• Under the risk-neutralmeasure Q, the discounted asset price is a martingale because

E^{Q}[Y (t) F_{0}] = Y (0).

• This result is used to price derivatives as follows:

p = E^{Q}h

e^{−rT}Π(S^{0}(T )) F_{0}i
,
where p is the derivative price and Π is a stochastic
contingent claim for S^{0} with the time to maturity T .

### Quadratic Variation of Wiener Process

• Define ∆t = t − s and ∆W = W (t) − W (s) with s < t.

• By definition, we have

• E[∆W ] = 0,(∵ ∆W ∼ N(0, ∆t))

• Var[(∆W )] = ∆t.

• Now we are interested in the quadratic variation (∆W )^{2},
which has:

• E[(∆W )^{2}] = ∆t,

• Var[(∆W )^{2}] = 2(∆t)^{2}. (Why?)

• This is because the trajectory of W isrough!

• In differential form, it reads

(dW )^{2}= dt.

• This identity will be used in the Itˆo’s formula.

### Itˆ o Formula

• For convenience, notations are simplified unless necessary.

• For example, X (t) and µ(t, X (t)) are replaced by X and µ, respectively.

• In a differential form, Equation (1) is equivalent to

dX = µdt + σdW . (4)

• Let f be a C^{2}-function.^{4}

• Define the process Z by Z = f (t, X ).

• Then Z has a stochastic differential given by df = ∂f

∂t + µ∂f

∂x +1
2σ^{2}∂^{2}f

∂x^{2}

dt + σ∂f

∂xdW . (5)

4The function f is said to be of (differentiability) class C^{k}if the derivatives
f^{0}, f^{00}, . . . , f^{(k)}exist and are continuous.

### Sketch of Proof for Itˆ o Formula

• It is known that the second-order Taylor expansionfor f is

df = ∂f

∂tdt+∂f

∂xdX +1 2

∂^{2}f

∂x^{2}(dX )^{2} + ∂^{2}f

∂t∂xdtdX + 1 2

∂^{2}f

∂t^{2}(dt)^{2} .

• We then calculate (dX )^{2} with the identity (dW )^{2}= dt so that
(dX )^{2}= µ^{2}(dt)^{2}+ 2µσdtdW + σ^{2}(dW )^{2}

∼ σ^{2}dt.

• Note that · · · is negligible compared to the dt-term.

• As a result,

df = ∂f

∂tdt +∂f

∂xdX +1 2

∂^{2}f

∂x^{2}(dX )^{2} +1
2

∂^{2}f

∂t^{2}(dt)^{2}+ ∂^{2}f

∂t∂xdtdX

= ∂f

∂tdt +∂f

∂xdX +1 2

∂^{2}f

∂x^{2}σ^{2}dt

= ∂f

∂tdt +∂f

∂x(µdt + σdW )+1
2σ^{2}∂^{2}f

∂x^{2}dt

= ∂f

∂t + µ∂f

∂x +1
2σ^{2}∂^{2}f

∂x^{2}

dt + σ∂f

∂xdW .

• Hence the proof is complete.

• Note that · · · is used as the second form of Itˆo’s formula.

### Example 1: E [W

^{4}

### (t)] =?

• Define Z by Z (t) = W^{4}(t).

• Then we have

∂Z

∂W = 4W^{3},
and

∂^{2}Z

∂W^{2} = 6W^{2}.

• By the Itˆo formula,

dZ = 6W^{2}dt + 4W^{3}dW with Z (0) = 0.

• Written in integral form, this reads Z (t) = 0 + 6

Z t 0

W^{2}(s)ds + 4
Z t

0

W^{3}(s)dW (s).

• Taking the expected value on the equation above, the stochastic-integral term will vanish.

• So we have

E [W^{4}(t)] = 6
Z t

0

E [W^{2}(s)]ds = 6
Z t

0

sds = 3t^{2}.

• Note that the exchange between doing an integration and
taking an expected value works in most cases of financial
math.^{5}

• This result could be used to prove Var[(∆W )^{2}] = 2(∆t)^{2}.

5See Fubini’s theorem.

### Example 2: E [e

^{αW (t)}

### ] =?

• Define Z by Z (t) = e^{αW (t)} with Z (0) = 1.

• The Itˆo formula gives us dZ (t) = 1

2α^{2}e^{αW (t)}dt + αe^{αW (t)}dW

= 1

2α^{2}Z (t)dt + αZ (t)dW (t).

• In integral form, this reads Z (t) = 1 +1

2α^{2}
Z t

0

Z (s)ds + α Z t

0

Z (s)dW (s).

• Why bother?^{6}

6One can rewrite the stochastic process in form of · · · dt + · · · dW via the Itˆo formula. Starting from this form, it is easier to derive the expected values associated with the stochastic process. For most time, you cannot derive

• Now define m(t) = E [Z (t)] and differentiate the resulting equation as follows:

dm(t) = 1

2α^{2}m(t)dt.

• Using the ODE technique^{7}, we have

m(t) = E [e^{αW (t)}] = e^{1}^{2}^{α}^{2}^{t}.

• Note that E [e^{αW (t)}] is the moment-generating function
(MGF)^{8} of W (t) so that you may follow the definition of
MGF to produce the same result.

7To be more specific, you need the identity ^{dx}_{x} = d ln x .

8See https://en.wikipedia.org/wiki/Moment-generating_function.

### Example 3: R

t0

### W (s)dW (s) =?

• Define Z by Z (t) = W^{2}(t).

• By the Itˆo formula,

dZ (t) = dt + 2W (t)dW (t).

• In integral form this reads

Z (t) = W^{2}(t) = t + 2
Z t

0

W (s)dW (s).

• So we have

Z _{t}

0

W (s)dW (s) = W^{2}(t)
2 −t

2.

• The second term in the RHS differs from the ordinary calculus!

### Example 4: Geometric Brownian Motion (GBM)

• Let µ and σ be constant, and W be under the P measure.

• A GBM is given by

dS = µSdt + σSdW .

• Now take X = ln S with X (0) = ln S_{0}.

• It is easy to see that

∂X

∂S = ∂(ln S )

∂S = 1 S, and

∂^{2}X

∂S^{2} = ∂^{2}(ln S )

∂S^{2} = − 1
S^{2}.

• By the Itˆo’s formula, dX = ∂(ln S )

∂t dt+∂(ln S )

∂S dS + 1 2

∂^{2}(ln S )

∂S^{2} (dS )^{2}

= 1

SdS+1 2(−1

S^{2})S^{2}σ^{2}dt

= 1

S(µSdt + σSdW )−1
2σ^{2}dt.

= (µ −1

2σ^{2})dt + σdW .

• In integral form, this reads ln S = ln S0+

Z t 0

(µ −1

2σ^{2})dt +
Z t

0

σdW

=ln S_{0}+(µ −1

2σ^{2})t+σW (t).

• This gives us

ln S (t) ∼ N

ln S0+(µ −1

2σ^{2})t,σ^{2}t

.

• Note that the price volatility of one asset is σ√ t.

• In the end, we have

S (t) = S_{0}e^{(µ−}^{1}^{2}^{σ}^{2}^{)t+σW (t)},

which follows a so-called lognormaldistribution with
E [S (t)] = S0e^{µt},

Var [S (t)] = S_{0}^{2}

e^{(2µ+σ}^{2}^{)t}− e^{2µt}

.(Why?)

### Exercise: Futures Price

• Assume that S (t) follows a GBM.

• It is known that the futures price F (t) is given by
F (t) = S (t)e^{r (T −t)}.

• By the Itˆo’s formula,

dF = (µ − r )Fdt + σFdW .

• If we shift to the Q measure (i.e., µ is replaced by r ), then dF = σFdW

with E [F (t)] = F_{0}, which is a martingale.

### Exercise: Product of GBM Processes

• Let Y and Z be two GBM processes:

dY

Y = a dt + b dW_{Y},
dZ

Z = f dt + g dWZ,
where dW_{Y} and dW_{Z} has correlation ρ.

• Consider the product of two GBM processes, U = YZ .

• By the Itˆo’s formula, dU = Z dY + Y dZ + dY dZ

= YZ (a dt + b dW_{Y}) + YZ (f dt + g dW_{Z})+

YZ (a dt+b dW_{Y})(f dt+g dW_{Z})

= U [(a + f +bg ρ)dt+ b dW_{Y} + g dW_{Z}] .

• Rewrite the above equation as below:

dU

U = (a + f + bg ρ)dt + b dW_{Y} + g dW_{Z}.

• We show that the product of correlated GBM processes thus remains a GBM.

• In particular, we can also show that S^{n} is also a GBM process
for n ∈ N.

### Exercise: Quotients of GBM Processes

• Consider the quotient of two GBM processes, U = Y

Z,

where Y and Z are drawn from Example 6.

• By the Itˆo formula, dU = 1

ZdY − Y

Z^{2}dZ − 1

Z^{2}dYdZ + Y
Z^{3}(dZ )^{2}
...

= U(a − f +g^{2}− bg ρ)dt + b dW_{Y} − g dW_{Z} .

• This example reminds us to collect alldt-terms.

### Example 5: Vasicek Model

^{9}

• X is a Vasicek process, defined by

dX = κ(θ − X )dt + σdW , with θ, κ, σ > 0.

• Let Y = e^{κt}X .

• By the Itˆo’s formula, we then have
dY = κe^{κt}Xdt + e^{κt}dX

= κe^{κt}Xdt + e^{κt}(κ(θ − X )dt + σdW )

= κθe^{κt}dt + σe^{κt}dW .

9Vasicek (1977). It is one of extension of the Ornstein-Uhlenbeck process, proposed by Ornstein and Uhlenbeck in 1930. Now the Vasicek model is out-of-date. The main focus aims at the LIBOR market model (LMM).

• So it reads

e^{κt}X = X_{0}+
Z t

0

κθe^{κs}ds +
Z t

0

σe^{κs}dW .

• Moreover, we could calculate

E [ X ] = X_{0}e^{−κt}+ θ(1 − e^{−κt}),
Var [ X ] = σ^{2}

2κ 1 − e^{−2κt} .

• As t → 0, it is easy to see that E [ X ] = X_{0} and Var [ X ] = 0.

• As t → ∞, E [ X ] = θ and Var [ X ] = ^{σ}_{2κ}^{2}, which is finite due
to the mean-reverting property!

• Note that X is a process following a normal distribution.

(Why?)

### Black-Scholes Option Pricing Theory

• Assume that the stock price St follows a GBM (see p. 22).

• For this stock, we now consider to sell a European call option which expires in time T and has the payoff function

Φ(ST) = (ST − K )^{+}.

• Insert a figure as an illustration of options.

• Define the call price Ct= f (t, St).

• By the Itˆo’s formula, df = ∂f

∂tdt + ∂f

∂St

dS_{t}+1
2

∂^{2}f

∂S_{t}^{2}(dS_{t})^{2}

= ∂f

∂tdt + ∂f

∂St

(µStdt + σStdW ) + 1 2

∂^{2}f

∂S_{t}^{2}σ^{2}S_{t}^{2}dt

= ∂f

∂t + µSt

∂f

∂S_{t} +σ^{2}S_{t}^{2}
2

∂^{2}f

∂S_{t}^{2}

dt + ∂f

∂S_{t}σStdW .

• What is the fair priceof this call option?

• The no-arbitrage principle comes into play.

• Construct a riskless portfolio as follows: buy ∆ = _{∂S}^{∂f}

t shares of the stock and sell one European call.

• The portfolio value V is V = ∆ × St− f .

• For a small variation of S_{t},

dV =∆ × dS_{t}− df . (6)

• If the market is free of arbitrage, then the risk-free asset must earn the risk-free rate, denoted by r > 0.

• This gives us

dV = rVdt =r (∆ × S_{t}− f )dt. (7)

• Now equate (6) and (7):

r (∆ × St− f )dt=− ∂f

∂t +σ^{2}S_{t}^{2}
2

∂^{2}f

∂S_{t}^{2}

dt.

• Hence we derive the famous Black-Scholes PDE as follows:

∂f

∂t + rSt

∂f

∂S_{t} +σ^{2}S_{t}^{2}
2

∂^{2}f

∂S_{t}^{2} = rf . (8)

• Define ∆ = _{∂S}^{∂f}

t, Θ = ^{∂f}_{∂t}, and Γ = _{∂S}^{∂}^{2}^{f}2
t.

• Then we have another representation of BS-PDE as follows:

Θ + rS_{t}∆ +σ^{2}S_{t}^{2}

2 Γ = rf .

• If one considers the delta neutral (∆ = 0), then the previous equation becomes

Θ + σ^{2}S_{t}^{2}

2 Γ = rf .

### Feynman-Kac

^{10}

### Theorem

• This discovery bridges two research domains (PDE andSDE)!

• If f (t, x ) with t ∈ [0, T ] is a solution to

∂f

∂t + µ(x )∂f

∂x +1

2σ^{2}(x )∂^{2}f

∂x^{2} = rf ,
f (T , x ) = Φ(x ),
then f (t, x ) has a representation

f (t, X ) = e^{−r (T −t)}E^{Q}[ Φ(X_{T}) | Xt = x ],
where X follows a Itˆo process.

10Mark Kac (1914–1984), a Polish American mathematician.

• Now replace X by S .

• Then the call price is

C = f (0, S_{0}) = e^{−rT}E^{Q}[ (S_{T} − X )^{+}].

• This is calledrisk-neutral valuation.

• The price of European call options is

C = S0N(d1) − Ke^{−rT}N(d2), (9)
where N(·) is a cdf of a standard normal distribution,

d_{1} = log(^{S}_{K}^{0}) + (r − ^{σ}_{2}^{2})T
σ√

T ,

and d_{2} = d_{1}− σ√
T .

### References

• John Hull, Options, Futures, and Other Derivatives, 10/e, 2018.

• Tomas Bj¨ork, Arbitrage Theory in Continuous Time, 2009.

• Steven Shreve, Stochastic Calculus for Finance II:

Continuous-Time Models, 2010.

• Y.-D. Lyuu, lecture slides of Principles of Financial
Computing, 2019.^{11}

11See https://www.csie.ntu.edu.tw/~lyuu/finance1.html.