RE: bugs in quantlib in bootstrap and Cumulative NormalDistribution

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

RE: bugs in quantlib in bootstrap and Cumulative NormalDistribution

Vadim Ogranovich-3
Just verified that it is initialized correctly by gcc.3.0.4 on Red Hat

> Bug2: Europeanoption pricing on Unix:
> On windows the example Europeanoption gives:
> Method          Value   EstimatedError  Discrepancy     Rel. Discr.
> Black Scholes   5.8308  0.0000          0.000000        0.000000
> Call-Put parity 5.8308  N/A             4.44089e-15     0.000000
>
> Now on unix the same EuropeanOption gives:
>
> Method          Value   EstimatedError  Discrepancy     Rel. Discr.
> Black Scholes   3.2422  0.0000          0.000000        0.000000
> Call-Put parity 3.2422  N/A             0       0.000000
>
> You see that the result is not the same.
> We check the code and found that in "europeanoption.hpp" the following
> const static member is declared:
>
>    static const Math::CumulativeNormalDistribution f_;
>
> This variable "f_" is never explicitly initialized, thus it
> is up to the
> compilor
> to decide what to do when it is first used.
>
> In VC++, "f_" is initialized through its' only construtor, and "sigma"
> value is set to "1".
> However, with gcc under UNIX, "f_" has not gone through any
> constructor,
> and "sigma" value
> is set to "0".  So, the difference caused the error output on UNIX.

--------------------------------------------------
DISCLAIMER
This e-mail, and any attachments thereto, is intended only for use by the
addressee(s) named herein and may contain legally privileged and/or
confidential information.  If you are not the intended recipient of this
e-mail, you are hereby notified that any dissemination, distribution or
copying of this e-mail, and any attachments thereto, is strictly prohibited.
If you have received this e-mail in error, please immediately notify me and
permanently delete the original and any copy of any e-mail and any printout
thereof.

E-mail transmission cannot be guaranteed to be secure or error-free.  The
sender therefore does not accept liability for any errors or omissions in
the contents of this message which arise as a result of e-mail transmission.

NOTICE REGARDING PRIVACY AND CONFIDENTIALITY

Knight Trading Group may, at its discretion, monitor and review the content
of all e-mail communications.



Reply | Threaded
Open this post in threaded view
|

Re: bugs in quantlib in bootstrap and Cumulative NormalDistribution

enrico.sirola
>>>>> "Vadim" == Vadim Ogranovich <[hidden email]> writes:

    Vadim> Just verified that it is initialized correctly by gcc.3.0.4
    Vadim> on Red Hat

the same here on FreeBSD 4.6.2/g++ 3.1.1 (2002-07-26 snapshot)
bye,
Enrico
--
Enrico Sirola <[hidden email]>
gpg public key available from wwwkeys.pgp.net
Key fingerprint = B446 7332 ED55 BC68 5FE8  DE0F 98DF EC86 377F E07F