MATLAB: How to calculate the inverse cumulative density function of a Gaussian mixture with Statistical Toolbox

Statistics and Machine Learning Toolbox

I was using Statistical Toolbox for financial modelling (copula model with normal mixture and/or non normal mixture marginals to simulate risk for a portfolio) which requires the calculation of the inverse cumulative density function of a Gaussian mixture. This function is not readily available in the toolbox.

Best Answer

Assuming that a univariate mixture of Gaussians is required (otherwise the inverse cumulative density function (CDF) does not exist), compute the CDF over a grid of, say, 1000 values, and compute the inverse CDF by reverse interpolation.
There is an example of this idea in the demo "Nonparametric Estimates of Cumulative Distribution Functions and Their Inverses" that ships with Statistics Toolbox, but which is not in the web documentation yet. That demo does this in a slightly different context, but the idea carries over.