2. monte carlo methods - university of manchester · the monte carlo method takes numerous...

26
2. Monte Carlo Methods Dr P. V. Johnson Department of Mathematics 2020 Dr P. V. Johnson MATH60082

Upload: others

Post on 10-Jun-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 2. Monte Carlo Methods - University of Manchester · The Monte Carlo method takes numerous simulated paths to estimate the expected option price at expiry, which can be discounted

2. Monte Carlo Methods

Dr P. V. Johnson

Departmentof Mathematics

2020

Dr P. V. Johnson MATH60082

Page 2: 2. Monte Carlo Methods - University of Manchester · The Monte Carlo method takes numerous simulated paths to estimate the expected option price at expiry, which can be discounted

What have we done so far

Introductory lecture discussed errors and how they mightarise.

C++ support classes introduced basic programming.

Today, we discuss Monte Carlo Methods

In the Lab Class this Thursday, “mini task 1” will bedistibuted by email in class

Handin will be Sunday 5pm.

Please check your email over next few days as I check emailthe distribution system.

Dr P. V. Johnson MATH60082

Page 3: 2. Monte Carlo Methods - University of Manchester · The Monte Carlo method takes numerous simulated paths to estimate the expected option price at expiry, which can be discounted

What have we done so far

Introductory lecture discussed errors and how they mightarise.

C++ support classes introduced basic programming.

Today, we discuss Monte Carlo Methods

In the Lab Class this Thursday, “mini task 1” will bedistibuted by email in class

Handin will be Sunday 5pm.

Please check your email over next few days as I check emailthe distribution system.

Dr P. V. Johnson MATH60082

Page 4: 2. Monte Carlo Methods - University of Manchester · The Monte Carlo method takes numerous simulated paths to estimate the expected option price at expiry, which can be discounted

What have we done so far

Introductory lecture discussed errors and how they mightarise.

C++ support classes introduced basic programming.

Today, we discuss Monte Carlo Methods

In the Lab Class this Thursday, “mini task 1” will bedistibuted by email in class

Handin will be Sunday 5pm.

Please check your email over next few days as I check emailthe distribution system.

Dr P. V. Johnson MATH60082

Page 5: 2. Monte Carlo Methods - University of Manchester · The Monte Carlo method takes numerous simulated paths to estimate the expected option price at expiry, which can be discounted

The Random Walk

Many financial models (including the Black-Scholesframework) assume that the underlying asset follows arandom walk

Using random numbers, we can simulate that random walk,

and find the path that the stock price will follow.

The Monte Carlo method takes numerous simulated pathsto estimate the expected option price at expiry,

which can be discounted back to today.

Dr P. V. Johnson MATH60082

Page 6: 2. Monte Carlo Methods - University of Manchester · The Monte Carlo method takes numerous simulated paths to estimate the expected option price at expiry, which can be discounted

The Random Walk

Many financial models (including the Black-Scholesframework) assume that the underlying asset follows arandom walk

Using random numbers, we can simulate that random walk,

and find the path that the stock price will follow.

The Monte Carlo method takes numerous simulated pathsto estimate the expected option price at expiry,

which can be discounted back to today.

Dr P. V. Johnson MATH60082

Page 7: 2. Monte Carlo Methods - University of Manchester · The Monte Carlo method takes numerous simulated paths to estimate the expected option price at expiry, which can be discounted

Quick Reminder:- Option Pricing

Example 2.1:

Plot some example stock price paths on a graph.

Dr P. V. Johnson MATH60082

Page 8: 2. Monte Carlo Methods - University of Manchester · The Monte Carlo method takes numerous simulated paths to estimate the expected option price at expiry, which can be discounted

Monte Carlo techniques

Good for options on more than one underlying asset.

Convergence is slow, errors are random.

Convergence is order N−12 where N is the number of

sample paths.

It is a forward induction technique, which makes valuingpath dependent options easy.

However, it is very difficult to value American style optionsfor exactly the same reason.

Dr P. V. Johnson MATH60082

Page 9: 2. Monte Carlo Methods - University of Manchester · The Monte Carlo method takes numerous simulated paths to estimate the expected option price at expiry, which can be discounted

Monte Carlo techniques

Good for options on more than one underlying asset.

Convergence is slow, errors are random.

Convergence is order N−12 where N is the number of

sample paths.

It is a forward induction technique, which makes valuingpath dependent options easy.

However, it is very difficult to value American style optionsfor exactly the same reason.

