Re: Question about Random Sequence

Posted by Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/Question-about-Random-Sequence-tp9797p9798.html

On Thu, 2007-09-20 at 05:36 -0500, Young Cho wrote:

> What I'm trying to do is switching a random sequence.
> =======================================================
> mcengine1 =
>             MakeMCEuropeanEngine<PseudoRandom>().withSteps(timeSteps)
>             .withSamples(1000).withSeed(mcSeed);
> =======================================================
> What this is using is PseudoRandom which is an Uniform Random
> sequence.
> I would like to use Normal Random Sequence using the Box-Muller method
> already implemented in ql.

Young,
        the MC engine is already using a Normal random sequence. The
PseudoRandom class specifies both the basic uniform generator and the
method to use for turning it into a normal generator (which by default
is the inverse-cumulative method---it is faster than Box-Muller and at
least as accurate.)

Luigi


--

Better to remain silent and be thought a fool than to speak out and
remove all doubt.
-- Abraham Lincoln



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev