[Date Index] [Thread Index] [Author Index]
Re: How to sample a 2-dim. r.v. with known density function?
"KvS" <keesvanschaik at gmail.com> wrote in message news:dvrbl7$a1l$1 at smc.vnet.net... > Hi all, > > I guess the title explains it already, I have a 2-dim. density function > (the joint density of a geometric Brownian motion with drift and its > running maximum to be more precise, explicit formula can e.g. be found > here: www.maths.ox.ac.uk/~hambly/PDF/O10/lecture15.pdf) and now I would > like to generate random pairs according to this density. I'm not even > sure whether a general method for doing this exists, is anybody > familiar with a method that I can either implement myself in > Mathematica or built-in stuff that can be used to do this? I don't know a direct way to do this. But an indirect fast and simple way, over some ultimate horizon T, is simply to use the Euler scheme to simulate the geometric Brownian motion (GBM). For example, if S(t) follows GBM, then iterate S(t+ dt) = S(t) (1 + a dt + b Z(t) Sqrt[dt]), where Z(t) are standard normal draws and dt is a fine enough time increment. At each step, update M(t), the running maximum so far. At the last step (S(T),M(T)) will be a random sample from the joint density you want. regards, alan