Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 33

A U T U M N    2 0 0 9

FINITE DIFFERENCE METHODS

Numerical Methods in Finance (Implementing Market Models)


COMPUTATIONAL FINANCE
MSc
©Finbarr Murphy 2007

Lecture Objectives
 Introduction to Finite Difference Methods
 Forward - Explicit Finite
 Backward - Implicit
 Central – Crank-Nicolson

 Hedge Sensitivities
COMPUTATIONAL FINANCE
MSc
©Finbarr Murphy 2007

Agenda
Page

1
Explicit Finite Difference Methods 2

2
Implicit Finite Difference Methods 18
3

Crank-Nicholson 25

Hedge Sensitivities 29
COMPUTATIONAL FINANCE
MSc

3
©Finbarr Murphy 2007

Explicit Finite Difference Methods


 Finite difference methods are based on the
conversion of PDE’s to difference equations

 The life of the option is divided into N equally spaced


intervals

 We first consider a backward difference method or


the explicit finite difference methods
COMPUTATIONAL FINANCE

 First a recap in deriving


MSc

4
©Finbarr Murphy 2007

Explicit Finite Difference Methods


 Given a function, f(x), its derivative is given by the
limit
f ( x + h) − f ( x )
f ' ( x) = lim
h →0 h
 The second order derivative is given by
f ( x + h) − 2 f ( x ) + f ( x − h)
f " ( x) = lim
h →0 h2
COMPUTATIONAL FINANCE
MSc

5
©Finbarr Murphy 2007

Explicit Finite Difference Methods


 Recall the Black Scholes PDE from week 1

∂C ∂C 1 2 2 ∂ 2C
+ rS + σ S − rC = 0
∂t ∂S 2 ∂S 2

 Rearranging and setting x = ln(S)

∂C 1 2 2 ∂ 2C ∂C
− = σ S +v − rC
∂t 2 ∂x 2
∂x
COMPUTATIONAL FINANCE

 We note that S, v and σ are constants


MSc

6
©Finbarr Murphy 2007

Explicit Finite Difference Methods


 Note the first and second order partial differential
equations in the B-S PDE.

 Also note that the definition of the second order


derivative includes f(x-h), f(x) and f(x+h)

 This suggests a trinomial type grid

f(x+h)
COMPUTATIONAL FINANCE

f(x)

f(x-h)
MSc

7
©Finbarr Murphy 2007

Explicit Finite Difference Methods


 We now divide time and space into discrete intervals
Δt and Δx respectively

 In grid terms, we discretise the B-S PDE as

 ∂C/∂t = ΔC/Δt

j+2
COMPUTATIONAL FINANCE

j+1
Ci+1,j+1

j
Ci,j Ci+1,j

j-1
Ci+1,j-1
MSc

j-2 8
i-1 i i+1 i+2 i+3
©Finbarr Murphy 2007

Explicit Finite Difference Methods


 The PDE becomes

Ci +1, j − Ci , j 1 2 Ci +1, j +1 − 2Ci +1, j + Ci +1, j −1 Ci +1, j +1 − Ci +1, j −1


− = σ +v − rC i +1, j
∆t 2 ∆x 2
2∆x

j+2
COMPUTATIONAL FINANCE

j+1
Ci+1,j+1

j
Ci,j Ci+1,j

j-1
Ci+1,j-1
MSc

j-2 9
i-1 i i+1 i+2 i+3
©Finbarr Murphy 2007

Explicit Finite Difference Methods


 Rewriting

Ci , j = pu Ci +1, j +1 + pmCi +1, j + pd Ci +1, j −1


 σ2 v 
pu = ∆t  + 
 2∆x 2∆x 
2

σ 2
Pm = 1 − ∆t 2 − r∆t
COMPUTATIONAL FINANCE

∆x
 σ 2
v 
pd = ∆t  − 
 2∆x 2∆x 
2
MSc

10
©Finbarr Murphy 2007

Explicit Finite Difference Methods


 We will look at a specific example to help our
understanding
 European Call
 Current Asset Price, S0 = 100
 Maturity, T = 1 year
 Volatility, σ = 20%
 Continuous interest rate, r = 6%
 Continuous dividend yield, δ = 3%
COMPUTATIONAL FINANCE

 Number of steps, N = 3
 Timestep, Δt = T/N = 1/3
 Space step, Δx = 0.2
MSc

11
©Finbarr Murphy 2007

Explicit Finite Difference Methods


 Some preliminary calculations

 v = r - δ - ½σ2 = 0.01

 pu = 0.1750

 pd = 0.6467

 pd = 0.1583
COMPUTATIONAL FINANCE
MSc

12
©Finbarr Murphy 2007

