European pricing with monte carlo simulation

88
1 European Pricing with Monte Carlo Simulation Giovanni Della Lunga University of Insubria - Varese - Italy SUMMER SCHOOL FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “COPULA METHODS IN FINANCE” Department of Mathematics for Economics and Social Science of the University of Bologna Bologna - September, 13-15, 2004

description

 

Transcript of European pricing with monte carlo simulation

Page 1: European pricing with monte carlo simulation

1

European Pricing with Monte Carlo Simulation

Giovanni Della LungaUniversity of Insubria - Varese - Italy

SUMMER SCHOOLFRONTIERS IN FINANCIAL MARKETS MATHEMATICS

“COPULA METHODS IN FINANCE” Department of Mathematics for Economics and Social Science of the University of Bologna

Bologna - September, 13-15, 2004

Page 2: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

2

The “path”

1. Scenario generation exact solution advancement generating scenarios by numerical integration of the stochastic

differential equations

2. Correlation and co-movement joint normals distributions by the Cholesky Decomposition Approach joint with copulae: an example using gaussian and t-copula

3. Quasi-random sequences

4. European Pricing with simulation the workflow of pricing with Monte Carlo Increasing simulation efficiency with variance reduction methods

Page 3: European pricing with monte carlo simulation

3

1

Scenario Generation

Page 4: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

4

Introduction

Generating scenarios of the underlying processes

that determine the derivative’s price is an essential

and delicate task from an analytical perspective as

well as from a system design viewpoint;

As we know, the main objective of scenarios in

pricing is to compute the expectation that gives us

the value of the financial instrument;

Page 5: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

5

Scenario Nomenclature

It’s well known that the value of a derivative security with payoffs at a known time T is given by the expectation of its payoff, normalized with the numeraire asset;

The value of an European derivative whose payoff depends on a single underlying process, S(t), is given by

