Login  Register

Re: [Quantlib-dev] Random Numbers

Posted by Luigi Ballabio on Sep 16, 2010; 9:27am
URL: http://quantlib.414.s1.nabble.com/Random-Numbers-tp591p592.html

On Thu, 2010-09-16 at 13:19 +0530, animesh saxena wrote:
> What is the method used for Random number generation in QuantLib for
> Monte Carlo Simulations (for instance Heston Model)?
> Is it Mersene Twister or something else?

It depends on the traits you choose when you instantiate the engine.
For the PseudoRandom traits, it's Mersenne Twister.  For LowDiscrepancy,
it's Sobol.  If you want something else, you can make a new traits class
and use that one; look at <ql/math/randomnumbers/rngtraits.hpp> and
<ql/methods/montecarlo/mctraits.hpp> for examples and details.

Luigi


--

standards, n.:
The principles we use to reject other people's code.



------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users