0% found this document useful (0 votes)
14 views

Numerical Methods

This document provides an introduction to numerical methods for pricing options, specifically Monte Carlo simulations and finite difference methods. It discusses using Monte Carlo simulations to simulate asset price paths under the risk-neutral process and calculate option prices as the average payoff. It also introduces the finite difference method for solving the Black-Scholes PDE on a grid by approximating derivatives. The key steps of each method are outlined.

Uploaded by

Paritosh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Numerical Methods

This document provides an introduction to numerical methods for pricing options, specifically Monte Carlo simulations and finite difference methods. It discusses using Monte Carlo simulations to simulate asset price paths under the risk-neutral process and calculate option prices as the average payoff. It also introduces the finite difference method for solving the Black-Scholes PDE on a grid by approximating derivatives. The key steps of each method are outlined.

Uploaded by

Paritosh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 67

Introduction to

Numerical Methods
In this lecture. . .

• The justification for pricing by Monte Carlo simulation

• Grids and discretization of derivatives

• The explicit finite-difference method

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

• implement the Monte Carlo method for simulating asset paths


and pricing options

• implement the explicit finite-difference method for pricing


options

2
Introduction

More often than not we must solve option-pricing problems by


numerical means.

It is rare to be able to find closed-form solutions for prices unless


both the contract and the model are very simple.

The most useful numerical techniques are Monte Carlo simula-


tions and finite-difference methods.

3
Relationship between derivative values and simulations

Theory says:

• The fair value of an option is the present value of the ex-


pected payoff at expiry under a risk-neutral random walk for
the underlying.

The risk-neutral random walk for S is

• dS = rS dt + σS dX.

This is simply our usual lognormal random walk but with the
risk-free rate instead of the real growth rate.

4
Justification:

• Binomial method

• Black–Scholes Equation similar to backward Kolmogorov equa-


tion

• Martingale theory

5
We can therefore write

• option value = e−r(T −t)E [payoff(S)]

provided that the expectation is with respect to the risk-neutral


random walk, not the real one.

6
The algorithm:

1. Simulate the risk-neutral random walk starting at today’s


value of the asset S0 over the required time horizon. This
gives one realization of the underlying price path.

2. For this realization calculate the option payoff.

3. Perform many more such realizations over the time horizon.

4. Calculate the average payoff over all realizations.

5. Take the present value of this average, this is the option


value.

7
How do we simulate the asset?

Two ways:

1. If the s.d.e. for the asset path is integrable and the contract
is not path dependent (or American) then simulate in ‘one
giant leap’

2. Otherwise you will have to simulate time step by time step,


the entire path

8
One giant leap: A method that works in special cases

For the lognormal random walk we are lucky that we can find a
simple, and exact, time stepping algorithm.

We can write the risk-neutral stochastic differential equation for


S in the form
 
1 2
d(log S) = r − 2 σ dt + σ dX.

This can be integrated exactly to give

   t 
S(t) = S(0) exp r−1 σ 2 t+σ dX .
2 0
i.e.


1 2
 √ 
• S(T ) = S(0) exp r − 2σ T + σ T φ .

9
Because this expression is exact and simple it is the best time
stepping algorithm to use. . . but only if we have a payoff that
only depends on the final asset value, i.e. is European and path
independent.

We can then simulate the final asset price in one giant leap,
using a time step of T if both of these are true

• the s.d.e. is integrable and

• the contract is European and not path dependent

10
Simulating the entire path: A method that always works

Price paths are simulated using a discrete version of the stochas-


tic differential equation for S.

An obvious choice is to use


δS = rS δt + σS δt φ,

where φ is from a standardized Normal distribution.

• This way of simulating the time series is called the Euler


method. This method has an error of O(δt).

11
Errors

There are two (at least) sources of error in the Monte Carlo
method:

• If the size of the time step is δt then we may introduce errors


of O(δt) by virtue of the discrete approximation to continuous
events

• Because we are only simulating a finite number of an infinite


number of possible paths, the error due to using N realiza-
tions of the asset price paths is O(N −1/2).

12
Generating Normal variables

• Quick ’n’ dirty: A useful distribution that is easy to imple-


ment on a spreadsheet, and is fast, is the following approxi-
mation to the Normal distribution:
 
12

 ψi − 6,
i=1

where the ψi are independent random variables, drawn from


a uniform distribution over zero to one.

There are other methods such as Box–Muller, more later.

13
Accuracy and computational time

Let’s use  to represent the desired accuracy in a MC calculation.



We know that errors are O(δt) and O(1/ N ). It makes sense
to have errors due to the time step and to the finite number of
simulations to be of the same order (no point in having one link
in a chain stronger than another!). So we would choose:

δt = O() and N = O(−2).

The time taken is then proportional to number of calculations,


therefore
Time taken = O(−3).

