Вы находитесь на странице: 1из 60

Stochastic Calculus and Itô’s

Lemma
In this lecture. . .

• The meaning of Markov and martingale

• Brownian motion

• Stochastic differential equations

• Itô’s lemma

Certificate in Quantitative Finance


1
By the end of this lecture you will be able to

• understand where Brownian motion and diffusion processes


come from

• manipulate functions of random variables

Certificate in Quantitative Finance


2
Introduction

Stochastic calculus is very important in the mathematical mod-


eling of financial processes. This is because of the underlying
(assumed) random nature of financial markets.

Certificate in Quantitative Finance


3
Stochastic calculus: A motivating example

Toss a coin. Every time you throw a head you receive $1, every
time you throw a tail you pay out $1. In the experiment below
the sequence was THHTHT, and you finished even.

0
0 1 2 3 4 5 6 7

-1

-2

Certificate in Quantitative Finance


4
• Ri denotes the random amount, either $1 or -$1, you make
on the ith toss:
E[Ri] = 0, E[Ri2] = 1 and E[RiRj ] = 0.

In this example it doesn’t matter whether or not these expecta-


tions are conditional on the past. In other words, if you threw
five heads in a row it does not affect the outcome of the sixth
toss.

• Introduce Si to mean the total amount of money you have


won up to and including the ith toss so that
i

Si = Rj .
j=1
Later on it will be useful if we have S0 = 0, i.e., you start
with no money.

Certificate in Quantitative Finance


5
If we now calculate expectations of Si it does matter what in-
formation we have. If we calculate expectations of future events
before the experiment has even begun then

E[Si] = 0 and E[Si2] = E[R1


2 + 2R R + · · ·] = i.
1 2

On the other hand, suppose there have been five tosses already,
can we use this information and what can we say about expec-
tations for the sixth toss?

• This is the conditional expectation.

The expectation of S6 conditional upon the previous five tosses


gives
E[S6|R1, . . . , R5] = S5.

Certificate in Quantitative Finance


6
The Markov property

• The distribution of the value of the random variable Si con-


ditional upon all of the past events only depends on the
previous value Si−1. This is the Markov property.

We say that the random walk has no memory beyond where it is


now. Note that it doesn’t have to be the case that the expected
value of the random variable Si is the same as the previous value.

This can be generalized to say that given information about Sj


for some values of 1 ≤ j < i then the only information that is of
use to us in estimating Si is the value of Sj for the largest j for
which we have information.

Certificate in Quantitative Finance


7
The martingale property

The coin tossing experiment possesses another property that can


be important in finance. You know how much money you have
won after the fifth toss. Your expected winnings after the sixth
toss, and indeed after any number of tosses if we keep playing,
is just the amount you already hold.

• The conditional expectation of your winnings at any time in


the future is just the amount you already hold:

E[Si|Sj , j < i] = Sj .

This is called the martingale property.

Certificate in Quantitative Finance


8
Quadratic variation

The quadratic variation of the random walk is defined by


i 
 2
Sj − Sj−1 .
j=1
Because you either win or lose an amount $1 after each toss,
|Sj − Sj−1| = 1. Thus the quadratic variation is always i:
i 
 2
Sj − Sj−1 = i.
j=1

We are going to use the coin-tossing experiment for one more


demonstration. And that will lead us to a continuous-time ran-
dom walk.

Certificate in Quantitative Finance


9
Brownian motion

Change the rules of the coin-tossing experiment slightly.

First of all restrict the time allowed for the six tosses to a period
t, so each toss will take a time t/6. Second, the size of the bet
will not be $1 but t/6.

This new experiment clearly still possesses both the Markov and
martingale properties, and its quadratic variation measured over
the whole experiment is
 2
6 
 2 t
Sj − Sj−1 = 6 ×  = t.
j=1 6

Certificate in Quantitative Finance


10
Change the rules again, to speed up the game.

• We
 will have n tosses in the allowed time t, with an amount
t/n riding on each throw.

Again, the Markov and martingale properties are retained and


the quadratic variation is still
 2
n 
 2 t
Sj − Sj−1 = n ×  = t.
j=1 n

