This error is caused by limitations on the numerical maximum likelihood. The warning message suggests that the segments of the data to which the GARCH model is fit are getting stuck at suboptimal, local maxima, which drives the ARCH coefficient (and in turn the model parameter Q) to zero. Because Q becomes zero, there is no way for the observed data to affect its own volatility (which is the point of GARCH models), and MATLAB returns an error.
There are three things to check if you are running to similar issues:
1. Make sure that the data itself is well-suited for GARCH analysis.
2. Try switching to a different solver. The FMINCON function uses one of four algorithms to do its job ('sqp', 'interior-point', 'active-set', 'trust-region-reflective'). You can set the solver algorithm by the following syntax:
model = garch(1,1);
ret = your_data;
opts = optimset('fmincon');
opts.Algorithm = 'interior-point';
fit = estimate(model, ret, 'options',opts);
For more information on the FMINCON function and its different options for the 'Algorithm' option, please refer to the following documentation:
https://www.mathworks.com/help/optim/ug/fmincon.html
3. Try manually setting the starting parameters (such as Constant0, GARCH0, and ARCH0) in the ESTIMATE command, using the values of "Constant", "GARCH", and "ARCH" obtained from the previous iteration. You can set the starting parameters by using the following syntax:
constant = obtained_from_previous_iteration;
g0 = obtained_from_previous_iteration;
a0 = obtained_from_previous_iteration;
fit = estimate(model, ret, 'options',opts,'Constant0',constant,'GARCH0',g0,'ARCH0',a0);
For more information about setting the starting parameters of the GARCH model estimation, please refer to the following documentation:
https://www.mathworks.com/help/econ/garch.estimate.html
If the above suggestions do not resolve this issue, please contact the Technical Support Team.