MC Asian Engine in QLXL

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

MC Asian Engine in QLXL

Lapin
Hi,

I am writing my own extension of QLAddin but I face an error never faced before while trying to expose the MC engine for Asian options (the native one).

I have added in pricingengine.cpp a function with the following body:

libraryObject_ = boost::shared_ptr<QuantLib::PricingEngine>(new
                          QuantLib::MCDiscreteArithmeticAPEngine<QuantLib::PseudoRandom>                                        (process,                 maxTimeStepsPerYear,
                                            brownianBridge,
                                                    antitheticVariate, controlVariate,
                                            requiredSamples, requiredTolerance,
                                           maxSamples, isBiased, seed));

Why compiling I get the quantLib error (not QLAddin error):

2>../QuantLib\ql/pricingengines/asian/mc_discr_arith_av_price.hpp(77) : error C2989: 'QuantLib::MCDiscreteArithmeticAPEngine' : class template has already been declared as a non-class template
2>        .\qlo/pricingengines.hpp(62) : see declaration of 'QuantLib::MCDiscreteArithmeticAPEngine'

I am struggling to see where it goes wrong. Even if I use MakeMCDiscreteArithmeticAPEngine, the error remains the same.

Any ideas?

Cheers
Reply | Threaded
Open this post in threaded view
|

Re: MC Asian Engine in QLXL

Luigi Ballabio
On Thu, 2009-11-12 at 03:51 -0800, Yomi wrote:
> error C2989: 'QuantLib::MCDiscreteArithmeticAPEngine' : class template has
> already been declared as a non-class template
> 2>        .\qlo/pricingengines.hpp(62) : see declaration of
> 'QuantLib::MCDiscreteArithmeticAPEngine'

It's telling you that you somewhat redeclared
QuantLib::MCDiscreteArithmeticAPEngine in qlo/pricingengines.hpp at line
62.  What's there?

Luigi



--

Poets have been mysteriously silent on the subject of cheese.
-- Gilbert K. Chesterton



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: MC Asian Engine in QLXL

Lapin
Thansk Luigi,

Time for me to change my glasses or go in holidays...

That was a bumb question.
Thanks for looking at it.

Luigi Ballabio wrote
On Thu, 2009-11-12 at 03:51 -0800, Yomi wrote:
> error C2989: 'QuantLib::MCDiscreteArithmeticAPEngine' : class template has
> already been declared as a non-class template
> 2>        .\qlo/pricingengines.hpp(62) : see declaration of
> 'QuantLib::MCDiscreteArithmeticAPEngine'

It's telling you that you somewhat redeclared
QuantLib::MCDiscreteArithmeticAPEngine in qlo/pricingengines.hpp at line
62.  What's there?

Luigi



--

Poets have been mysteriously silent on the subject of cheese.
-- Gilbert K. Chesterton



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
QuantLib-users mailing list
QuantLib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/quantlib-users