The OpenD Programming Language

cornishFisherInvCDF

Approximates the inverse CDF of a continuous distribution using the Cornish-Fisher expansion.

It is generally recommended to only use the Cornish-Fisher expansion with distributions that are similar to the normal distribution. Extreme values of skewness or excessKurtosis can result in poorer approximations.

  1. T cornishFisherInvCDF(T p, T mu, T std, T skewness, T excessKurtosis)
    T
    cornishFisherInvCDF
    (
    T
    )
    (
    const T p
    ,
    const T mu
    ,
    const T std
    ,
    const T skewness
    ,)
    if (
    isFloatingPoint!T
    )
  2. T cornishFisherInvCDF(T p, T skewness, T excessKurtosis)

Parameters

p T

quantile to calculate inverse CDF

mu T

mean

std T

standard deviation

skewness T

skewness

excessKurtosis T

excess kurtosis (kurtosis - 3)

Examples

import mir.test: shouldApprox;

0.99.cornishFisherInvCDF(0, 1, 0.1, 1).shouldApprox == 2.629904;
0.99.cornishFisherInvCDF(0.1, 0.2, 0.1, 1).shouldApprox == 0.6259808;

See Also

Meta