32
Explicit finite difference method Overview Constructing the grid Discretised equations Computational Finance Finite Difference Methods Dr P. V. Johnson School of Mathematics 2018 Dr P. V. Johnson MATH60082

Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

  • Upload
    lydien

  • View
    223

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

Computational FinanceFinite Difference Methods

Dr P. V. Johnson

School of Mathematics

2018

Dr P. V. Johnson MATH60082

Page 2: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

Today’s Lecture

We now introduce the final numerical scheme which isrelated to the PDE solution.

Finite difference methods are numerical solutions to (inCF, generally) parabolic PDEs.

They work by

generating a discrete approximation to the PDEsolving the resulting system of the equations.

There are three types of methods:

the explicit method, (like the trinomial tree),the implicit method (best stability)the Crank-Nicolson method (best convergencecharacteristics).

Dr P. V. Johnson MATH60082

Page 3: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

Finite Difference Approximations

Consider a function of two variables V (S, t), if we considersmall changes in S and t we can use a Taylor’s series toexpress V (S + ∆S, t), V (S −∆S, t), V (S, t+ ∆t) as follows(all the derivatives are evaluated at (S, t))

V (S + ∆S, t) = V (S, t) + ∆S∂V

∂S+ 1

2(∆S)2∂2V

∂S2+O((∆S)3)

V (S −∆S, t) = V (S, t)−∆S∂V

∂S+ 1

2(∆S)2∂2V

∂S2+O((∆S)3)

V (S, t+ ∆t) = V (S, t) + ∆t∂V

∂t+ 1

2(∆t)2∂2V

∂t2+O((∆t)2)

Dr P. V. Johnson MATH60082

Page 4: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

In order to use a finite difference scheme we need toapproximate derivatives

For S, we have two options for the first derivative:

From (1) (or (2)) equation:

∂V

∂S(S, t) =

V (S + ∆S, t)− V (S, t)

∆S+

1

2∆S

∂2V

∂S2+O((∆S)2)

=V (S + ∆S, t)− V (S, t)

∆S+O(∆S)

From equations (1) and (2):

∂V

∂S(S, t) =

V (S + ∆S, t)− V (S −∆S, t)

2∆S+O((∆S)2)

Dr P. V. Johnson MATH60082

Page 5: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

For the second derivative we use equations (1) and (2)

∂2V

∂S2(S, t) =

V (S + ∆S, t)− 2V (S, t) + V (S −∆S, t)

(∆S)2+O((∆S)2)

For t we have

∂V

∂t(S, t) =

V (S, t+ ∆t)− V (S, t)

∆t+

1

2∆t

∂2V

∂t2+O((∆t)2)

=V (S, t+ ∆t)− V (S, t)

∆t+O(∆t)

Dr P. V. Johnson MATH60082

Page 6: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

How does this help us?

Reconsider the Black-Scholes equation and in particularthe Black-Scholes equation for a European options wherethere are continuous dividends:

∂V

∂t+

1

2σ2S2∂

2V

∂S2+ (r − δ)S∂V

∂S− rV = 0

The boundary conditions for a call are:

V (S, T ) = max(S −X, 0)

V (0, t) = 0

V (S, t)→ Se−δ(T−t) −Xe−r(T−t) as S →∞

Dr P. V. Johnson MATH60082

Page 7: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

and boundary conditions for a put are:

V (S, T ) = max(X − S, 0)

V (0, t) = Xe−r(T−t)

V (S, t)→ 0 as S →∞

We will now form a finite difference grid that describes theS − t space in which we need to solve the Black-Scholesequation.

For a numerical method we need to truncate the range of S.

Dr P. V. Johnson MATH60082

Page 8: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

and boundary conditions for a put are:

V (S, T ) = max(X − S, 0)

V (0, t) = Xe−r(T−t)

V (S, t)→ 0 as S →∞

We will now form a finite difference grid that describes theS − t space in which we need to solve the Black-Scholesequation.

For a numerical method we need to truncate the range of S.

Dr P. V. Johnson MATH60082

Page 9: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

Constructing the grid

We now need to ensure that we have a fine enough grid toallow for most possible movements in S and enough timesteps t.

As for the binomial and Monte-Carlo method we willdiscuss later what is a suitable size/number for these steps.

Partition the interval [0, SU ] into jmax subintervals each oflength ∆S = SU/jmax.

Partition the interval [0, T ] into imax subintervals each oflength ∆t = T/imax.

We will denote the value at each node V (j∆S, i∆t) as V ij

Dr P. V. Johnson MATH60082

Page 10: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

Constructing the grid

We now need to ensure that we have a fine enough grid toallow for most possible movements in S and enough timesteps t.

As for the binomial and Monte-Carlo method we willdiscuss later what is a suitable size/number for these steps.

Partition the interval [0, SU ] into jmax subintervals each oflength ∆S = SU/jmax.