If you want to halve the error it will take eight times as long.

14
In higher dimensions. . .

Suppose you have a basket option with D underlyings. The time


taken now becomes

Time taken = O(D−3).

(Think of having one Excel spreadsheet per asset.)

This is surprisingly insensitive to dimension!

15
Other issues

• Greeks

• Early exercise (and other decisions)

16
Advantages of Monte Carlo simulations

• The mathematics that you need to perform a Monte Carlo


simulation can be very basic

• Correlations can be easily modeled, and it is easy to price


options on many assets (high-dimensional contracts)

• It is computationally quite efficient in high dimensions

• There is plenty of software available, at the very least there


are spreadsheet functions that will suffice for most of the
time

• To get a better accuracy, just run more simulations

17
• The effort in getting some answer is very low

• The models can often be changed without much work

• Complex path dependency can often be easily incorporated

• Many contracts can be priced at the same time

• People accept the technique, and will believe your answers

18
Disadvantages of Monte Carlo simulations

• The method is very slow, you need a lot of simulations to


get an accurate answer

• Finding the greeks can be hard

• The method does not cope well with early exercise

19
Finite difference methods

Monte Carlo simulations can be very slow to converge to the


answer, and they do not give us the greeks without further effort.

There is a method that is very similar to the binomial tree


method which is the method of choice for certain types of prob-
lem.

20
Grids

Recall the shape of the binomial tree. . .

The shape of the tree is determined by the asset volatility.

21
S

The finite-difference grid.

The finite-difference grid usually has equal time steps and equal
S steps.

22
Differentiation using the grid

Notation: time step δt and asset step δS. The grid is made up
of the points at asset values

S = i δS
and times
t = T − k δt

where 0 ≤ i ≤ I and 0 ≤ k ≤ K.

We will be solving for the asset value going from zero up to the
asset value I δS.

The Black–Scholes equation is to be solved for 0 ≤ S < ∞ so


that I δS is our approximation to infinity.

23
Write the option value at each of these grid points as

Vik = V (i δS, T − k δt).

• The superscript is the time variable and the subscript the


asset variable. S = 'infinity'

Expiration
i k
Vi

S =0
k t

24
Approximating θ

The definition of the first time derivative of V is simply

∂V V (S, t) − V (S, t − h)
= lim .
∂t h→0 h

It follows naturally that we can approximate the time derivative


from our grid of values using

∂V Vik − Vik+1
(S, t) ≈ .
∂t δt

This is our approximation to the option’s theta.

25
S
Use the option values
at these two points to
calculate the theta

Approximating the theta.

How accurate is this approximation?

26
We can expand the option value at asset value S and time t − δt
in a Taylor series about the point S, t as follows.

∂V
V (S, t − δt) = V (S, t) − δt (S, t) + O(δt2).
∂t

In terms of values at grid points this is just

k k+1 ∂V
Vi = Vi + δt (S, t) + O(δt2).
∂t

Which, upon rearranging, is

∂V Vik − Vik+1
(S, t) = + O(δt).
∂t δt

• The error is O(δt).

27
Approximating ∆

Examine a cross section of the grid at one of the time steps.

Central difference (the most


accurate of the three)

Backward difference
Forward
difference

We want to
approximate the
derivative at this point
S

28
These three approximations are

k −Vk
Vi+1 i
,
δS

Vik − Vi−1
k

δS
k −Vk
Vi+1 i−1
and .
2 δS

These are called a forward difference, a backward difference


and a central difference respectively.

One of these approximations is better than the others.

29
From a Taylor series expansion of the option value about the
point S + δS, t we have

