| Author |
Comment/Response |
AJM
|
11/29/07 3:18pm
Hi,
How can I most efficiently create correlated geometric brownian motions?
For a single GBM, I have
GBM[n_, x0_, myy_, sigma_, dt_] :=
NestList[(#*Exp[(myy - sigma^2/2)*dt + sigma*Random[NormalDistribution[0, 1]]*Sqrt[dt]]) &, x0, n];
But what about if my two processes are correlated?
I guess I first need to create a set of correlated random numbers (e.g. applying cholesky decomposition to covariance matrix and then creating the correlated numbers, n for each process), but how then most efficiently create the corresponding realisations of the correlated stochastic processes (the paths)? I don't really see how to use NestList here.
For example if I want to create 3 correlated GBM processes, how to do it most quickly and efficiently using the functional programming capabilities of Mathematica? My processes will have different parameters, of course.
URL: , |
|