Partition the interval [0, T ] into imax subintervals each oflength ∆t = T/imax.

We will denote the value at each node V (j∆S, i∆t) as V ij

Dr P. V. Johnson MATH60082

Page 11: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

Finite difference grid

0 T∆t 2∆t i∆t... ...

0

∆S

2∆S

.

.

j∆S

.

.

SU

Vji

upper boundary

lower boundary

terminal

boundary

option value at

i,j-th point of grid

pde holds in this region

Dr P. V. Johnson MATH60082

Page 12: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

Finite difference grid

0 T∆t 2∆t (i+1)∆t... ...

0

∆S

2∆S

.

.

j∆S

.

.

SU

Vji

upper boundary

lower boundary

pde holds in this region

Vj-1i

Vj+1i

Vji+1

Vj-1i+1

Vj+1i+1

Focus attention on i, j-th value Vji, and a little

piece of the grid around that point

i∆t

Dr P. V. Johnson MATH60082

Page 13: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

Discretised equations

We clearly know the information at t = T as this is thepayoff from the option, by limiting our focus on

V i+1j+1

V ij V i+1

j

V i+1j−1

we can approximate the derivatives in the Black-Scholesequation by using our difference equations

from this we can write V ij in terms of the other three terms.

Dr P. V. Johnson MATH60082

Page 14: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

Recall the BSM equation

∂V

∂t+

1

2σ2S2∂

2V

∂S2+ (r − δ)S∂V

∂S− rV = 0

The BSM equation approximates to

V i+1j − V i

j

∆t+ 1

2σ2j2(∆S)2

V i+1j+1 − 2V i+1

j − V i+1j−1

(∆S)2

+(r − δ)j∆SV i+1j+1 − V

i+1j−1

2∆S− rV i

j = 0

the unknown here is V ij as we have been working backward

in time.

Dr P. V. Johnson MATH60082

Page 15: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

Explicit Approximations

The discretised BSM equation is

V i+1j − V i

j

∆t+ 1

2σ2j2(∆S)2

V i+1j+1 − 2V i+1

j + V i+1j−1

(∆S)2

+(r − δ)j∆SV i+1j+1 − V

i+1j−1

2∆S− rV i

j = 0

Need to find V ij so rearrange in terms of this unknown:

V ij =

1

1 + r∆t(AV i+1

j+1 +BV i+1j + CV i+1

j−1 ) (∗)

where:A = (12σ

2j2 + 12(r − δ)j)∆t

B = 1− σ2j2∆tC = (12σ

2j2 − 12(r − δ)j)∆t

Dr P. V. Johnson MATH60082

Page 16: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

Thus is just like a binomial tree:

we have a way of calculating the option value at expiryand we have scheme for calculating the option value at theprevious time step.

The differences between the binomial and explicit finitedifference method are

the binomial uses two nodes to the explicit finite difference’sthree.You get to choose the specifications of the grid in the finitedifference methodYou also need to specify the behaviour on the upper andlower S boundaries.

Dr P. V. Johnson MATH60082

Page 17: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

Thus is just like a binomial tree:

we have a way of calculating the option value at expiryand we have scheme for calculating the option value at theprevious time step.

The differences between the binomial and explicit finitedifference method are

the binomial uses two nodes to the explicit finite difference’sthree.You get to choose the specifications of the grid in the finitedifference methodYou also need to specify the behaviour on the upper andlower S boundaries.

Dr P. V. Johnson MATH60082

Page 18: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

The grid again:

...0

∆S

2∆S

.

.

j∆S

.

.

SUImpose upper boundary at SU

Impose lower boundary at 0

terminal

boundary

Use difference eq. (*) in “interior” of

region, for j = 1, …, jmax –1

0 Tδt 2δt (i+1)∆t ...i∆t

Dr P. V. Johnson MATH60082

Page 19: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

Boundary Conditions

If we attempt to use equation (*) to calculate V i0 then we

need to have values of V i−1 which we don’t have (e.g. for

calls):

So for V i0 and V i

jmax we need to use our boundaryconditions.

V i0 = 0V ijmax = Sue−δ(T−i∆t) −Xe−r(T−i∆t)

These conditions will naturally be different for differentoptions, such as barrier options, put options etc.

Dr P. V. Johnson MATH60082

Page 20: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

Probabilistic Interpretation

The explicit finite difference scheme is like a trinomial tree.

Note that A+B + C = 1.

We can also show that the expected value of S is at timei∆t:

E[Sij ] =1

1 + r∆tE[Si+1

j ] (1)

the expected future value of S, following GBM, under therisk-neutral probability discounted at the risk-free rate.

A, B and C can then be interpreted as the risk-neutralprobabilities.

Dr P. V. Johnson MATH60082

Page 21: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

Probabilistic Interpretation

The explicit finite difference scheme is like a trinomial tree.

Note that A+B + C = 1.

We can also show that the expected value of S is at timei∆t:

