The OpenD Programming Language

cornishFisherInvCDF

Ditto, but assumes mu = 0 and std = 1

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

Parameters

p T

quantile to calculate inverse CDF

skewness T

skewness (default = 0)

excessKurtosis T

excess kurtosis (kurtosis - 3) (default = 0)

Examples

import mir.test: shouldApprox;

0.5.cornishFisherInvCDF.shouldApprox == 0;
0.5.cornishFisherInvCDF(1).shouldApprox == -0.1666667;
0.5.cornishFisherInvCDF(-1, 0).shouldApprox == 0.1666667;

0.9.cornishFisherInvCDF(0.1, 0).shouldApprox == 1.292868;
0.9.cornishFisherInvCDF(0.1, 1).shouldApprox ==  1.220374;
0.9.cornishFisherInvCDF(0.1, -1).shouldApprox == 1.365363;

0.99.cornishFisherInvCDF(0.1, 0).shouldApprox == 2.396116;
0.99.cornishFisherInvCDF(0.1, 1).shouldApprox == 2.629904;
0.99.cornishFisherInvCDF(0.1, -1).shouldApprox == 2.162328;

0.01.cornishFisherInvCDF(0.1, 0).shouldApprox == -2.249053  ;
0.01.cornishFisherInvCDF(0.1, 1).shouldApprox == -2.482841;
0.01.cornishFisherInvCDF(0.1, -1).shouldApprox == -2.015265;

Meta