GARCH Toolbox | ![]() ![]() |
Convergence Issues
When estimating the parameters of a composite conditional mean/variance model, you may occasionally encounter convergence problems. For example, the estimation may appear to stall, showing little or no progress. It may terminate prematurely prior to convergence. Or, it may converge to an unexpected, suboptimal solution.
You can avoid many of these difficulties by performing a sound, pre-fit analysis as outlined in the section Analysis and Estimation Example Using the Default Model. That section discusses graphical techniques (plotting the return series, examining the ACF and PACF), as well as some preliminary tests, including Engle's ARCH test and the Q-test. In addition, the section GARCH Limitations mentions some of the limitations of GARCH models. In particular, it notes that GARCH techniques do not easily capture wild, spurious swings in a return series.
The most effective way of avoiding convergence problems is to select the most simplistic model that adequately describes your data. In fact, extreme difficulty in convergence is an indication that the model you chose does not describe your data well.
Specification Structure Fields That Affect Convergence
If you believe that your model is appropriate, and you still experience convergence problems during estimation, there are several fields in the specification structure that you can modify. The specification structure fields that affect convergence for the estimation function are MaxIter
, MaxFunEvals
, TolCon
, TolFun
, and TolX
.
MaxIter and MaxFunEvals. MaxIter
is the maximum number of iterations allowed in the estimation process. Each iteration involves an optimization phase in which garchfit suitably modifies calculations such as line search, gradient, and step size. The default value of MaxIter
is 400. Although an estimation rarely exceeds MaxIter
, you can increase the value if you suspect the estimation terminated prematurely.
MaxFunEvals
, a field closely related to MaxIter
, specifies the maximum number of log-likelihood objective function evaluations. The default value is 100 times the number of parameters estimated in the model. For example, the default model has four parameters, and so the default value of MaxFunEvals
is 400. When the estimation process terminates prematurely, it is usually because MaxFunEvals
, rather than MaxIter
, is exceeded. You can increase MaxFunEvals
if you suspect the estimation terminated prematurely.
TolCon, TolFun, and TolX. The fields TolCon
, TolFun
, and TolX
are tolerance-related parameters that directly influence how and when convergence is achieved.
TolCon
is the termination tolerance placed on violations of the stationarity and positivity constraints, and represents the maximum value by which parameter estimates can violate a constraint and still allow successful convergence. See Eq. (2-6) in the section Homoskedasticity of the Unconditional Variance for information about these constraints.
TolFun
is the termination tolerance placed on the log-likelihood objective function. Successful convergence occurs when the log-likelihood function value changes by less than TolFun
.
TolX
is the termination tolerance placed on the estimated parameter values. Similar to TolFun
, successful convergence occurs when the parameter values change by less than TolX
.
TolCon
, TolFun
, and TolX
have the same default value, 1e-006
. If you experience extreme difficulty in convergence (e.g., the estimation shows little or no progress, or shows progress but stops early), then increasing one or more of these parameter values (e.g., from 1e-006
to 1e-004
) may allow the estimation to converge. If the estimation appears to converge to a suboptimal solution, then decreasing one or more of these parameter values (e.g., from 1e-006
to 1e-007
) may provide more accurate parameter estimates.
Determining Convergence Status
There are two ways to determine whether an estimation achieves convergence. The first, and easiest, is to examine the optimization details of the estimation. By default, garchfit
displays this information in the MATLAB command window. The second way to determine convergence status is to request the garchfit
optional summary output.
To illustrate these methods, revisit the default model for the XYZ Corporation.
[coeff, errors, LLF, innovations, sigma, summary] = garchfit(xyz); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Diagnostic Information Number of variables: 4 Functions Objective: garchllfn Gradient: finite-differencing Hessian: finite-differencing (or Quasi-Newton) Nonlinear constraints: garchnlc Gradient of nonlinear constraints: finite-differencing Constraints Number of nonlinear inequality constraints: 0 Number of nonlinear equality constraints: 0 Number of linear inequality constraints: 1 Number of linear equality constraints: 0 Number of lower bound constraints: 4 Number of upper bound constraints: 0 Algorithm selected medium-scale %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% End diagnostic information max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 5 -5921.94 -1.684e-005 1 -7.92e+004 2 34 -5921.94 -1.684e-005 1.19e-007 -553 3 43 -5924.42 -1.474e-005 0.125 -31.2 4 49 -5936.16 -6.996e-021 1 -288 5 57 -5960.62 0 0.25 -649 6 68 -5961.45 -4.723e-006 0.0313 -17.3 7 75 -5963.18 -2.361e-006 0.5 -28.6 8 81 -5968.24 0 1 -55 9 90 -5970.54 -6.016e-007 0.125 -196 10 103 -5970.84 -1.244e-006 0.00781 -16.1 11 110 -5972.77 -9.096e-007 0.5 -34.4 12 126 -5972.77 -9.354e-007 0.000977 -24.5 13 134 -5973.29 -1.05e-006 0.25 -4.97 14 141 -5973.95 -6.234e-007 0.5 -1.99 15 147 -5974.21 -1.002e-006 1 -0.641 16 153 -5974.57 -9.028e-007 1 -0.0803 17 159 -5974.59 -8.054e-007 1 -0.0293 18 165 -5974.6 -8.305e-007 1 -0.0039 19 172 -5974.6 -8.355e-007 0.5 -0.000964 20 192 -5974.6 -8.355e-007 -6.1e-005 -0.000646 21 212 -5974.6 -8.355e-007 -6.1e-005 -0.000996 Hessian modified twice 22 219 -5974.6 -8.361e-007 0.5 -0.000184 23 239 -5974.6 -8.361e-007 -6.1e-005 -0.00441 Hessian modified twice Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints
Notice that the optimization details indicate successful termination. Now, examine the summary
output structure.
summary summary = warning: 'No Warnings' converge: 'Function Converged to a Solution' covMatrix: [4x4 double] iterations: 23 functionCalls: 241 constraints: 'No Boundary Constraints'
The converge
field indicates successful convergence. If the estimation failed to converge, the converge
field would contain the message, 'Function Did NOT Converge
'. If the number of iterations or function evaluations exceeded its specified limits, the converge
field would contain the message, 'Maximum Function Evaluations or Iterations Reached
'. The summary structure also contains fields that indicate the number of iterations (iterations
) and log-likelihood function evaluations (functionCalls
).
These are generic suggestions. The default values of MaxIter
, MaxFunEvals
, TolCon
, TolFun
, and TolX
typically provide acceptable estimation results. For additional details, see the Optimization Toolbox User's Guide and, in particular, the reference section for the function fmincon
.
![]() | Simplicity/Parsimony | Initial Parameter Estimates | ![]() |