Dr P. V. Johnson MATH60082

Page 10: 2. Monte Carlo Methods - University of Manchester · The Monte Carlo method takes numerous simulated paths to estimate the expected option price at expiry, which can be discounted

Note:- The law of large numbers

Large Numbers

Given a sequence of independent, identically distributedrandom variables Y i then

limN→∞

1

N

N∑n=1

Y i = E[Y ]

So the expectation is exactly like taking a long run average.

To decrease errors increase N .

We wish to evaluate E[YT ] = E[V (ST )].

Dr P. V. Johnson MATH60082

Page 11: 2. Monte Carlo Methods - University of Manchester · The Monte Carlo method takes numerous simulated paths to estimate the expected option price at expiry, which can be discounted

Note:- The law of large numbers

Large Numbers

Given a sequence of independent, identically distributedrandom variables Y i then

limN→∞

1

N

N∑n=1

Y i = E[Y ]

So the expectation is exactly like taking a long run average.

To decrease errors increase N .

We wish to evaluate E[YT ] = E[V (ST )].

Dr P. V. Johnson MATH60082

Page 12: 2. Monte Carlo Methods - University of Manchester · The Monte Carlo method takes numerous simulated paths to estimate the expected option price at expiry, which can be discounted

Application to options

Let St be the share price at time t, then the option valueV (St, t) is

V (St, t) = EQt [e−

∫ Tt r(s)dsV (ST , T )]

or if r is constant,

e−r(T−t)EQt [V (ST , T )]

where Q is the risk-neutral measure, Et denotes taking theexpectation at time t, and V (ST , T ) is the payoff at expiry.

Option value is discounted expected price.

Dr P. V. Johnson MATH60082

Page 13: 2. Monte Carlo Methods - University of Manchester · The Monte Carlo method takes numerous simulated paths to estimate the expected option price at expiry, which can be discounted

Application to options

Let St be the share price at time t, then the option valueV (St, t) is

V (St, t) = EQt [e−

∫ Tt r(s)dsV (ST , T )]

or if r is constant,

e−r(T−t)EQt [V (ST , T )]

where Q is the risk-neutral measure, Et denotes taking theexpectation at time t, and V (ST , T ) is the payoff at expiry.

Option value is discounted expected price.

Dr P. V. Johnson MATH60082

Page 14: 2. Monte Carlo Methods - University of Manchester · The Monte Carlo method takes numerous simulated paths to estimate the expected option price at expiry, which can be discounted

Example - GBM

Example 2.2

Outline how to generate random paths of a GeometricBrownian Motion.

Example 2.3

What is the error if we calculate an option value with a singlepath?

Dr P. V. Johnson MATH60082

Page 15: 2. Monte Carlo Methods - University of Manchester · The Monte Carlo method takes numerous simulated paths to estimate the expected option price at expiry, which can be discounted

Example - GBM

Example 2.2

Outline how to generate random paths of a GeometricBrownian Motion.

Example 2.3

What is the error if we calculate an option value with a singlepath?

Dr P. V. Johnson MATH60082

Page 16: 2. Monte Carlo Methods - University of Manchester · The Monte Carlo method takes numerous simulated paths to estimate the expected option price at expiry, which can be discounted

Errors

Central Limit Theorem

If V (SiT ) is a sequence of independent and identically

distributed random variables with mean EQt [V (ST )] and

variance η2, then we can say that

√n

(1

n

n∑i=1

V (SiT )− EQ

t [V (ST )]

)d−→ N(0, η2).

Example 2.4

What does this mean we can say about our calculation errors?

Dr P. V. Johnson MATH60082

Page 17: 2. Monte Carlo Methods - University of Manchester · The Monte Carlo method takes numerous simulated paths to estimate the expected option price at expiry, which can be discounted

Errors

Central Limit Theorem

If V (SiT ) is a sequence of independent and identically

distributed random variables with mean EQt [V (ST )] and

variance η2, then we can say that

√n

(1

n

n∑i=1

V (SiT )− EQ

t [V (ST )]

)d−→ N(0, η2).

Example 2.4

What does this mean we can say about our calculation errors?

Dr P. V. Johnson MATH60082

Page 18: 2. Monte Carlo Methods - University of Manchester · The Monte Carlo method takes numerous simulated paths to estimate the expected option price at expiry, which can be discounted

European Call Option

For a European call option the payoff at maturity V (ST ) isgiven by

V (ST ) = max(ST −X, 0)

