quantile to calculate inverse CDF
mean
standard deviation
skewness
excess kurtosis (kurtosis - 3)
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;
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.