Products & Services Solutions Academia Support User Community Company

Learn more about Econometrics Toolbox   

Model Construction

Setting Model Parameters

Fixing Values of Parameters with Specification Structure Coefficient Fields

Each of these coefficient fields in the specification structure has a corresponding logical field that lets you hold any individual parameter fixed:

The fix fields are:

A 0 in a particular element of a fix field indicates that the corresponding value in its companion field is an initial parameter guess. The garchfit function refines this guess during the estimation process.

A 1 in a particular element of a fix field indicates that garchfit holds the corresponding element of its value field fixed during the estimation process (that is, an equality constraint).

This example fits the nasdaq return series to the default GARCH(1,1) model.

  1. If the nasdaq data is not already in your workspace, restore it:

    load garchdata
    nasdaq = price2ret(NASDAQ);
    spec11 = garchset('P',1,'Q',1,'Display','off');
    [coeff11,errors11,LLF11] = garchfit(spec11,nasdaq);
    garchdisp(coeff11,errors11)
    Mean: ARMAX(0,0,0); Variance: GARCH(1,1)
    Conditional Probability Distribution: Gaussian
    Number of Model Parameters Estimated: 4
                                   Standard          T     
      Parameter       Value          Error       Statistic 
     -----------   -----------   ------------   -----------
               C    0.00085759     0.00018342       4.6757
               K    2.2237e-006    3.3426e-007      6.6526
        GARCH(1)    0.87598        0.0089244       98.1546
         ARCH(1)    0.1157         0.0084721       13.6568
  2. Since the estimated model has no equality constraints, all the fixed fields are implicitly empty; for example:

    garchget(coeff11,'FixGARCH')
    ans =
         []
    

When not empty ([]), each fix field is the same size as the corresponding coefficient field.

Comparing the GARCH (1, 1) Estimation Results with the GARCH (2,1) Model Fit to the NASDAQ Returns

This example compares the estimation results for the default GARCH(1,1) model with those obtained from fitting a GARCH(2,1) model to the NASDAQ returns. (See Time Series Data.)

  1. Restore your workspace as needed:

    load garchdata
    nasdaq = price2ret(NASDAQ);
    
  2. Estimate the model parameters and display the results:

    spec21 = garchset('P',2,'Q',1,'Display','off');
    [coeff21,errors21,LLF21] = garchfit(spec21,nasdaq);
    garchdisp(coeff21,errors21)
    Mean: ARMAX(0,0,0); Variance: GARCH(2,1)
    Conditional Probability Distribution: Gaussian
    Number of Model Parameters Estimated: 5
                                   Standard          T     
      Parameter       Value          Error       Statistic 
     -----------   -----------   ------------   -----------
               C    0.00086049     0.00018361       4.6865
               K    2.2683e-006    4.7027e-007      4.8235
        GARCH(1)    0.83845        0.18583          4.5119
        GARCH(2)    0.03426        0.16617          0.2062
         ARCH(1)    0.11882        0.020284         5.8577

    The garchdisp function computes the values in the T Statistic column by dividing the parameter value by the standard error. T Statistic is normally distributed for large samples, and measures the number of standard deviations the parameter estimate is away from zero. As a general rule, a T-statistic greater than 2 in magnitude corresponds to approximately a 95 percent confidence interval. The T-statistics shown here imply that the GARCH(2) parameter adds little if any explanatory power to the model.

  3. Assess significance of the GARCH(2) parameter.

    1. Constrain the GARCH(2) parameter at 0:

      specG2 = garchset(coeff21,'GARCH',[0.8 0],'FixGARCH',[0 1]);

      Using the specG2 structure, garchfit holds GARCH(2) fixed at 0, and refines GARCH(1) from an initial value of 0.8 during the estimation process. In other words, the specG2 specification structure tests the composite model

      which is mathematically equivalent to the default GARCH(1,1) model.

    2. Estimate the model subject to the equality constraint, and display the results:

      [coeffG2,errorsG2,LLFG2] = garchfit(specG2,nasdaq);
      garchdisp(coeffG2,errorsG2)
       
        Mean: ARMAX(0,0,0); Variance: GARCH(2,1)
       
        Conditional Probability Distribution: Gaussian
        Number of Model Parameters Estimated: 4
      
                                     Standard          T     
        Parameter       Value          Error       Statistic 
       -----------   -----------   ------------   -----------
                 C    0.00085732     0.00018341       4.6744
                 K    2.2228e-006    3.342e-007       6.6512
          GARCH(1)    0.87598        0.0089242       98.1569
          GARCH(2)    0              Fixed            Fixed
           ARCH(1)    0.11571        0.0084729       13.6569

      The Standard Error and T-statistic columns for the second GARCH parameter indicate that garchfit holds the GARCH(2) parameter fixed. The number of estimated parameters also decreased from 5 in the original, unrestricted GARCH(2,1) model to 4 in this restricted GARCH(2,1) model. The results are virtually identical to those obtained from the GARCH(1,1) model.

    3. Apply the likelihood ratio test:

      [H,pValue,Stat,CriticalValue] = lratiotest(LLF21,LLFG2,...
                                                 1,0.05);
      [H pValue Stat CriticalValue]
      ans =
               0    0.7826    0.0761    3.8415

      This is the expected result. Because the two models are virtually identical, the results support acceptance of the simpler restricted model. This is essentially just the default GARCH(1,1) model.