∂V 1 2 ∂ 2V 3 ).
V (S + δS, t) = V (S, t) + δS (S, t) + 2 δS (S, t) + O(δS
∂S ∂S 2

Similarly,

∂V 2
1 2∂ V 3
V (S − δS, t) = V (S, t) − δS (S, t) + 2 δS 2
(S, t) + O(δS ).
∂S ∂S

30
From these we get

k −Vk
Vi+1
∂V i−1
(S, t) = + O(δS 2).
∂S 2 δS

• The central difference has an error of O(δS 2), the error in


the forward and backward differences are both much larger,
O(δS).

The central difference calculated at S requires knowledge of the


option value at S + δS and S − δS.

31
S
Use the option value at
these two points to
calculate the delta

32
Approximating Γ

Gamma is the sensitivity of the delta to the underlying.

k
V
i+ 1

k
V
i
k
V
i -1

i -1 i i +1

33
Calculate the delta half way between i and i + 1, and the delta
half way between i − 1 and i . . . and difference them!

k −Vk
Vi+1 i
Forward difference = .
δS

Vik − Vi−1
k
Backward difference = .
δS

34
Therefore the natural approximation for the gamma is

k −V k
Vi+1 Vik −Vi−1
k
∂ 2V δS
i
− δS
(S, t) ≈
∂S 2 δS

k − 2V k + V k
Vi+1 i i−1
= .
δS 2

The error in this approximation is also O(δS 2).

35
S
Use the option value at
these three points to
calculate the gamma

36
Final conditions and payoffs

We know that at expiry the option value is just the payoff func-
tion. At expiry we have

V (S, T ) = Payoff(S)

or, in our finite-difference notation,

Vi0 = Payoff(i δS).

The right-hand side is a known function.

37
For example, if we are pricing a call option we have

Vi0 = max(i δS − E, 0).

This final condition will get our finite-difference scheme started.

38
The explicit finite-difference method

The Black–Scholes equation is

∂V ∂ 2V ∂V
1 2 2
+ 2σ S + rS − rV = 0.
∂t ∂S 2 ∂S

Write this as

∂V ∂ 2V ∂V
+ a(S, t) 2 + b(S, t) + c(S, t)V = 0
∂t ∂S ∂S

so that we can examine more general problems.

39
Using the above approximations

   
Vi − Vi
k k+1 Vi+1 − 2Vi + Vi−1
k k k Vi+1 − Vi−1
k k
k
+ ai   + bk  
2 i
δt δS 2δS

+cki Vik = O(δt, δS 2).

This can be rearranged. . .

40
Vik+1 = · · · Vi+1
k
+ · · · Vik + · · · Vi−1
k
.

This is an equation for Vik+1 given three option values at time


k.

(That’s why this is called the explicit finite-difference method.)

41
The relationship between the option values in the algorithm is
shown in the figure below.

is
This calculated
option from
value these
three

42
Points to note:

• The time derivative uses the option values at ‘times’ k and


k + 1, whereas the other terms all use values at k.

• The gamma term is a central difference, in practice one never


uses anything else.

• The delta term uses a central difference. There are often


times when a one-sided derivative is better. We’ll see exam-
ples later.

43
• The asset- and time-dependent functions a, b and c have
been valued at Si = i δS and t = T − k δt with the obvious
notation.

• The error in the equation is O(δt, δS 2).

44
S

45
S

46
S

47
S

48
S

49
S

50
Boundary conditions

We must specify the option values at the extremes of the region,


at S = 0 and at S = I δS. They will depend on our option.

Example 1: Call option at S = 0

At S = 0 we know that the value is always zero, therefore

V0k = 0.

Example 2: Call option for large S

For large S the call value asymptotes to S − Ee−r(T −t) . Thus

VIk = I δS − Ee−rk δt.

51
Example 3: Put option at S = 0

At S = 0 V = Ee−r(T −t). I.e.

V0k = Ee−rk δt.

Example 4: Put option for large S

The put option becomes worthless for large S and so

VIk = 0.

52
Example 5*: General condition at S = 0

A useful boundary condition to apply at S = 0 is that the diffusion


and drift terms ‘switch off.’

∂V
(0, t) − rV (0, t) = 0 V0k = (1 − rδt)V0k−1.
∂t

53
Example 6*: General condition at infinity

When the option has a payoff that is linear in the underlying for
large S then

∂ 2V
(S, t) → 0 as S → ∞.
∂S 2

The finite-difference representation is

VIk = 2VI−1
k k
− VI−2 .

54
S

55
S

56
linear extrapolation
S

57
S

58
S

59
S

60
Accuracy and computational time

Again let’s use  to represent the desired accuracy in a calcula-


tion.

We know that errors are O(δt) and O(δS 2). It makes sense to
have errors due to the time step and to the finite number of
simulations to be of the same order. So we would choose:

δt = O() and δS = O(1/2).

The time taken is then proportional to number of calculations,


therefore
Time taken = O(−3/2).

61
In higher dimensions. . .

Suppose you have a basket option with D underlyings. The time


taken now becomes

Time taken = O(−1−D/2).

This is very sensitive to dimension!

62
Other issues

• Greeks

• Early exercise (and other decisions)

63
The advantages of the explicit method

• It is very easy to program and hard to make mistakes

• When it does go unstable it is usually obvious

• It copes well with coefficients that are asset and/or time


dependent

• it copes very well with early exercise

• It can be used for modern option-pricing models

64
The disadvantages of the explicit method

• There are restrictions on the time step

• It is slower than Monte Carlo in high dimensions

65
Monte Carlo versus Finite Difference

Computational time: O(D−3) (MC) versus O(−1−D/2) (FD).

Rule of thumb: FD for D < 4, MC for D > 4. (Either when


D = 4.)

Early exercise: FD much, much better.

66
Summary

Please take away the following important ideas

• There are two main numerical methods for pricing derivatives

• Monte Carlo methods exploit the relationship between option


prices and expectations

• The finite-difference method solved a discretized version of


the Black–Scholes equation

67

You might also like