Now make n larger and larger. This speeds up the game, de-
creasing the time between tosses, with a smaller amount for each
bet. But the new scalings have been chosen very carefully, the
time step is decreasing like n−1 but the bet size only decreases
by n−1/2.

Certificate in Quantitative Finance


11
1.2

0.8

0.6

0.4

0.2

0
0 0.2 0.4 0.6 0.8 1
-0.2

-0.4

-0.6

-0.8

-1

A series of coin tossing experiments.

Certificate in Quantitative Finance


12
As we go to the limit n = ∞, the resulting random walk stays
finite. It has an expectation, conditional on a starting value of
zero, of
E[S(t)] = 0
and a variance
E[S(t)2 ] = t.
We use S(t) to denote the amount you have won or the value of
the random variable after a time t.

• The limiting process for this random walk as the time steps
go to zero is called Brownian motion, and we will denote it
by X(t).

Certificate in Quantitative Finance


13
The important properties of Brownian motion are as follows.

• Finiteness: Any other scaling of the bet size or ‘increments’


with time step would have resulted in either a random walk
going to infinity in a finite time, or a limit in which there was
no motion at all. It is important that the increment scales
with the square root of the time step.

• Continuity : The paths are continuous, there are no disconti-


nuities. Brownian motion is the continuous-time limit of our
discrete time random walk.

• Markov : The conditional distribution of X(t) given informa-


tion up until τ < t depends only on X(τ ).

Certificate in Quantitative Finance


14
• Martingale: Given information up until τ < t the conditional
expectation of X(t) is X(τ ).

• Quadratic variation: If we divide up the time 0 to t in a


partition with n + 1 partition points ti = i t/n then
n 
 2
X(tj ) − X(tj−1) → t. (Technically ‘almost surely.’)
j=1

• Normality : Over finite time increments ti−1 to ti, X(ti ) −


X(ti−1) is Normally distributed with mean zero and variance
ti − ti−1.

Certificate in Quantitative Finance


15
Having built up the idea and properties of Brownian motion from
a series of experiments, we can discard the experiments, to leave
the Brownian motion that is defined by its properties. These
properties will be very important for our financial models.

Certificate in Quantitative Finance


16
Very Important Notation

We have seen X as the ‘end result’ of a random walk, up to


some time t.

We will often work with the amount by which X changes from


moment to moment.

• Think of dX as being an increment in X, i.e. a Normal ran-


dom variable with mean zero and standard deviation dt1/2.

Certificate in Quantitative Finance


17
Functions of stochastic variables and Itô’s lemma

Now we’ll see the idea of a function of a stochastic variable.


Below is shown a realization of a Brownian motion X(t) and the
function F (X) = X 2.

0.35
0.3
Brownian motion
0.25 Square of Brownian motion

0.2
0.15
0.1
0.05
0
-0.05 0 0.1 0.2 0.3 0.4 0.5

-0.1
-0.15
-0.2

Certificate in Quantitative Finance


18
Whenever we have functions of a variable it is natural to want
to know how to differentiate and manipulate these functions.

What are the rules of calculus when variables are stochastic?

Certificate in Quantitative Finance


19
The first point to note is that in the stochastic world we really
have two ‘variables.’

These are time t and the Brownian motion X.

Certificate in Quantitative Finance


20
We are used to writing ordinary and partial differential equations
in the form

dF

or
∂F
∂·

where the quantities on the bottom are the independent vari-


ables.

So might expect something similar in the stochastic world.

Certificate in Quantitative Finance


21
We immediately hit a problem, however.


Because dX is of size dt it is much bigger than dt.

This means that we have to be careful whenever we think about


gradients/slopes/derivatives/sensitivities, since these are limits
as dt goes to zero.

Certificate in Quantitative Finance


22
For this reason, in the stochastic world we instead work with
stochastic differential equations.

These take the form

dF = · · · dt + · · · dX.

Certificate in Quantitative Finance


23
So, what are the rules of calculus?

Since X is stochastic, so is F , and we can ask ‘what is the


stochastic differential equation for F ?’

If F (X) = X 2 what is the equation for dF ?

Certificate in Quantitative Finance


24
If F = X 2 is it true that dF = 2X dX?

No.

• The ordinary rules of calculus do not generally hold in a