Setting Equality Constraints

About this Example

This example highlights important points regarding equality constraints and initial parameter estimates in the Econometrics Toolbox software.

For information about using the specification structure fix fields to set equality constraints, see Fixing Values of Parameters with Specification Structure Coefficient Fields.

Providing a Complete Model Specification

To set equality constraints during estimation, you must provide a complete model specification, that is, the specification must include initial parameter estimates consistent with the model orders. You can specify the model for either the conditional mean or the conditional variance without specifying the other.

The following example attempts to set equality constraints for an incomplete conditional mean model and a complete variance model. Create an ARMA(1,1)/GARCH(1,1) specification structure for conditional mean and variance models, respectively.

spec = garchset('R',1,'M',1,'C',0,'AR',0.5,'FixAR',1,...
                'P',1,'Q',1,'K',0.0005,'GARCH',0.8,...
                'ARCH',0.1,'FixGARCH',1)
spec = 
          Comment: 'Mean: ARMAX(1,1,?); Variance: GARCH(1,1)'
     Distribution: 'Gaussian'
                R: 1
                M: 1
                C: 0
               AR: 0.5000
               MA: []
    VarianceModel: 'GARCH'
                P: 1
                Q: 1
                K: 5.0000e-004
            GARCH: 0.8000
             ARCH: 0.1000
            FixAR: 1
         FixGARCH: 1

The conditional mean model is incomplete because the MA field is still empty. Since the requested ARMA(1,1) model is an incomplete conditional mean specification, garchfit does the following:

However, since the structure explicitly sets all fields in the conditional variance model, garchfit uses the specified values of K and ARCH as initial estimates subject to further refinement, and holds the GARCH parameter at 0.8 throughout the optimization process.

Interpreting Empty Fix Fields

Any empty fix field, ([]), is equivalent to a vector of zeros of compatible length. When garchfit encounters an empty fix field, it automatically estimates the corresponding parameter. For example, the following specification structures produce the same GARCH(1,1) estimation results.

spec1 = garchset('K',0.005,'GARCH',0.8,'ARCH',0.1,...
                 'FixGARCH',0,'FixARCH',0)

spec2 = garchset('K',0.005,'GARCH',0.8,'ARCH',0.1)

Limiting Use of Equality Constraints

Although the ability to set equality constraints is useful, equality constraints complicate the estimation process. Therefore, you should avoid setting several equality constraints simultaneously. For example, to best estimate a GARCH(1,1) model, specify a GARCH(1,1) model instead of a more elaborate model with numerous constraints.

  


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