Products & Services Solutions Academia Support User Community Company

Learn more about Econometrics Toolbox   

Optimization Termination

Optimization Parameters

Listed below, in order of importance, are some fields in the specification structure that allow you to influence the optimization process. The following sections provide guidance on how to set these parameters to achieve desired convergence results.

TolCon

Termination tolerance on the constraint violation

TolFun

Termination tolerance on the function value

TolX

Termination tolerance on the parameter estimates

MaxFunEvals

Maximum number of function evaluations allowed

MaxIter

Maximum number of iterations allowed

For more information about these parameters, see:

Setting Maximum Numbers of Iterations and Function Evaluations

MaxIter is the maximum number of iterations allowed in the estimation process. Each iteration involves an optimization phase in which garchfit 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 that the estimation terminated prematurely.

MaxFunEvals, a field closely related to MaxIter, specifies the maximum number of loglikelihood 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, so the default value of MaxFunEvals for the default model 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 that the estimation terminated prematurely.

The fields MaxFunEvals and MaxIter are purely mechanical in nature. Although you may encounter situations in which MaxFunEvals or MaxIter is reached, this is rather uncommon. Increasing MaxFunEvals or MaxIter may allow successful convergence. However, reaching MaxFunEvals or MaxIter is usually an indication that your model poorly describes the data. In particular, it often indicates that the model is too complicated. Finally, although MaxFunEvals and MaxIter can cause the function to stop before a solution is found, they do not affect the solution once it is found.

Setting Function Termination Tolerance

The fields TolCon, TolFun, and TolX are tolerance-related parameters. They directly influence how and when convergence is achieved, and can also affect the solution.

Enabling Estimation Convergence

TolFun, and TolX have the same default value, 1e-006. The TolCon default is 1e-007. If the estimation shows little or no progress, or shows progress but stops early, increase one or more of these parameter values. For example, increasing the values from 1e-006 to 1e-004 may allow the estimation to converge. If the estimation appears to converge to a suboptimal solution, decrease one or more of these parameter values. Decreasing the values from 1e-006 to 1e-007 may provide more accurate parameter estimates.

Setting Constraint Violation Tolerance

At each step in the optimization process, garchfit evaluates the constraints described in Conditional Mean and Variance Models against the current intermediate solution vector. For each user-specified equality constraint, it determines whether there is a violation whose absolute value is greater than TolCon. For each inequality constraint (including lower and upper bounds), it determines whether the inequality is violated by more than the value of TolCon. If either the TolFun or TolX exit condition is satisfied, and if the maximum of any violations is less than the value of TolCon, then the optimization terminates successfully. (See Setting Function Termination Tolerance.)

Setting Strict Inequality Constraints

The Optimization Toolbox fmincon numerical optimizer defines inequality constraints as a less than or equal to condition. However, the Econometrics Toolbox interpretation of TolCon differs from the Optimization Toolbox interpretation. Econometrics Toolbox inequality constraints are strict inequalities that specifically exclude exact equality.

TolCon applies to both strict inequalities and those that are not strict, but garchfit provides special handling for strict inequalities. Specifically, garchfit associates each strict inequality constraint with its theoretical bound, or limit. However, to avoid the possibility of violating strict inequality constraints, garchfit defines the actual bound for each such constraint as the theoretical bound offset by 2*TolCon. The optimization can successfully terminate if the actual bound is violated by as much as TolCon. Consequently, any given strict inequality constraint is allowed to approach its theoretical bound to within TolCon.

Setting Single-parameter Strict Inequality Constraints

It is possible for an estimate of a strict inequality constraint that involves a single parameter to terminate a distance TolCon from its theoretical bound. However, experience has shown that this is unlikely. Examples of such constraints are:

Typically, when the lower or upper bound of such a single-parameter inequality constraint is active, the estimate remains 2*TolCon from the bound.

It is unlikely that an estimate of a single parameter constraint will terminate a distance TolCon from its theoretical bound. However, the garchfit approach for handling strict inequalities still allows for this condition.

As an illustration, assume TolCon = 1e-7 (its default value), and consider the default GARCH(1,1) model:

with constraints

κ > 0

G1 + A1 < 1

G1 ≥ 0

A1 ≥ 0.

When the lower bound constraint κ > 0 is active, the estimated value of κ is typically

κ = 2e-7 = 2*TolCon.

Relaxing Constraint Tolerance Limits

Experience has shown that relaxing TolCon is more likely to remove an active constraint in some cases than in others. For inequality constraints with a single parameter, such as those discussed in Setting Single-parameter Strict Inequality Constraints, decreasing TolCon may relax the constraint such that it is no longer active. The example Lower Bound Constraints explains how to identify such a condition by examining the summary output structure.

This is not generally true for linear inequality constraints with multiple parameters. An example is G1 + A1 < 1. When this constraint is active, the estimated values of G1 and A1 are typically such that G1 + A1 = 0.9999999 = 1.0 – TolCon. Decreasing TolCon to, say, 1e-8, allows G1 + A1 to approach 1.0 more closely, but the linear inequality constraint is likely to remain active.

  


Free Interactive Computational Finance CD

View demos and recorded presentations led by industry experts.

Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS