Login  Register

Re: GJR-GARCH option pricing engine

Posted by Chris Kenyon-2 on Mar 28, 2008; 11:48am
URL: http://quantlib.414.s1.nabble.com/GJR-GARCH-option-pricing-engine-tp11799p11800.html


Hi,

re:
"
    I can speed it up quite a bit if I can re-use some
intermediate results when some parameters are the
same. But this requires me to introduce some data
members to AnalyticGJRGARCHengine and assign values to
them during calculate(). But calculate() is a const
function, so I can't really do that. What do you think
I should do?
"

If you need some local data, then declare it mutable (=never const),
this overrides the const in calculate().  Use with care:
http://www.highprogrammer.com/alan/rants/mutable.html
This is done elsewhere in QL.

Regards,
Chris

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev