juquadraticengine errors
Posted by
Fabien Le Floc'h on
Nov 28, 2013; 2:50pm
URL: http://quantlib.414.s1.nabble.com/juquadraticengine-errors-tp14681.html
Hello,
I noticed a few errors in juquadraticengine.cpp regarding the greeks:
- the delta and gamma should be computed differently if the option is exercised early (a special case just like the results._value case).
- the delta formula is wrong (the paper formula is wrong as well), it needs to use d1(S) and not d1(S*) (called d1_Sk in quantlib).
- the gamma formula is wrong for the same reasons. And there is an additional coding error, the term '+ lambda * (1 - lambda) / (spot * spot * (1 - chi)))' should be ' + lambda * (lambda-1) / (spot * spot * (1 - chi)))' according to the paper.
It can be easily verified numerically that the greeks obtained by the current code are completely nonsensical. After those fixes, they are good (see attached doc).
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users