Simulate n possible paths for ST with n independent drawsfrom N(0, 1) (φi)

Then

for: 1 ≤ i ≤ n

SiT = S0 exp[(r − 1

2σ2)T + σφi

√T ]

V (SiT ) = max(Si

T −X, 0)

V (S0, t = 0) = e−rT1

n

n∑i=1

V (SiT )

Dr P. V. Johnson MATH60082

Page 19: 2. Monte Carlo Methods - University of Manchester · The Monte Carlo method takes numerous simulated paths to estimate the expected option price at expiry, which can be discounted

European Call Option

For a European call option the payoff at maturity V (ST ) isgiven by

V (ST ) = max(ST −X, 0)

Simulate n possible paths for ST with n independent drawsfrom N(0, 1) (φi)

Then

for: 1 ≤ i ≤ n

SiT = S0 exp[(r − 1

2σ2)T + σφi

√T ]

V (SiT ) = max(Si

T −X, 0)

V (S0, t = 0) = e−rT1

n

n∑i=1

V (SiT )

Dr P. V. Johnson MATH60082

Page 20: 2. Monte Carlo Methods - University of Manchester · The Monte Carlo method takes numerous simulated paths to estimate the expected option price at expiry, which can be discounted

Psuedo code

Example 2.5

Write down a simple Monte Carlo option algorithm in pseudocode.

Dr P. V. Johnson MATH60082

Page 21: 2. Monte Carlo Methods - University of Manchester · The Monte Carlo method takes numerous simulated paths to estimate the expected option price at expiry, which can be discounted

Path Dependent Options

A path dependent option is one whose payoff depends onthe path followed by the underlying asset

The terminal condition may depend on the path (Asian,lookback, etc.)

or there may exist a condition at time t (barrier options).

Assume the share price is observed at K + 1 points in time

S(t0), S(t1), . . . , S(tK)

If the terminal boundary condition depends on the paththe payoff becomes

V (S(t0), S(t1), . . . , S(tK), T )

Dr P. V. Johnson MATH60082

Page 22: 2. Monte Carlo Methods - University of Manchester · The Monte Carlo method takes numerous simulated paths to estimate the expected option price at expiry, which can be discounted

Path Dependent Options

A path dependent option is one whose payoff depends onthe path followed by the underlying asset

The terminal condition may depend on the path (Asian,lookback, etc.)

or there may exist a condition at time t (barrier options).

Assume the share price is observed at K + 1 points in time

S(t0), S(t1), . . . , S(tK)

If the terminal boundary condition depends on the paththe payoff becomes

V (S(t0), S(t1), . . . , S(tK), T )

Dr P. V. Johnson MATH60082

Page 23: 2. Monte Carlo Methods - University of Manchester · The Monte Carlo method takes numerous simulated paths to estimate the expected option price at expiry, which can be discounted

Creating a Path

Example 2.6

Outline the procedure for valuing a Path Dependent option.

Dr P. V. Johnson MATH60082

Page 24: 2. Monte Carlo Methods - University of Manchester · The Monte Carlo method takes numerous simulated paths to estimate the expected option price at expiry, which can be discounted

Is it random enough?

A computer can never generate a set of random numbers

only one that ‘appears’ random, subject to some statisticaltests.

One of the most important tests is that of zero correlation.

In some circumstances, generating a correlated randomsequence will perform better than one with close to zerocorrelation

Dr P. V. Johnson MATH60082

Page 25: 2. Monte Carlo Methods - University of Manchester · The Monte Carlo method takes numerous simulated paths to estimate the expected option price at expiry, which can be discounted

What is random

Example 2.7

Draw a unit square and place 10 crosses inside, assuming thatthe x and y coordinates are drawn from uniform distributions.What does this look like if a computer does it?

Dr P. V. Johnson MATH60082

Page 26: 2. Monte Carlo Methods - University of Manchester · The Monte Carlo method takes numerous simulated paths to estimate the expected option price at expiry, which can be discounted

Monte-Carlo Methods

Simple to program and to understand

Convergence is slow, extrapolation impossible.

Forward looking method ideal for path dependentderivatives

Good for derivatives where there are multiple sources ofuncertainty, as the computational effort only increaseslinearly.

To simulate the paths we typically use the solution to theSDE or the Euler approximation, along with a decentgenerator of Normally distributed random variables.

Check the notes for how to generate multi-asset paths.

Dr P. V. Johnson MATH60082