stochastic environment.

Then what are the rules of calculus?

Certificate in Quantitative Finance


25
We are going to throw caution to the wind, pretend that there
are no problems or subtleties, use Taylor series. . . and see what
happens!

Certificate in Quantitative Finance


26
Taylor Series . . . and Itô

If we were to do a naive Taylor series expansion of F , com-


pletely disregarding the nature of X, and treating dX as a small
increment in X, we would get
dF 1 d2F 2
F (X + dX) = F (X) + dX + 2 2
dX ,
dX dX
ignoring higher-order terms.

We could argue that F (X + dX) − F (X) was just the ‘change in’
F and so
dF d2F
dF = dX + 1 dX 2.
dX 2 dX 2

This is almost correct.

Certificate in Quantitative Finance


27
Because of the way that we have defined Brownian motion, and
have seen how the quadratic variation behaves, it turns out that
the dX 2 term isn’t really random at all.

The dX 2 term becomes (as all time steps become smaller and
smaller) the same as its average value, dt.

Certificate in Quantitative Finance


28
Taylor series and the ‘proper’ Itô are very similar. The only
difference being that the correct Itô’s lemma has a dt instead of
a dX 2.

Certificate in Quantitative Finance


29
• You can, with little risk of error, use Taylor series with the
‘rule of thumb’

dX 2 = dt.

and in practice you will get the right result.

Let’s get some intuition now, and then shortly we will do Itô’s
lemma properly!

Certificate in Quantitative Finance


30
We can now answer the question, “If F = X 2 what is dF ?” In
this example

dF d2F
= 2X and 2
= 2.
dX dX

Therefore Itô’s lemma tells us that

dF = dt + 2X dX.

This is an example of a stochastic differential equation.

Certificate in Quantitative Finance


31
Stochastic differential equations

Stochastic differential equations are used to model random quan-


tities, a stock price for example.

They have two parts to them, a deterministic and a random.

Certificate in Quantitative Finance


32
Suppose we want to model a stock price as a random quantity.
Let’s use S to denote that stock price.

A stochastic differential equation for S would look something like


this:

dS = Deterministic + Random .

In words: “The change in the stock price has a predictable com-


ponent and a random component.”

Certificate in Quantitative Finance


33
More precisely

dS = Something dt + Something else dX.

The randomness is captured by the dX term.

But what are these ‘somethings’ ?

Certificate in Quantitative Finance


34
In the standard models they would be functions of S and time,
t.

dS = f (S, t) dt + g(S, t) dX.

The function f (S, t) captures how the predictable bit of the stock
model varies with S and t and the g(S, t) function captures the
randomness.

Certificate in Quantitative Finance


35
dS = f (S, t) dt + g(S, t) dX.

We sometimes call the f (S, t) function the growth rate or the


drift.

The g(S, t) is related to the volatility of S.

Certificate in Quantitative Finance


36
Some pertinent examples

The first example simple Brownian motion but with a drift:

dS = µ dt + σ dX.

0.3

0.25

0.2

0.15

0.1

0.05

0
0 0.2 0.4 0.6 0.8 1
-0.05

-0.1

-0.15

In this realization S has gone negative.

Certificate in Quantitative Finance


37
Our second example is similar to the above but the drift and
randomness scale with S:

dS = µS dt + σS dX.

3.5

2.5

1.5

0.5

0
0 0.2 0.4 0.6 0.8 1

If S starts out positive it can never go negative; the closer that


S gets to zero the smaller the increments dS.

Certificate in Quantitative Finance


38
The third example is

dS = (ν − µS)dt + σ dX.

1.2

0.8

0.6

0.4

0.2

0
0 0.2 0.4 0.6 0.8 1

Certificate in Quantitative Finance


39
The random walk

dS = (ν − µS)dt + σ dX

is an example of a mean-reverting random walk.

If S is large, the negative coefficient in front of dt means that


S will move down on average, if S is small it rises on average.
There is still no incentive for S to stay positive in this random
walk.

With r instead of S this random walk is the Vasicek model for


the short-term interest rate.

Certificate in Quantitative Finance


40
The final example is similar to the third but we are going to
adjust the random term slightly:

dS = (ν − µS)dt + σS 1/2 dX.

