Login  Register

Re: Kooql

Posted by Kakhkhor Abdijalilov on Aug 10, 2010; 5:50pm
URL: http://quantlib.414.s1.nabble.com/Kooql-tp7085p7090.html

Dear Sergei,
Thank you for the very illuminating article. Indeed, after reading
some MC book I was under the impression that LD sequences loose their
advantage in higher dimensions. I see now, that is not the case.

Btw, does anyone use Ziggurat method? It generates Gaussian variates
directly from uniform integers and avoids using inverse CDF. In my
tests with of Asian option pricing engines Ziggurat run about 40%
faster compared to the inverse CDF method. In those tests I used GBM
with exact sampling, and thus needed to take exp or log at every time
step. If Euler is used (when exact sampling is not possible), Ziggurat
may fair even better (no need to take exp or log at every time step).
In models with simple approximation schemes such as Euler, the overall
weight of CDF inversion in the total work could be significant.

Ziggurat method should be good on GPU as well, because it needs only 1
floating point multiplication to convert a random int into a standard
Gaussian variate. This leaves less room for numerical errors
associated with single precision numbers.

Ziggurat is an acceptance/rejection method and theoretically it
shouldn't be used  with low discrepancy sequences. But the rejection
probability is very small and in about 99% cases Ziggurat simply
multiplies random ints by normalization factors from the lookup table.
This way LD property should be mostly preserved. But empirical tests
are needed to see how good it is. I have c++ implementation of
Ziggurat/Sobol normal variate generator. If anyone wants to try it
out, PM me.

I also implemented re-entrant multithreaded Sobol generator using Joe
and Kuo direction integers with max dimension 21201. Re-entrant means
that it can be used simultaneously by many threads. It works with
OpenMP as well. The synchronization is done internally using atomic
operations and hidden from the user. It is as fast as QuantLib's
implementation and has virtually zero synchronization overhead. If
anyone wants to try it out, please PM me.

Regards,
Kakhkhor Abdijalilov.

------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users