Cumulative bivariate normal distibution function (West 2004)
The implementation derives from the article "Better
Approximations To Cumulative Normal Distibutions", Graeme
West, Dec 2004 available at www.finmod.co.za. Also available
in Wilmott Magazine, 2005, (May), 70-76, The main code is a
port of the C++ code at www.finmod.co.za/cumfunctions.zip.
The algorithm is based on the near double-precision algorithm
described in "Numerical Computation of Rectangular Bivariate
an Trivariate Normal and t Probabilities", Genz (2004),
Statistics and Computing 14, 151-160. (available at
www.sci.wsu.edu/math/faculty/henz/homepage)
The QuantLib implementation mainly differs from the original
code in two regards;
The implementation of the cumulative normal distribution is
CumulativeNormalDistribution
The arrays XX and W are zero-based
test
the correctness of the returned value is tested by
checking it against known good results.
The implementation is described at section 2.4 "Hybrid
Numerical Integration Algorithms" of "Numerical Computation
of Rectangular Bivariate an Trivariate Normal and t
Probabilities", Genz (2004), Statistics and Computing 14,
151-160. (available at http://www.sci.wsu.edu/math/faculty/henz/homepage)
The Gauss-Legendre quadrature have been extracted to
TabulatedGaussLegendre (x,w zero-based)
Tthe functions ot be integrated numerically have been moved
to classes eqn3 and eqn6
Cumulative bivariate normal distibution function (West 2004)
The implementation derives from the article "Better Approximations To Cumulative Normal Distibutions", Graeme West, Dec 2004 available at www.finmod.co.za. Also available in Wilmott Magazine, 2005, (May), 70-76, The main code is a port of the C++ code at www.finmod.co.za/cumfunctions.zip.
The algorithm is based on the near double-precision algorithm described in "Numerical Computation of Rectangular Bivariate an Trivariate Normal and t Probabilities", Genz (2004), Statistics and Computing 14, 151-160. (available at www.sci.wsu.edu/math/faculty/henz/homepage)
The QuantLib implementation mainly differs from the original code in two regards;
the correctness of the returned value is tested by checking it against known good results.