Posted by
animesh on
Sep 16, 2010; 9:55am
URL: http://quantlib.414.s1.nabble.com/Random-Numbers-tp9186p9188.html
Hi Luigi,
Thanks for your mail. I think I might have tried Mersenne twister
(from sample code), coz the sequence gave my code convergence issues. I
initially went with my own implementation of Halton sequence to improve
the convergence, but well Sobol is much much better :)
I had used Cholesky decomposition for generating correlated random
numbers. Using some of the code from QuantLib I am able to generate an N
dimension array. If I have this huge array I can use it for pricing
almost any exotic (by repeating the simulations). All that changes is
the payoff function. For instance Heston model combined with Path
generation can be used for pricing almost any exotic structure (well
majority of them). I still am trying to think of how to make the payoff
specification generic.
So is it possible to have a generic pricer in QuantLib which will allow
the user to specify a PayOff function using the multi path generated
above? I think it can be pretty useful. Coz currently as you mentioned
we have Engines tightly coupled with Exotic Options and Processes.
Let me know your views on that.
Thanks,
Animesh
On 9/16/10 2:57 PM, Luigi Ballabio wrote:
> 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
>
>
--
Regards,
Animesh Saxena
(
http://quantanalysis.wordpress.com)
Ph: (+91)9920098221
------------------------------------------------------------------------------
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-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev