Login  Register

Re: juquadraticengine errors

Posted by Luigi Ballabio on Nov 29, 2013; 9:26am
URL: http://quantlib.414.s1.nabble.com/juquadraticengine-errors-tp14681p14682.html

Hi Fabien,
    thanks for the heads-up. Do you have a patch for the code?

Luigi

On Thu, Nov 28, 2013 at 3:50 PM, Fabien Le Floc'h <[hidden email]> wrote:

> 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
>



--
<https://implementingquantlib.blogspot.com>
<https://twitter.com/lballabio>

------------------------------------------------------------------------------
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