Now if S ever gets close to zero the randomness decreases, per-


haps this will stop S from going negative?

This particular stochastic differential equation for S will be im-


portant later on, it is the Cox, Ingersoll & Ross model for the
short-term interest rate.

Certificate in Quantitative Finance


41
And now for Itô’s lemma done properly!

Our goal is to justify the short cut of using dX 2 = dt and to


show some generalizations.

Certificate in Quantitative Finance


42
Stochastic integration

Define a stochastic integral by



t n
  
W (t) = f (τ ) dX(τ ) = lim f (tj−1 ) X(tj ) − X(tj−1)
0 n→∞
j=1
with
jt
tj = .
n

• Note that the function f (t) is evaluated in the summation at


the left-hand point tj−1.

Certificate in Quantitative Finance


43
It will be crucially important that each function evaluation does
not know about the random increment that multiplies it, i.e. the
integration is non-anticipatory.

In financial terms, we will see that we take some action such as


choosing a portfolio and only then does the stock price move.
This choice of integration is natural in finance, ensuring that we
use no information about the future in our current actions.

Certificate in Quantitative Finance


44
Stochastic differential equations again

Stochastic integrals are important for any theory of stochastic


calculus since they can be meaningfully defined. However, it is
very common to use a shorthand notation for expressions such
as

t
W (t) = f (τ ) dX(τ ).
0

That shorthand comes from ‘differentiating’ this and is

dW = f (t) dX.

• Think of dX as being an increment in X, i.e. a Normal ran-


dom variable with mean zero and standard deviation dt1/2.

Certificate in Quantitative Finance


45
Pursuing this idea further, imagine what might be meant by

dW = g(t) dt + f (t) dX.

• Equations like this are called stochastic differential equa-


tions. Their precise meaning comes, however, from the tech-
nically more accurate equivalent stochastic integral.

This equation above is shorthand for


t
t
W (t) = g(τ ) dτ + f (τ ) dX(τ ).
0 0

Certificate in Quantitative Finance


46
The mean square limit

This is useful in the precise definition of stochastic integration.

Examine the quantity


 2 
n
  
E (X(tj ) − X(tj−1 ))2 − t 
j=1

where
jt
tj = .
n

Certificate in Quantitative Finance


47
This can be expanded as

n

E (X(tj ) − X(tj−1 ))4
j=1

n 

+2 (X(ti ) − X(ti−1))2(X(tj ) − X(tj−1))2
i=1 j<i

n

−2t (X(tj ) − X(tj−1))2 + t2 .
j=1
Since X(tj )−X(tj−1 ) is Normally distributed with mean zero and
variance t/n we have
  t
2
E (X(tj ) − X(tj−1 )) =
n
and
  3t2
4
E (X(tj ) − X(tj−1)) = 2.
n
Certificate in Quantitative Finance
48
Thus the required expectation becomes

 
3t2 t2 t 1
n 2 + n(n − 1) 2 − 2tn + t2 = O .
n n n n

As n → ∞ this tends to zero. We therefore say that

n

(X(tj ) − X(tj−1))2 = t
j=1

in the ‘mean square limit.’ This is often written, for obvious


reasons, as

t
(dX)2 = t.
0

Whenever we talk about ‘equality’ in the following ‘proof’ we


mean equality in the mean square sense.

Certificate in Quantitative Finance


49
Functions of stochastic variables and Itô’s lemma

We now derive the most important tool of stochastic calculus,


Itô’s lemma.

We will have a function of X, F (X), and derive the equation for


dF .

Certificate in Quantitative Finance


50
In this derivation we will need various timescales.

The first timescale is very, very small. Denote it by

δt
= h.
n

This timescale is so small that the function F (X(t + h)) can be


approximated by a Taylor series:

dF
F (X(t + h)) − F (X(t)) = (X(t + h) − X(t)) (X(t)) +
dX
2
1 (X(t + h) − X(t))2 d F (X(t)) + · · · .
2 dX 2

Certificate in Quantitative Finance


51
From this it follows that
(F (X(t + h)) − F (X(t))) + (F (X(t + 2h)) − F (X(t + h))) + · · ·
+ (F (X(t + nh)) − F (X(t + (n − 1)h)))
n
 dF