E[Sij ] =1

1 + r∆tE[Si+1

j ] (1)

the expected future value of S, following GBM, under therisk-neutral probability discounted at the risk-free rate.

A, B and C can then be interpreted as the risk-neutralprobabilities.

Dr P. V. Johnson MATH60082

Page 22: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

Stability

Unfortunately, the explicit method may be unstable– this means small errors magnify during the iterativeprocedure.

Probabilistic ideas can be used to derive conditions forstability

If we consider A, B and C as probabilities, we require thatA, B, C ≥ 0.

For A and C this requires:

j > |r − δσ2|

Dr P. V. Johnson MATH60082

Page 23: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

Stability

Unfortunately, the explicit method may be unstable– this means small errors magnify during the iterativeprocedure.

Probabilistic ideas can be used to derive conditions forstability

If we consider A, B and C as probabilities, we require thatA, B, C ≥ 0.

For A and C this requires:

j > |r − δσ2|

Dr P. V. Johnson MATH60082

Page 24: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

Stability

Unfortunately, the explicit method may be unstable– this means small errors magnify during the iterativeprocedure.

Probabilistic ideas can be used to derive conditions forstability

If we consider A, B and C as probabilities, we require thatA, B, C ≥ 0.

For A and C this requires:

j > |r − δσ2|

Dr P. V. Johnson MATH60082

Page 25: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

A far bigger problem is for B where this says that

∆t <1

σ2j2

which means that you need to ensure that the time intervalis small enough.

The stability therefore restricts your choice of ∆t, ∆S

∆t cannot be too small, or else computation will take toolongthen this puts lower bound on size of ∆S

Dr P. V. Johnson MATH60082

Page 26: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

Convergence

How can we analyse the accuracy of the method?

The errors will arise from only approximating thederivatives, in particular, in the explicit finite differencemethod:

∂2V

∂S2(S, t) =

V (S + ∆S, t)− 2V (S, t) + V (S −∆S, t)

(∆S)2+O((∆S)2)

Further analysis shows that the errors decrease linearly intime steps

and quadratic in steps in S.

Dr P. V. Johnson MATH60082

Page 27: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

Convergence

How can we analyse the accuracy of the method?

The errors will arise from only approximating thederivatives, in particular, in the explicit finite differencemethod:

∂2V

∂S2(S, t) =

V (S + ∆S, t)− 2V (S, t) + V (S −∆S, t)

(∆S)2+O((∆S)2)

Further analysis shows that the errors decrease linearly intime steps

and quadratic in steps in S.

Dr P. V. Johnson MATH60082

Page 28: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

Convergence

How can we analyse the accuracy of the method?

The errors will arise from only approximating thederivatives, in particular, in the explicit finite differencemethod:

∂2V

∂S2(S, t) =

V (S + ∆S, t)− 2V (S, t) + V (S −∆S, t)

(∆S)2+O((∆S)2)

Further analysis shows that the errors decrease linearly intime steps

and quadratic in steps in S.

Dr P. V. Johnson MATH60082

Page 29: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

Nonlinearity error

Theoretical convergence rates depends upon all of thederivatives being well behaved (e.g. not infinite).

However, we know that in the case of European options,the payoff at expiry is discontinuous leading to an infinitefirst derivative - and so it seems likely that ourapproximation may not work as well here.

There are therefore problems with any option thatintroduces a new boundary

Dr P. V. Johnson MATH60082

Page 30: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

Nonlinearity error

Theoretical convergence rates depends upon all of thederivatives being well behaved (e.g. not infinite).

However, we know that in the case of European options,the payoff at expiry is discontinuous leading to an infinitefirst derivative - and so it seems likely that ourapproximation may not work as well here.

There are therefore problems with any option thatintroduces a new boundary

Dr P. V. Johnson MATH60082

Page 31: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

Summary

Introduced the finite-difference method to solve PDEs

Discretise the original PDE to obtain a linear system ofequations to solve.

This scheme was explained for the Black Scholes PDE andin particular we derived the explicit finite difference schemeto solve the European call and put option problems.

The convergence of the method is similar to the binomialtree and, in fact, the method can be considered a trinomialtree.

Explicit method can be unstable - constraints on our gridsize.

Dr P. V. Johnson MATH60082

Page 32: Computational Finance Finite Difference Methods · Finite di erence methods are numerical solutions to (in ... Finite Difference Approximations ... j as we have been working backward

Explicit finite difference methodOverview

Constructing the gridDiscretised equations

Summary

Introduced the finite-difference method to solve PDEs

Discretise the original PDE to obtain a linear system ofequations to solve.

This scheme was explained for the Black Scholes PDE andin particular we derived the explicit finite difference schemeto solve the European call and put option problems.

The convergence of the method is similar to the binomialtree and, in fact, the method can be considered a trinomialtree.

Explicit method can be unstable - constraints on our gridsize.

Dr P. V. Johnson MATH60082