QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
MoroInverseCumulativeNormal Class Reference

Moro Inverse cumulative normal distribution class. More...

#include <normaldistribution.hpp>

+ Collaboration diagram for MoroInverseCumulativeNormal:

Public Member Functions

 MoroInverseCumulativeNormal (Real average=0.0, Real sigma=1.0)
 
Real operator() (Real x) const
 

Private Attributes

Real average_
 
Real sigma_
 

Static Private Attributes

static const Real a0_ = 2.50662823884
 
static const Real a1_ =-18.61500062529
 
static const Real a2_ = 41.39119773534
 
static const Real a3_ =-25.44106049637
 
static const Real b0_ = -8.47351093090
 
static const Real b1_ = 23.08336743743
 
static const Real b2_ =-21.06224101826
 
static const Real b3_ = 3.13082909833
 
static const Real c0_ = 0.3374754822726147
 
static const Real c1_ = 0.9761690190917186
 
static const Real c2_ = 0.1607979714918209
 
static const Real c3_ = 0.0276438810333863
 
static const Real c4_ = 0.0038405729373609
 
static const Real c5_ = 0.0003951896511919
 
static const Real c6_ = 0.0000321767881768
 
static const Real c7_ = 0.0000002888167364
 
static const Real c8_ = 0.0000003960315187
 

Detailed Description

Moro Inverse cumulative normal distribution class.

Given x between zero and one as the integral value of a gaussian normal distribution this class provides the value y such that formula here ...

It uses Beasly and Springer approximation, with an improved approximation for the tails. See Boris Moro, "The Full Monte", 1995, Risk Magazine.

This class can also be used to generate a gaussian normal distribution from a uniform distribution. This is especially useful when a gaussian normal distribution is generated from a low discrepancy uniform distribution: in this case the traditional Box-Muller approach and its variants would not preserve the sequence's low-discrepancy.

Peter J. Acklam's approximation is better and is available as QuantLib::InverseCumulativeNormal

Definition at line 198 of file normaldistribution.hpp.

Constructor & Destructor Documentation

◆ MoroInverseCumulativeNormal()

MoroInverseCumulativeNormal ( Real  average = 0.0,
Real  sigma = 1.0 
)

Definition at line 310 of file normaldistribution.hpp.

Member Function Documentation

◆ operator()()

Real operator() ( Real  x) const

Definition at line 140 of file normaldistribution.cpp.

Member Data Documentation

◆ average_

Real average_
private

Definition at line 205 of file normaldistribution.hpp.

◆ sigma_

Real sigma_
private

Definition at line 205 of file normaldistribution.hpp.

◆ a0_

const Real a0_ = 2.50662823884
staticprivate

Definition at line 206 of file normaldistribution.hpp.

◆ a1_

const Real a1_ =-18.61500062529
staticprivate

Definition at line 207 of file normaldistribution.hpp.

◆ a2_

const Real a2_ = 41.39119773534
staticprivate

Definition at line 208 of file normaldistribution.hpp.

◆ a3_

const Real a3_ =-25.44106049637
staticprivate

Definition at line 209 of file normaldistribution.hpp.

◆ b0_

const Real b0_ = -8.47351093090
staticprivate

Definition at line 210 of file normaldistribution.hpp.

◆ b1_

const Real b1_ = 23.08336743743
staticprivate

Definition at line 211 of file normaldistribution.hpp.

◆ b2_

const Real b2_ =-21.06224101826
staticprivate

Definition at line 212 of file normaldistribution.hpp.

◆ b3_

const Real b3_ = 3.13082909833
staticprivate

Definition at line 213 of file normaldistribution.hpp.

◆ c0_

const Real c0_ = 0.3374754822726147
staticprivate

Definition at line 214 of file normaldistribution.hpp.

◆ c1_

const Real c1_ = 0.9761690190917186
staticprivate

Definition at line 215 of file normaldistribution.hpp.

◆ c2_

const Real c2_ = 0.1607979714918209
staticprivate

Definition at line 216 of file normaldistribution.hpp.

◆ c3_

const Real c3_ = 0.0276438810333863
staticprivate

Definition at line 217 of file normaldistribution.hpp.

◆ c4_

const Real c4_ = 0.0038405729373609
staticprivate

Definition at line 218 of file normaldistribution.hpp.

◆ c5_

const Real c5_ = 0.0003951896511919
staticprivate

Definition at line 219 of file normaldistribution.hpp.

◆ c6_

const Real c6_ = 0.0000321767881768
staticprivate

Definition at line 220 of file normaldistribution.hpp.

◆ c7_

const Real c7_ = 0.0000002888167364
staticprivate

Definition at line 221 of file normaldistribution.hpp.

◆ c8_

const Real c8_ = 0.0000003960315187
staticprivate

Definition at line 222 of file normaldistribution.hpp.