where all stochastic processes in this expectation are consistent with the measure induced by the numeraire asset B(t).

)(

]),([)0(]0),0([

TB

TTSVEBSV B

Page 6: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

6

Scenario Nomenclature

We consider an underlying process S(t) described by the sde

A scenario is a set of values that are an

approximation to the j-th realization,S j(ti), of the solution of the sde

evaluated at times A scenario is also called a trajectory

A trajectory can be visualized as a line in the state-vs-time plane

describing the path followed by a realization of the stochastic process

(actually by an approzimation to the stochastic process).

dWtSbdttSatdS ),(),()(

IitS ij ,,1, )(ˆ

IiTti ,,1,0

Page 7: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

7

Scenario Nomenclature

Page 8: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

8

Scenario Construction

There are several ways to construct scenario for pricing Constructing a path of the solution to the SDE at times ti by

exact advancement of the solution; This method is only possible if we have an analytical

expression for the solution of the stochastic differential equation

Approximate numerical solution of the stochastic differential equation; This is the method of choice if we cannot use the previous

one; Just as in the case of ODE there are numerical techniques for

discretizing and solving SDE.

Page 9: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

9

Scenario Construction

Exact Solution Advancement

Example: Log-normal process with constant drift and volatility

dWdtS

dS

)()(

2

1exp)()( 11

21 iiiiii tWtWtttStS

)(

2

1exp)0()( 2 tWtStS

Solution

Trajectories construction

Page 10: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

10

Scenario Construction

Exact Solution Advancement How to obtain a sequence of Wiener process? The simplest way

Defining the outcomes of successive drawings of the random

variable Z corresponding to the j-th trajectory by Zji, we get the

following recursive expression for the j-th trajectory of S(t)

)1,0( )()( 11 NZZtttWtW iiii

jiiiiii

ji

j ZtttttStS 112

1 2

1exp)()(

Note. If the time spacing is uniform, all the increments we add to construct the Wiener path have the same variance!

Note. If the time spacing is uniform, all the increments we add to construct the Wiener path have the same variance!

Page 11: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

11

Scenario Construction

Exact Solution Advancement

Some observations are in order... The set W(ti) must be viewed as the components of a vector of

random variables with a multidimensional distribution. This means that for a fixed j Zj

i are realizations of a multidimensional standard

normal random variable which happen to be independent;

Wheter we view the Zji as coming from a multidimensional

distribution of independent normals or as drawings from a single one-dimensional distribution does not affect the outcome as long as the Zj

i are generated from pseudo-random numbers;

This distinction, however, is conceptually important and it becomes essential if we generate the Zj

i not from pseudo-

random numbers but from quasi-random sequences.

Page 12: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

12

Scenario Construction

Numerical Integration of SDE

The numerical integration of the SDE by finite difference is

another way of generating scenarios for pricing;

In the case of the numerical integration of ordinary

differential equations by finite differences the numerical

scheme introduces a discretization error that translates

into the numerical solution differing from the exact solution

by an amount proportional to a power of the time step.

This amount is the truncation error of the numerical

scheme.

Page 13: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

13

Scenario Construction

Numerical Integration of SDE

In the case of the numerical integration of SDE by finite

differences the interpretation of the numerical error introduced by

the discretization scheme is more complicated;

Unlike the case of ODE where the only thing we are interested in

computing is the solution itself, when dealing with SDE there are

two aspects that interest us: One aspect is the accuracy with which we compute the trajectories

or paths of a realization of the solution

The other aspect is the accuracy with which we compute functions of

the process such as expectations and moments.

Page 14: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

14

Scenario Construction

Numerical Integration of SDE

The order of accuracy with which a given scheme can approximate

trajectories of the solution is not the same as the accuracy with

which the same scheme can approximate expectations and

moments of functions of the trajectories;

The convergence of the numerically computed trajectories to the exact

trajectories is called strong convergence and the order of the

corresponding numerical scheme is called order of strong convergence;

The convergence of numerically computed functions of the stochastic

process to the exact values is called weak convergence and the related

order is called order of weak convergence.

See Kloeden and Platen For an exhaustive treatment of numerical schemes for SDE.

Page 15: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

15

Scenario Construction

Numerical Integration of SDE The two most popular schemes for integrating a SDE are the Explicit

Euler scheme and the Milshtein scheme

))()()(),(ˆ()),(ˆ()(ˆ)(ˆ11 iiiiiiii tWtWttSbtttSatStS

ttWtWS

ttSbttSb ii

iiii

2

1 )()()),(ˆ(

)),(ˆ(2

1

dWtSbdttSatdS ),(),()(

EULER

MILSHSTEIN

Page 16: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

16

Scenario Construction

Numerical Integration of SDE

Order of Strong Convergence The scheme has q order of strong convergence if

exist a constant that does not depend on such

that

qTSSE

)(ˆlim0

Page 17: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

17

Scenario Construction

Numerical Integration of SDE

Order of Weak Convergence Let f(S(t)) denote a function of the trajectory of the

solution. A finite difference scheme has q order of

weak convergence if exist a constant that does

not depend on such that

qTSfESfE

))(()ˆ(lim0

Page 18: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

18

Scenario Construction

Numerical Integration of SDE

Why the order of strong and weak convergence differ? Let’s consider a simplified and intuitive analysis of the

Euler scheme applied to the standard log-normal stochastic differential equation;

The following analysis is not rigoruous and is meant to show why the same scheme has different accuracy when it is used to compute trajectories than when it is used to compute expectations. For a complete and formal treatment of this subject the reader is referred to the classical work of Kloeden et al.

Page 19: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

19

Scenario Construction

Numerical Integration of SDE

Log-normal process with constant drift and volatility

)()(

)(tdWdt

tS

tdS

)(1)(ˆ)(ˆ1 iii tWttStS

)(

2

1exp)0()( 2 tWtStS

Solution

Euler scheme

)(1)(ˆ)(ˆ 1

00

k

iik tWttStS

Page 20: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

20

Scenario Construction

Numerical Integration of SDE

Assuming I time steps in the interval 0 t T, the error for strong convergence is (S0 = 1 for simplicity)

Now, to determine how well the product in the right approximates the exponential, we expand in Taylor series keeping terms just past order t...

)(2

1exp)(1 2

1

0

tWttWtEk

ii

Page 21: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

21

Scenario Construction

Numerical Integration of SDE

)()(6

1

)(2

1

)(2

1

)(2

11

6

1

2

11)(

2

1exp

233

2

22

2

322

tOtW

tWt

tW

tWt

xxxtWt

i

i

t

i

i

x

i

)()(6

1

)(2

1

)(2

1exp)(1

233

2

2

tOtW

tWt

tWttWt

i

i

ii

Page 22: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

22

Scenario Construction

Numerical Integration of SDE

)()()(

)(2

1exp

)()(6

1

)(2

1

)(2

1exp)(1

23

2

233

2

21

0

1

0

tIOWIOWtIO

TWT

tOtW

tWt

tWttWt

i

i

i

I

i

I

ii

Page 23: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

23

Scenario Construction

Numerical Integration of SDE Strong order

tO

WOt

WtOt

TE

WOWtOt

TE

WIOWtIOETSTSE

t

t

t

t

)(

1)(

1

)()(

)()()()(ˆ

2/32/3

3

3

3

Page 24: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

24

Scenario Construction

Numerical Integration of SDE To analyze the weak convergence consider as example the expectation

of the process itself...

)()()(

)(2

1exp

)()(2

1exp

)(2

1exp)(1)()(ˆ

22

2

22

21

0

tOtOt

TtIO

TWTE

tIOTWTE

TWTEtWtETSTSEI

ii

When we replace the expansion of the product, the terms with W do not contribute to the expectation!!!

Page 25: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

25

Scenario Construction

Numerical Integration of SDE

Now we can see clearly why the order of convergence is different when we look at paths and when we look at moments;

When we look at properties such expectations, the odd power of W don’t contribute to the expectation because in weak convergence we take the expectation first and then the norm;

When we look at the individual paths, on the other hand, these terms are the main contributors to the difference between the exact and the numerical solutions, this is because we take the norm first and then the expectation.

Page 26: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

26

Working with VBAWorking with VBA

A Simple Example of a Stochastic Discrete Time Simulation

A Simple Example of a Stochastic Discrete Time Simulation

Page 27: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

27

Scenario Construction

Numerical Integration of SDE

Observations

When the volatility is deterministic, the order of

strong convergence of the Euler scheme is 1;

In this case there is nothing to be gained by using

the Milshstein scheme in place of the Euler scheme

to construct scenario trajectories.

Page 28: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

28

The Brownian Bridge

Assume you have a Wiener process defined by a set of time-

indexed random variables {W(t1), W(t2), ... , W(tn)}.

How do you insert a random variable W(tk) where ti tk ti+1

into the set in such a manner that the resulting set still

consitutes a Wiener process?

The answer is: with a Brownian Bridge!

The Brownian Bridge is a sort of interpolation tat allows you to

introduce intermediate points in the trajectory of a Wiener

process.

Page 29: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

29

The Brownian Bridge

Brownian Bridge Construction Given W(t) and W(t + t1 + t2) we want to find W(t + t1 );

We assume that we can get the middle point by a weighted

average of the two end points plus an independent normal

random variable:

where , and are constants to be determined and Z is a

standard normal random variable.

ZtttWtWttW )()()( 211

Page 30: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

30

The Brownian Bridge

We have to satisfy the following conditions:

11

1211

11

)](var[

)](),(cov[

),min()](),(cov[

ttttW

tttttWttW

tttttWttW

12

2122

121

)(2

)(

1

ttttttt

tttttt

Page 31: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

31

The Brownian Bridge

12

2122

121

)(2

)(

1

ttttttt

tttttt

1

21

2

1

t

tt

t

Page 32: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

32

The Brownian Bridge

We can use the brownian bridge to generate a Wiener path and then use the Wiener path to produce a trajectory of the process we are interested in;

The simplest strategy for generating a Wiener path using the brownian bridge is to divide the time span of the trajectory into two equal parts and apply the brownian bridge construction to the middle point. We then repeat the procedure for the left and right sides of the time interval.

Page 33: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

33

The Brownian Bridge

Notice that as we fill in the Wiener path, the additional variance of the normal components we add has decreasing value;

Of course the total variance of all the Wiener increments does not depend on how we construct the path, however the fact that in the brownian bridge approach we use random variables that are multiplied by a factor of decreasing magnitude means that the importance of those variables also decreases as we fill in the path;

The dimension of the random variables with larger variance need to be sampled more efficiently than the dimension with smaller variance;

Page 34: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

34

The Brownian Bridge

In standard Monte Carlo this is not an issue because standard Monte Carlo is equally efficient at sampling from any dimension;

But standard Monte Carlo is very slow! As we will see, an alternative to standard Monte Carlo is the use of

deterministic or quasi-Monte Carlo or low-discrepancy sequences; Usually low-discrepacy sequences differs in their ability to cover

lower dimension as compared with higher dimension (this may be not completely true!);

The brownian bridge method for path construction reduces the burden on the simulation from having to sample efficiently from the higher dimension.

Page 35: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

35

Working with VBAWorking with VBA

A Simple Example of a Brownian Bridge Construction of Wiener Path

A Simple Example of a Brownian Bridge Construction of Wiener Path

Page 36: European pricing with monte carlo simulation

36

2

Correlation and Co-movement

Page 37: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

37

Joint Normals by the Choleski Decomposition Approach

The standard procedure for generating a set of correlated normal random variables is through a linear combination of uncorrelated normal random variables;

Assume we have a set of n independent standard normal random variables Z and we want to build a set of n correlated standard normals Ž with correlation matrix

AZZ

tAA

Page 38: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

38

Joint Normals by the Choleski Decomposition Approach

We can find a solution for A in the form of a triangular matrix

nnnn AAA

AA

A

A

21

2221

11

0

00

1

1

2i

kikiiii aa

1

1

2i

kikiiii aa

1

1

1 i

kjkikij

iiji aa

aa

1

1

1 i

kjkikij

iiji aa

aa

Page 39: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

39

Joint Normals by the Choleski Decomposition Approach

For a two-dimension random vector we have simply

Thus we can sample from a bivariate distribution by setting

2

22

1

1

0

A

22

21222

1111

1 ZZX

ZX

22

21222

1111

1 ZZX

ZX

Page 40: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

40

Simulation with Copula

Gaussian Copula The copula of the n-variate normal distribution with linear correlation

matrix R is

where Rn denotes the joint distribution function of the n-variate standard

normal distribution function with linear correlation matrix R, and -1 denotes the inverse of the distribution function of the univariate standard normal distribution.

Copulas of the above form are called Gaussian Copulas. In the bivariate case the copula expression can be written as

)(,),()( 11

1n

nR

GaR uuC u

dtdsR

tstRs

RvuC

u vGaR

)( )(

212

212

2

2/1212

1 1

)1(2

2exp

12

1,

Page 41: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

41

Simulation with Copula

Generation of random variates from the Gaussian n-copula

1. Find the Cholesky decomposition A of R

2. Simulate n independent random variates z = (z1,..., zn)’ from N(0,1)

3. Set x = Az

4. Set ui = (xi) with i = 1,2,...,n where denotes the

univariate standard normal distribution function

5. (y1,...,yn)’ =[F1-1(u1),...,Fn

-1(un)] where Fi denotes the i-th

marginal distribution.

Page 42: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

42

Simulation with Copula

Generation of random variates from the Student T n-copula

1. Find the Cholesky decomposition A of R

2. Simulate n independent random variates z = (z1,..., zn)’ from N(0,1)

3. Simulate a random variate s from 2 independent of z

4. Set y = Az

5. Set x = (/s)1/2y

6. Set ui = T(xi) with i = 1, 2, ..., n and where T denotes the univariate

Student t distribution function

7. (g1, ..., gn)’ =[F1-1(u1), ..., Fn

-1(un)] where Fi denotes the i-th marginal

distribution

Page 43: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

43

Working with VBAWorking with VBA

Generation of random variates from the Gaussian and Student t bivariate copulaGeneration of random variates from the Gaussian and Student t bivariate copula

Page 44: European pricing with monte carlo simulation

44

3

Quasi-Random Sequences

Page 45: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

45

Microsoft Knowledge Base #828795 The RAND function in earlier versions of Excel used a pseudo-random number generation

algorithm whose performance on standard tests of randomness was not sufficient (...) the pseudo-random number generation algorithm that is described here was implemented for Excel 2003. It passes the same battery of standard tests.

The battery of tests is named Diehard (see note 1). The algorithm that is implemented in Excel 2003 was developed by B.A. Wichman and I.D. Hill (see note 2 and note 3). (...) It has been shown by Rotz et al (see note 4) to pass the DIEHARD tests and additional tests developed by the National Institute of Standards and Technology (NIST, formerly National Bureau of Standards).

Notes The tests were developed by Professor George Marsaglia, Department of Statistics, Florida State

University and are available at the following Web site: http://www.csis.hku.hk/~diehard Wichman, B.A. and I.D. Hill, Algorithm AS 183: An Efficient and Portable Pseudo-Random Number

Generator, Applied Statistics, 31, 188-190, 1982. Wichman, B.A. and I.D. Hill, Building a Random-Number Generator, BYTE, pp. 127-128, March

1987. Rotz, W. and E. Falk, D. Wood, and J. Mulrow, A Comparison of Random Number Generators

Used in Business, presented at Joint Statistical Meetings, Atlanta, GA, 2001.

Random Number Generator in

Microsoft Excel

Page 46: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

46

Results in Earlier Versions of Excel The RAND function in earlier versions of Excel was fine in practice for users who did not require a lengthy sequence of

random numbers (such as a million). It failed several standard tests of randomness, making its performance an issue when a lengthy sequence of random numbers was needed.

Results in Excel 2003 A simple and effective algorithm has been implemented. The new generator passes all standard tests of randomness

(?????).

The RAND function returns negative numbers in Excel 2003

SYMPTOMS

When you use the RAND function in Microsoft Office Excel 2003, the RAND function may return negative numbers.

CAUSE

This problem may occur when you try to use a large number of random numbers, and you update the RAND function multiple times. For

example, this problem may occur when you update your Excel worksheet by pressing F9 ten times or more.

RESOLUTION

How to obtain the hotfix

This issue is fixed in the Excel 2003 Hotfix Package that is dated January 12, 2004. For additional information, click the following article

number to view the article in the Microsoft Knowledge Base:

833618 Excel 2003 hotfix package released January 12, 2004

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section of this article.

Random Number Generator in Microsoft Excel

Page 47: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

47

Low-discrepacy Sequences

The basic problem with standard Monte Carlo is that, unless special techniques are used (which we will briefly discuss forward) it is intrinsecally slow!

The reason why regular MC is so slow is because randomly sampling from a multidimensional distribution does not fill in the space with the regularity that would be desirable;

Random points tend to cluster and this clustering limits the efficiency with which regular MC can capture payoff features.

Quasi-random sequences are a deterministic way of filling in multidimensional unit intervals in a way that garanties a higher uniformity;

The concept of higher uniformity in filling a generic intervall is captured by the concept of discrepancy.

Page 48: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

48

Discrepancy A measure for how inhomogeneously a set of d-dimensional vectors

{ri} is distributed in the unit hypercube is the so called discrepancy;

A simple geometrical interpretation of this concept is as follows:

Generate a set of N multivariate draws {ri} from a selected uniform number

generation method of dimensionality d ;

All of this N vectors descrive the coordinates of points in the d-dimensional

unit hypercube [0,1]d ;

Now select a sub-hypercube S(y) by choosing a point y delimiting the

upper right corner of the hyper-rectangular domain from 0 to y;

In other words the sub-hypercube S can be written as

),[),[)( d1 y0y0yS ),[),[)( d1 y0y0yS

Page 49: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

49

Discrepancy Next let nS(y) denote the number of all those draws that are in S(y)

In the limit N we require perfect homogeneity from the sequence

generator which means

for all y in [0,1]d

N

1i

d

1kry

N

1iySryS ikki

n 11 )()(

N

1i

d

1kry

N

1iySryS ikki

n 11 )()(

d

1ii

yS

Ny

N

n )(lim

d

1ii

yS

Ny

N

n )(lim

Page 50: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

50

Discrepancy

The previous equation simply results from the fact that for a

perfectly omogeneous and uniform distribution on a unit

hypercube the probability of being in a subdomain is equal to

the volume of that subdomain, and the volume V of S( y ) is

given by the right-hand side of the previous equation;

Then we can now compare

for all y

))(( e )( ySVN

n yS ))(( e )( ySV

N

n yS

Page 51: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

51

Choosing L -norm we have the followind definition for the discrepancy

For example in the 1-dimensional case

we have simply

d

1kk

yS

10y

dN y

N

nD

d

)(

],[

)( sup

d

1kk

yS

10y

dN y

N

nD

d

)(

],[

)( sup

10 21 nxxx

n2

1k2x

n2

1D k

n1k

1n

,

)( maxn2

1k2x

n2

1D k

n1k

1n

,

)( max

Discrepancy

Page 52: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

52

We now arrive at the number-theoretical definition of low-discrepancy sequences;

A sequence in [0,1]d is called a low-discrepancy sequence if for all N > 1 the first N points in the sequence satisfy

for some constant c(d) that is only a function of d.

N

NdcD

dd

N

ln)()(

N

NdcD

dd

N

ln)()(

Discrepancy

Page 53: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

53

Halton Sequence

21212020:1 012 /

2012 21202120:2 /

2012 2121212120:3 //

3012 21202021:4 /

3012 2121212021:5 //

32012 2121202121:6 //

32012 212/121212121:7 //

Page 54: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

54

Halton Sequence

Halton sequence can be generated by reflecting the expansion in base b about the decimal point At step j-th write j in base b (with b prime number)

When we “reflect” j about the decimal point we obtain the number of the sequence H(j)

0110 bdbdbdj n

nn

10

21

1

nnnj bdbdbdH

Page 55: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

55

Halton Sequence

The new numbers that are added tend to fill in the gaps in the existing sequence;

Example with b = 2

125.02120202020214

75.0212121213

25.0212020212

5.021211

3214

012

213

01

212

01

11

0

H

H

H

H

Page 56: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

56

VBA code for Halton Sequence

Public Function Halton(n As Integer, _ x As Integer) As Double ' n è il numero da trasformare ' x è la base ' H è il numero generato dall'algoritmo Dim H As Double Dim z As Double Dim m As Integer Dim na As Integer Dim nb As Integer H = 0 na = n z = 1 / x While (na > 0) nb = Int(na / x) m = na - nb * x H = H + m * z na = nb z = z / x Wend Halton = H End Function

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0 0.2 0.4 0.6 0.8 1

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0 0.2 0.4 0.6 0.8 1

Page 57: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

57

Working with VBAWorking with VBA

Generation of

Halton SequenceGeneration of

Halton Sequence

Page 58: European pricing with monte carlo simulation

58

4

Derivatives Pricing Applications

Page 59: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

59

European Pricing with MC

In this case we are interested in computing (or estimating) an Expectation;

The expectation we are interested in is

where B(.) is the numeraire and V(T) the known payoff at maturity.

)(

)()0()0(

TB

TVEBV B

Page 60: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

60

The Workflow of

Monte Carlo Pricing

In applying MC to pricing a European derivative, we face two challenges How do we construct the function V(T)/B(T) from the underlying

process? How do we estimate the expectation efficiently and accurately?

The first item is important because we may not have an analytical formula for V(T)/B(T) as a function of the underlying process;

The second item is important because we must get the answer with known error bounds (if possible!) and within time constraints.

Page 61: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

61

The Workflow of

Monte Carlo Pricing

In computing the distribution of discounted payoff, we must work with processes hat are specified in an appropriate measure;

In its simplest form MC pricing is carried out in the pricing measure used to derive the derivative price;

However since we are interested only in the expectation we do not necessarily have to carry out our simulation in the pricing measure;

We may be able to carry out our simulation in a different measure than the pricing measure, a measure which is more suitable for speed and accuracy;

Page 62: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

62

The Workflow of

Monte Carlo Pricing

The workflow In its simplest form MC pricing works by evaluating the payoff function

repeatedly and taking the average of these evaluation. Each evaluation is called a MC Cicle;

Each evaluation is preceeded by the computation of the underlying asset or process; The underlying price needed to evaluated the payoff function is captured

by the concept of scenario.

Each MC cycle gives us a number which is the realization of a random variable. In some implementation of MC the random variables that get realized at each cycle may not be independent.

The objective of MC in pricing is to infer primarily the mean from the properties of the sample generated by the simulation.

Page 63: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

63

Why Monte Carlo Pricing? In numerical analysis there is an informal concept known as

the curse of dimensionality. This refers to the fact that the computational load (CPU time, memory requirements, etc...) may increase exponentially with the numer of dimensions of the problem;

The computational work needed to estimate the expectation through MC does not depend explicitly on the dimensionality of the problem, this means that there is no curse of dimensionality in MC computation when we are only interested in a simple expectation (this is the case with european derivatives, thinghs are more complicated with early exercise features).

Page 64: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

64

Simulation Efficiency

The efficiency of a simulation refers to the computational cost of achieving a given level of confidence in the quantity we are trying to estimate;

Both te uncentainty in the estimation of the expectation as well as the uncertainty in the error of our estimation depend on the variance of the population from which we sample;

However whatever we do to reduce the variance of the population will most likely tend to increase the computational time per MC cycle;

As a result in order to make a fair comparison between different estimators we must take into account not only their variance but also the computational work for each MC cycle.

Page 65: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

65

Simulation Efficiency

Suppose we want to compute a parameter P, for example the price of a derivative security, and that we have a choice between two types of Monte Carlo estimates which we denote by

Suppose that both are unbiased, so that

but

niP i ,...,1,1̂ niP i ,...,1,2̂

PPE 1̂ PPE 2̂

21

Page 66: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

66

Simulation Efficiency

A sample mean of n replications of P1 gives a more precise estimate of P than does a sample mean of n replications of P2;

This oversimplifies the comparison because it fails to capture possible differences in the computational effort required by the two estimators;

Generating n replications of P1 may be more time-consuming than generating n replications of P2;

Smaller variance is not sufficient grounds for preferring one estimator over another!

Page 67: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

67

Simulation Efficiency

To compare estimators with different computational requirements, we argue as follows;

Suppose the work required to generate one replication of Pj is

a constant, bj (j= 1,2);

With computing time t , the number of replications of Pj that

can be generated is t / bj;

The two estimators available with computing time t are therefore:

1/

1

11 ˆbt

iiP

t

b

2/

1

22 ˆbt

iiP

t

b

Page 68: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

68

Simulation Efficiency For large t these are approximately normally distributed with

mean P and with standard deviations

Thus for large t the first estimator should be preferred over the second if

The important quantity is the product of variance and work per run;

t

b

t

b 22

11

2221

21 bb

Page 69: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

69

Increasing Simulation Efficiency

If we do nothing about efficiency, the number of MC

replications we need to achieve acceptable pricing acccuracy

may be surprisingly large;

As a result in many cases variance reduction techiques are a

practical requirement;

From a general point of view these methods are based on two

principal strategies for reducing variance

Taking advantage of tractable features of a model to adjust or

correct simulation output

Reducing the variability in simulation input

Page 70: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

70

Increasing Simulation Efficiency

The most commonly used strategies for variance reduction are the following Antithetic variates Control variates Importance sampling Stratification Low-discrepancy sequences

Page 71: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

71

Antithetic variates

In this case we construc the estimator by using

two brownian trajectories that are mirror images

of each other;

This causes cancellation of dispersion;

This method tends to reduce the variance

modestly but it is extremely easy to implement

and as a result very commonly used;

Page 72: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

72

Antithetic variates To apply the antithetic variate technique, we generate standard normal

random numbers Z and define two set of samples of the underlying price

Similarly we define two sets of discounted payoff samples

At last we construct our mean estimator by averagin these samples

ZTTreSST

)2/(0

2 )()2/(0

2 ZTTreSST

0,)(max KTSVT

0,)(max KTSVT

n

jjj VV

nV

1 2

11)0(

Page 73: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

73

Antithetic variates

For the antithetic method to work we need V+

and V- to be negatively correlated;

This will happen if the payoff function is a

monotonic function of Z;

Attemps to combine this method with other

methods tipically don’t work well!

Page 74: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

74

Control Variates

The method of “Control Variate” is among the most effective methods of the first kind;

It exploits information about the errors in estimates of known quantities to reduce the error in an estimate of an unknown quantity.

Page 75: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

75

Control Variates

To describe the method, let’s suppose that Y1,….,Yn are outputs fron n

replications of a simulation;

Suppose that the Yi are iid and that our goal is to estimate E[Yi ] , the

usual estimator is the sample mean <Y> = (Y1+…+Yn)/n. This estimator

is umbiased and converges with probability 1 as n →;

Suppose now that on each replication we calculate another output Xi

along with Yi, let te pairs (Xi,Yi) iid and the expectation of Xi be E[X]

(known!); Then we calculate from the i-th replication…

XEXbYbY iii )(

Page 76: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

76

Control Variates … and then compute the sample mean

This is a control variate estimator; The observed error <X>-E[X] serves as a control in estimating E[Y]; The control variate estimator has smaller variance than the standard

estimator if

i

ii XEXbYN

XEXbYbY ][1

][)(

XYYX bb 2

Page 77: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

77

Control Variates

The effectiveness of a control variate is mainly determined by the strength of the correlation between

the quantity of interest, Y, and the control X. Can vary widely with the parameters of a problem!

With a single control variable the optimal coefficient b* is given by

)var(

),cov(*

X

YX

Page 78: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

78

Control Variate

As in all the situations when the parameters determining the result are calculated from the same simulation, this can introduce a bias that is difficult to estimate;

In the limit of very large numbers of iterations this bias vanishes but the main goal of variance reduction techniques is to require fewer simulations;

The efficiency of this method is strongly dependent on the correlation between the variable of which we have to compute the estimator and the control variate itself.

Finding efficient control variate is more an art than a science! In the following slides we give an example of the use of

copula function in finding control variate.

Page 79: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

79

Pricing Rainbow Optionswith Monte Carlo

Rainbow options are extensively used in structured finance equity linked  products, such as Everest, Altiplanos and the like.

Very often Monte Carlo simulation is the only pricing technique available, even though it turns out to be pretty costly and slow, particularly for high dimensional problems.

Copula methods, and particularly Fréchet bounds, provide approximated closed form solutions to the problem.

Page 80: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

80

Copula functions and the pricing of structured financial products

Digital products structured with digital bivariate options: Coupon = 10% if Nasdaq > K1 and Nikkey > K2

Coupon = 10% C(Q(Nasdaq > K1),Q(Nikkey > K2))

Call options on the minimum of a basket of assets (Everest)

dTSQTSQTSQCTtP

TKSSSCall

K NN

N

))((),...)((),)((,

),),,...,(min(

2211

21

Page 81: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

81

Super-replication (lower bound)

With perfect negative dependence we have

with K** defined in such a way that Q1(K**) + Q2(K**) = 1.

So, super-replication requires two call spreads and a debt position

for an amount K**- K.

KKB

KtSCKtSCKtSCKtSC

KKBdSQBdSQBCALL

KK

K

K

K

K

KKMax

**

;,**;,;,**;,

**

2211**

**

22

**

11**

1

1

Page 82: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

82

Super-replication (upper bound)

With perfect positive dependence

with K* such that Q1(K*) = Q2(K*).

Super-replication requires a call spread on the first asset and a call option on the second one

)*,max(;,

;,*;,

2

11*

*],max[

2

*

11* 2

KKtSC

KtSCKtSC

dSQBdSQBCMax

KK

KK

K

K

KK

1

1

Page 83: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

83

The indipendence case

In the independence case

…where numerical integration is required.

K

Ind dSQSQBC 211 2

Page 84: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

84

Fréchet pricing Using the closed form solutions for the extreme dependence cases, we

may come up with an approximated evaluation of a rainbow option with a rank correlation equal to

C = (1 – )Cind + Cmax

Conjecture:

C should be a good control variate for any Monte Carlo Simulation of a two colour Rainbow Option with correlation .

Page 85: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

85

Efficiency of Reduction

In the Money

Rho = 0.25

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4

StandardMonte Carlo

"Fréchet"ReductionVariate

Rho = 0.25

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4

StandardMonte Carlo

"Fréchet"ReductionVariate

Expiration 0.25

Asset 1 110

Asset 2 105

Volatility Asset 1 0.25

Volatility Asset 2 0.25-0.4

Strike 95

Risk Free Rate 0.05

Option DataExpiration 0.25

Asset 1 110

Asset 2 105

Volatility Asset 1 0.25

Volatility Asset 2 0.25-0.4

Strike 95

Risk Free Rate 0.05

Option Data

Page 86: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

86

Efficiency of Reduction

In the Money

Rho = 0.5

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4

Rho = 0.5

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4

Expiration 0.25

Asset 1 110

Asset 2 105

Volatility Asset 1 0.25

Volatility Asset 2 0.25-0.4

Strike 95

Risk Free Rate 0.05

Option DataExpiration 0.25

Asset 1 110

Asset 2 105

Volatility Asset 1 0.25

Volatility Asset 2 0.25-0.4

Strike 95

Risk Free Rate 0.05

Option Data

Page 87: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

87

Efficiency of Reduction

In the Money

Rho = 0.75

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

0.5

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4

Rho = 0.75

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

0.5

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4

Expiration 0.25

Asset 1 110

Asset 2 105

Volatility Asset 1 0.25

Volatility Asset 2 0.25-0.4

Strike 95

Risk Free Rate 0.05

Option DataExpiration 0.25

Asset 1 110

Asset 2 105

Volatility Asset 1 0.25

Volatility Asset 2 0.25-0.4

Strike 95

Risk Free Rate 0.05

Option Data

Page 88: European pricing with monte carlo simulation

FRONTIERS IN FINANCIAL MARKETS MATHEMATICS “Copula Methods in Finance” - Bologna - September, 13-15, 2004

88

Bibliography

U. Cherubini, E. Luciano and W. Vecchiato Copula Methods in Finance, Wiley Finance (2004)

P. Glasserman Monte Carlo Methods in Financial Engineering, Springer (2004)

P. Jackel Monte Carlo Methods in Finance, Wiley Finance (2002)

P. Kloeden, E. Platen and H. Schurz Numerical Solution of SDE through Computer Experiments,

Springer (1994) D. Tavella

Derivatives Pricing, An Introduction to Computational Finance, Wiley Finance (2002)

P. Wilmott Derivatives, Wiley (1998)