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

Inverse cumulative normal distribution function. More...

#include <normaldistribution.hpp>

+ Collaboration diagram for InverseCumulativeNormal:

Public Member Functions

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

Static Public Member Functions

static Real standard_value (Real x)
 

Static Private Member Functions

static Real tail_value (Real x)
 

Private Attributes

Real average_
 
Real sigma_
 

Static Private Attributes

static const CumulativeNormalDistribution f_
 
static const Real a1_ = -3.969683028665376e+01
 
static const Real a2_ = 2.209460984245205e+02
 
static const Real a3_ = -2.759285104469687e+02
 
static const Real a4_ = 1.383577518672690e+02
 
static const Real a5_ = -3.066479806614716e+01
 
static const Real a6_ = 2.506628277459239e+00
 
static const Real b1_ = -5.447609879822406e+01
 
static const Real b2_ = 1.615858368580409e+02
 
static const Real b3_ = -1.556989798598866e+02
 
static const Real b4_ = 6.680131188771972e+01
 
static const Real b5_ = -1.328068155288572e+01
 
static const Real c1_ = -7.784894002430293e-03
 
static const Real c2_ = -3.223964580411365e-01
 
static const Real c3_ = -2.400758277161838e+00
 
static const Real c4_ = -2.549732539343734e+00
 
static const Real c5_ = 4.374664141464968e+00
 
static const Real c6_ = 2.938163982698783e+00
 
static const Real d1_ = 7.784695709041462e-03
 
static const Real d2_ = 3.224671290700398e-01
 
static const Real d3_ = 2.445134137142996e+00
 
static const Real d4_ = 3.754408661907416e+00
 
static const Real x_low_ = 0.02425
 
static const Real x_high_ = 1.0 - x_low_
 

Detailed Description

Inverse cumulative normal distribution function.

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 use Acklam's approximation: by Peter J. Acklam, University of Oslo, Statistics Division. URL: http://home.online.no/~pjacklam/notes/invnorm/index.html

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.

Definition at line 100 of file normaldistribution.hpp.

Constructor & Destructor Documentation

◆ InverseCumulativeNormal()

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

Definition at line 301 of file normaldistribution.hpp.

Member Function Documentation

◆ operator()()

Real operator() ( Real  x) const

Definition at line 105 of file normaldistribution.hpp.

+ Here is the call graph for this function:

◆ standard_value()

static Real standard_value ( Real  x)
static

Definition at line 113 of file normaldistribution.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tail_value()

Real tail_value ( Real  x)
staticprivate

Definition at line 91 of file normaldistribution.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ f_

const CumulativeNormalDistribution f_
staticprivate

Definition at line 147 of file normaldistribution.hpp.

◆ average_

Real average_
private

Definition at line 149 of file normaldistribution.hpp.

◆ sigma_

Real sigma_
private

Definition at line 149 of file normaldistribution.hpp.

◆ a1_

const Real a1_ = -3.969683028665376e+01
staticprivate

Definition at line 150 of file normaldistribution.hpp.

◆ a2_

const Real a2_ = 2.209460984245205e+02
staticprivate

Definition at line 151 of file normaldistribution.hpp.

◆ a3_

const Real a3_ = -2.759285104469687e+02
staticprivate

Definition at line 152 of file normaldistribution.hpp.

◆ a4_

const Real a4_ = 1.383577518672690e+02
staticprivate

Definition at line 153 of file normaldistribution.hpp.

◆ a5_

const Real a5_ = -3.066479806614716e+01
staticprivate

Definition at line 154 of file normaldistribution.hpp.

◆ a6_

const Real a6_ = 2.506628277459239e+00
staticprivate

Definition at line 155 of file normaldistribution.hpp.

◆ b1_

const Real b1_ = -5.447609879822406e+01
staticprivate

Definition at line 156 of file normaldistribution.hpp.

◆ b2_

const Real b2_ = 1.615858368580409e+02
staticprivate

Definition at line 157 of file normaldistribution.hpp.

◆ b3_

const Real b3_ = -1.556989798598866e+02
staticprivate

Definition at line 158 of file normaldistribution.hpp.

◆ b4_

const Real b4_ = 6.680131188771972e+01
staticprivate

Definition at line 159 of file normaldistribution.hpp.

◆ b5_

const Real b5_ = -1.328068155288572e+01
staticprivate

Definition at line 160 of file normaldistribution.hpp.

◆ c1_

const Real c1_ = -7.784894002430293e-03
staticprivate

Definition at line 161 of file normaldistribution.hpp.

◆ c2_

const Real c2_ = -3.223964580411365e-01
staticprivate

Definition at line 162 of file normaldistribution.hpp.

◆ c3_

const Real c3_ = -2.400758277161838e+00
staticprivate

Definition at line 163 of file normaldistribution.hpp.

◆ c4_

const Real c4_ = -2.549732539343734e+00
staticprivate

Definition at line 164 of file normaldistribution.hpp.

◆ c5_

const Real c5_ = 4.374664141464968e+00
staticprivate

Definition at line 165 of file normaldistribution.hpp.

◆ c6_

const Real c6_ = 2.938163982698783e+00
staticprivate

Definition at line 166 of file normaldistribution.hpp.

◆ d1_

const Real d1_ = 7.784695709041462e-03
staticprivate

Definition at line 167 of file normaldistribution.hpp.

◆ d2_

const Real d2_ = 3.224671290700398e-01
staticprivate

Definition at line 168 of file normaldistribution.hpp.

◆ d3_

const Real d3_ = 2.445134137142996e+00
staticprivate

Definition at line 169 of file normaldistribution.hpp.

◆ d4_

const Real d4_ = 3.754408661907416e+00
staticprivate

Definition at line 170 of file normaldistribution.hpp.

◆ x_low_

const Real x_low_ = 0.02425
staticprivate

Definition at line 171 of file normaldistribution.hpp.

◆ x_high_

const Real x_high_ = 1.0 - x_low_
staticprivate

Definition at line 172 of file normaldistribution.hpp.