This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Copyright c 2007 by Karl Sigman 1 Simulating normal (Gaussian) rvs with applications to simu lating Brownian motion and geometric Brownian motion in one and two dimensions Fundamental to many applications in financial engineering is the normal (Gaussian) distribu tion. It is the building block for simulating such basic stochastic processes as Brownian motion and geometric Brownian motion. In this section, we will go over algorithms for generating univariate normal rvs and learn how to use such algorithms for constructing sample paths of Brownian motion and geometric Brownian motion, in both one and two dimensions, at a desired sequence of times t 1 < t 2 < < t k . 1.1 Generating a univariate normal random variable We focus here on the generation of a rv Z N (0 , 1) for we can always then transform it into an X N ( , 2 ) via X = Z + . For example, if { B ( t ) : t } denotes a standard Brownian motion (BM), then for any fixed t > 0, B ( t ) N (0 ,t ) can be constructed via B ( t ) = tZ . If it is desired to simulate the pair ( B ( t 1 ) ,B ( t 2 )) where 0 < t 1 < t 2 , then we can use the recursion B ( t 2 ) = B ( t 1 )+ B ( t 2 ) B ( t 1 ) and the basic stationary and independent increments properties of BM: Generate two iid N (0 , 1) rvs, Z 1 ,Z 2 and set B ( t 1 ) = t 1 Z 1 , B ( t 2 ) = t 1 Z 1 + t 2 t 1 Z 2 . The point is that B ( t 1 ) N (0 ,t 1 ), and independently B ( t 2 ) B ( t 1 ) N (0 ,t 2 t 1 ). This method extends in the obvious fashion to the generation of the k dimensional multivariate normal vector ( B ( t 1 ) ,B ( t 2 ) ,...,B ( t k )), in which 0 < t 1 < t 2 < < t k , k 2. N (0 , 1) density and cdf The density of Z is given by f ( x ) = 1 2 e x 2 2 , x R , and the cdf by ( x ) = P ( Z x ) = 1 2 Z x e y 2 2 dy, x R . Using the inverse transform method is not possible here since we do not have an explicit closed formula for  1 ( y ). One could of course approximate this inverse function by some closed form function and then use that, and there are some algorithms in the literature for doing that. But it is possible to exactly generate a Z N (0 , 1) using alternative (clever) algorithms, so that is what we will do. Acceptance rejection algorithm for Z Recall from our lecture on the acceptance rejection method that we already have an algorithm for generating a rv Z N (0 , 1): Algorithm for generating Z N (0 , 1) via the acceptance rejection method 1. Generate two independent exponentials at rate 1; Y 1 = ln( U 1 ) and Y 2 = ln( U 2 ). 1 2. If Y 2 ( Y 1 1) 2 / 2, set  Z  = Y 1 ; otherwise go back to 1. 3. Generate U . Set Z =  Z  if U . 5, set Z = Z  if U > . 5....
View Full
Document
 Fall '07
 sigman

Click to edit the document details