Halton sequence with QuantLib

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Halton sequence with QuantLib

Carlo Vicentini
Hello,
 
I would like to read your comments on some code I have written with QuantLib in mind. It deals with the Halton sequence and it is attached to this message.
 
I think the main problem with quasi-random numbers is how to take account of dimensionality, given a general Monte Carlo framework which does not (at least for the moment). I mean, different time steps should use Halton numbers generated from different "dimensions".
 
One way would be to use the parameter "seed" as a "proxy" for the dimension (this is the approach I followed). Another approach would be to modify the class interface so as to directly take account of the dimension.
 
In the attached files, "HaltonLds.*" contains the generator, and "qmceuropean.*" is a pricer adapted from "mceuropean"; "rngtypedefs.hpp" contains just a couple of new lines, and "qmcEuropeanOption.cpp" is an example adapted from "EuropeanOption.cpp".
 
I haven't tested the implementation thoroughly, yet, but at least the european option example seems to be correct.

Please tell me if I am missing something.
 
Regards,
 
Carlo Vicentini

halton.zip (6K) Download Attachment