Hi Mariano,Try replacing RandomSequenceGenerator<MersenneTwisterUniformRng> with either PseudoRandom or PoissonPseudoRandom for normally or exponentially distributed random number generator. Both use MersenneTwisterUniformRng since they are defined as follows:typedef GenericPseudoRandom<MersenneTwisterUniformRng, InverseCumulativeNormal> PseudoRandom; typedef GenericPseudoRandom<MersenneTwisterUniformRng, InverseCumulativePoisson> PoissonPseudoRandom; RegardsYannisMariano Zeron <[hidden email]> schrieb am 9:35 Sonntag, 22.Januar 2017:
Hi,
I'm interested in pricing a barrier option not using an analytic solution,
for example through a Monte Carlo simulation. I found MCBarrierEngine but so
far I have had problems using it.
I seem to have a problem passing the right template argument list. I tried
boost::shared_ptr<PricingEngine> barrierEngineMC(
new MCBarrierEngine<RandomSequenceGenerator< MersenneTwisterUniformRng>,
GeneralStatistics>(bsmProcess, timeSteps, 24, true, true, nSamples,
0.000001, nSamples + 10000, false, 42));
There are quite a few errors all of them related to the use of
RandomSequenceGenerator<MersenneTwisterUniformRng>
for example (I can pass all if needed):
'rsg_type' : is not a member of
'QuantLib::RandomSequenceGenerator< QuantLib:: MersenneTwisterUniformRng>'
What is the right way of using this engine? As a side question but directly
related to what I need, can this engine be used to price single barrier
options (which I can price using the analytic pricer) or is this engine
restricted to more exotic barriers?
Thanks in advance!
Mariano
--
View this message in context: http://quantlib.10058.n7.nabble.com/Barrier-options- tp17983.html
Sent from the quantlib-users mailing list archive at Nabble.com.
------------------------------------------------------------ ------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
------------------------------------------------------------ ------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
If you reply to this email, your message will be added to the discussion below:http://quantlib.10058.n7.nabble.com/Barrier-options- tp17983p17984.html
Free forum by Nabble | Disable Popup Ads | Edit this page |