Explicit Finite Difference Methods


 Some preliminary calculations Ci+2,j+1 = puCi+3,j+2 + pmCi+3,j+1 + pdCi+3,j =
22.9243

Si+3,j+3 = 182.21 CCi+i+3,j+ = max(0,S


32 = 82.21 i+3,j+2
3,j+ -K)
= max(0,149.18-100) = 49.18
j+2
Si+3,j+2 = 149.18 Ci+3,j+2 = 49.18

j+1 Ci+1,j+1
Si+3,j+1 = 122.14 Ci+3,j+1 = 22.14

j
COMPUTATIONAL FINANCE

Ci,j Ci+1,j
Si+3,j = 100.00 Ci+3,j = 0.00

j-1 Si+3,j-2 = Se(-N. Δx)

Ci+1,j-1
Si+3,j-1 = 81.87 Ci+3,j-1 = 0.00
100e(-2x 0.2 )
= 67.03
j-2 Si+3,j-2 = Se(-N. Δx)

Si+3,j-2 = 67.03 Ci+3,j-2 == 100e


0.00(-3x 0.2 )
= 54.88
MSc

i-1 i i+1 i+2 i+3


13
Si+3,j-3 = 54.88 Ci+3,j-3 = 0.00
©Finbarr Murphy 2007

Explicit Finite Difference Methods


 Stability and Convergence

 Let C be the exact solution to the PDE

 Let O be the exact solution to the finite


difference equation
 C-O is the discretisation error and is caused by
the approximation of partial derivatives with
finite differences
COMPUTATIONAL FINANCE

 A finite difference method is convergent if the


discretisation error tends to zero as space and
time steps tend to zero
MSc

14
©Finbarr Murphy 2007

Explicit Finite Difference Methods


 Stability and Convergence

 Let Õ represent the actual numerical solution to


the finite difference equation

 C- Õ is the round-off error and is caused by the


approximation of partial derivatives with finite
differences

 A finite difference method is stable if the round-


COMPUTATIONAL FINANCE

off error is small and is bounded


MSc

15
©Finbarr Murphy 2007

Explicit Finite Difference Methods


 We need to think about reasonable values for the
space step Δx

 Our finite difference procedure must be based on a


stable system that converges

 Look at the formulae for pm, note that high


volatilities could cause pm to become negative,
clearly an undesirable step
COMPUTATIONAL FINANCE

 Similar possibilities exist for pu and pd

 To ensure stability and convergence, we must set


∆x ≥ σ 3∆t
MSc

16
©Finbarr Murphy 2007

Explicit Finite Difference Methods


 Let’s assume we expect the asset price to be with 3
standard deviations above or below the current price at
option maturity

 Further, a reasonable number of asset price values might


be 100

 This means we can set Δx to

∆x = 6σ T / 100 = 0.015
COMPUTATIONAL FINANCE

 Applying the stability and convergence condition, we


have
2
1  ∆x 
∆t ≤   = 0.0012
3 σ 
MSc

17
©Finbarr Murphy 2007

Explicit Finite Difference Methods


 This means we will have 833 time steps per year
COMPUTATIONAL FINANCE
MSc

18
©Finbarr Murphy 2007

Agenda
Page

1
Explicit Finite Difference Methods 2

2
Implicit Finite Difference Methods 18
3

Crank-Nicholson 25

Hedge Sensitivities 29
COMPUTATIONAL FINANCE
MSc

19
©Finbarr Murphy 2007

Implicit and Crank-Nicolson Finite Differences


 The explicit finite method looks at forward
differences and converts the B-S PDE to

Ci +1, j − Ci , j 1 2 Ci +1, j +1 − 2Ci +1, j + Ci +1, j −1 Ci +1, j +1 − Ci +1, j −1


− = σ +v − rC i +1, j
∆t 2 ∆x 2
2∆x

j+2
COMPUTATIONAL FINANCE

j+1
Ci+1,j+1

j
Ci,j Ci+1,j

j-1
Ci+1,j-1
MSc

j-2 20
i-1 i i+1 i+2 i+3
©Finbarr Murphy 2007

Implicit and Crank-Nicolson Finite Differences


 The implicit finite method looks at central
differences and converts the B-S PDE to

Ci +1, j − Ci , j 1 2 Ci , j +1 − 2Ci , j + Ci , j −1 Ci , j +1 − Ci , j −1
− = σ +v − rC i , j
∆t 2 ∆x 2
2∆x

j+2

j+1
Ci,j+1
COMPUTATIONAL FINANCE

j
Ci,j Ci+1,j

j-1
Ci,j-1

j-2
i-1 i i+1 i+2 i+3
MSc

21
©Finbarr Murphy 2007

Implicit and Crank-Nicolson Finite Differences


 This gives us

1 σ v 
2
pu = − ∆t  2 + 
2  ∆x ∆x 
σ 2
Pm = 1 + ∆t 2 + r∆t
∆x
COMPUTATIONAL FINANCE

1 σ 2
v 
pd = − ∆t  2 − 
2  ∆x ∆x 
MSc

22
©Finbarr Murphy 2007

Implicit and Crank-Nicolson Finite Differences


 But we don’t have an individual option price at
time step i as is the case for explicit finite
difference methods

 We use the following boundary conditions

Ci , N j − Ci , N j −1 = λU
Ci , − N j +1 − Ci , − N j = λL
COMPUTATIONAL FINANCE

 λU and λD are upper and lower boundary conditions


determined by the type of option
MSc

23
©Finbarr Murphy 2007

Implicit and Crank-Nicolson Finite Differences


 For example, a call option

 We use the following boundary conditions

λU = Si , N j − Si , N j −1
λL = 0
 To see this more clearly, consider a 1-step
calculator
COMPUTATIONAL FINANCE
MSc

24
©Finbarr Murphy 2007

Implicit and Crank-Nicolson Finite Differences


 For example, a call option

j+2

C0,1
j=1

λU = { C1,0
COMPUTATIONAL FINANCE

C0.0
j=0

j=-1
λL = {
C0,-1
i-1 i=0 i=1 i+2
MSc

25
©Finbarr Murphy 2007

Agenda
Page

1
Explicit Finite Difference Methods 2

2
Implicit Finite Difference Methods 18
3

Crank-Nicholson 25

Hedge Sensitivities 29
COMPUTATIONAL FINANCE
MSc

26
©Finbarr Murphy 2007

Crank-Nicolson Finite Differences


 The Crank-Nicolson method has a faster
convergence than implicit or explicit methods

 It is an average of the implicit and explicit


methods

 It is a “fully cantered method”


COMPUTATIONAL FINANCE
MSc

27
©Finbarr Murphy 2007

Crank-Nicolson Finite Differences


 The Crank-Nicolson method centres the finite
differences at imaginary time-steps (i+½)

j+2

j+1
Ci,j+1 Ci+1,j+1

j
Ci,j Ci+1,j
COMPUTATIONAL FINANCE

j-1
Ci,j-1 Ci+1,j-1

j-2
i-1 i i+1 i+2 i+3
MSc

28
©Finbarr Murphy 2007

Crank-Nicolson Finite Differences


 The PDE becomes

Ci +1, j − Ci , j 1 2  ( Ci +1, j +1 − 2Ci +1, j + Ci +1, j −1 ) + ( Ci , j +1 − 2Ci , j + Ci , j −1 ) 


− = σ   + ...
∆t 2  2∆x 2

 ( Ci +1, j +1 − Ci +1, j −1 ) + ( Ci , j +1 − Ci , j −1 )   C i +1, j +C i , j 
v  − r  
 4∆x   2 
 With the same boundary conditions

Ci , N j − Ci , N j −1 = λU
COMPUTATIONAL FINANCE

Ci , − N j +1 − Ci , − N j = λL
MSc

29
©Finbarr Murphy 2007

Agenda
Page

1
Explicit Finite Difference Methods 2

2
Implicit Finite Difference Methods 18
3

Crank-Nicholson 25

Hedge Sensitivities 29
COMPUTATIONAL FINANCE
MSc

30
©Finbarr Murphy 2007

Hedge Sensitivities
 Computing the hedge sensitivities is as important
as the calculation of the option price

 Hedge sensitivities include


 Sensitivity to the underlying asset price (delta)
 Sensitivity to Delta (gamma)
 Sensitivity to interest rates (rho)
 Sensitivity to volatility (vega)
 Sensitivity to time (Theta)
COMPUTATIONAL FINANCE
MSc

31
©Finbarr Murphy 2007

Hedge Sensitivities
 As an example, sensitivity to the underlying stock
price, delta can be approximated by the equation

∂C C0 , j +1 − C0, j −1
∆= ≈
∂S S 0 , j +1 − S 0, j −1
COMPUTATIONAL FINANCE
MSc

32
©Finbarr Murphy 2007

Recommended Texts
 Required/Recommended
 Clewlow, L. and Strickland, C. (1996) Implementing derivative
models, 1st ed., John Wiley and Sons Ltd.
— Chapter 3

 Additional/Useful
 Brandimarte, P. (2006) Numerical methods in finance and
economics: A matlab-based introduction, 2nd Revised ed.,
John Wiley & Sons Inc.
— Chapter 9, P475-85
COMPUTATIONAL FINANCE

 Hull, J. (2005) Options, futures and other derivatives, 6th ed.,


Prentice Hall
— Chapters 17, P419-430
MSc

33

You might also like