= (X(t + jh) − X(t + (j − 1)h)) (X(t + (j − 1)h))
j=1 dX

2F n

d 2
+1
2 dX 2 (X(t)) (X(t + jh) − X(t + (j − 1)h)) + ···.
j=1

This has used the approximation

d2F d2F
2
(X(t + (j − 1)h)) = 2
(X(t)).
dX dX

This is consistent with the order of accuracy we require.

Certificate in Quantitative Finance


52
The first line in this becomes simply

F (X(t + nh)) − F (X(t)) = F (X(t + δt)) − F (X(t)).

The second is just the definition of



t+δt
dF
dX
t dX
and the last is
2
1 d F (X(t))δt,
2 dX 2
in the mean square sense. Thus we have

t+δt
dF
F (X(t + δt)) − F (X(t)) = (X(τ ))dX(τ )
t dX

t+δt 2
d F
+1
2 t 2
(X(τ ))dτ.
dX

Certificate in Quantitative Finance


53
We can now extend this result over longer timescales, from zero
up to t, over which F does vary substantially to get


t
t 2
dF d F
F (X(t)) = F (X(0)) + (X(τ ))dX(τ ) + 1
2 2
(X(τ ))dτ.
0 dX 0 dX

This is the integral version of Itô’s lemma, which is usually


written as

dF d2F
dF = dX + 1
2 dX 2 dt.
dX

Certificate in Quantitative Finance


54
Suppose our stochastic differential equation is

dS = a(S)dt + b(S)dX,

say, for some functions a(S) and b(S).

Now if we have a function of S, V (S), what stochastic differential


equation does it satisfy?

The answer is

dV 2
1 2d V
dV = dS + 2 b 2
dt.
dS dS

We could derive this properly or just cheat by using Taylor series


with dX 2 = dt.

Certificate in Quantitative Finance


55
Itô in higher dimensions

In financial problems we often have functions of one stochastic


variable S and a deterministic variable t, time: V (S, t). If

dS = a(S, t)dt + b(S, t)dX,

then the increment dV is given by

∂V ∂V 1 2 ∂ 2V
dV = dt + dS + 2 b dt.
∂t ∂S ∂S 2

Again, this is shorthand notation for the correct integrated form.

Certificate in Quantitative Finance


56
The example we will be seeing a lot of is the sde commonly used
to model an equity price

dS = µS dt + σS dX,

with V (S, t) being the value of an option. The sde for V (S, t) is
then

∂V ∂V 2
1 2 2∂ V
dV = dt + dS + 2 σ S 2
dt.
∂t ∂S ∂S

Remember this!

Certificate in Quantitative Finance


57
Occasionally, we have a function of two, or more, random vari-
ables, and time as well: V (S1, S2, t).

Let’s write the behaviour of S1 and S2 in the general form

dS1 = a1(S1, S2, t)dt + b1(S1, S2, t)dX1


and
dS2 = a2(S1, S2, t)dt + b2(S1, S2, t)dX2 .
Note that we have two Brownian increments dX1 and dX2. We
can think of these as being Normally distributed with variance
dt, but they are correlated.

The correlation between these two random variables we will call


ρ. This can also be a function of S1, S2 and t but must satisfy

−1 ≤ ρ ≤ 1.

Certificate in Quantitative Finance


58
• The ‘rules of thumb’ can readily be imagined:

dX12 = dt, dX22 = dt and dX1dX2 = ρ dt.

Itô’s lemma becomes


∂V ∂V ∂V
dV = dt + dS1 + dS2 +
∂t ∂S1 ∂S2
∂ 2V ∂ 2V ∂ 2V
1 b2 dt + ρb b dt + 1 b2
1
2 ∂S 2 1 2
∂S ∂S 2 2 ∂S 2 dt.
1 1 2 2

Certificate in Quantitative Finance


59
Summary

Please take away the following important ideas

• Functions of random variables can’t be differentiated in quite


the same way as functions of deterministic variables.

• Instead of using Taylor series you must use Itô’s lemma.


However, they are very similar and a simple rule of thumb
can usually be used to get from Taylor to Itô.

Certificate in Quantitative Finance


60

Вам также может понравиться