Products & Services Solutions Academia Support User Community Company

Learn more about Econometrics Toolbox   

Specification Structures

About Specification Structures

The Econometrics Toolbox software maintains the parameters that define a model and control the estimation process in a specification structure.

The garchfit function creates the specification structure for the default model (see The Default Model), and stores the model orders and estimated parameters in it. For more complex models, use the garchset function to explicitly specify, in a specification structure:

The primary analysis and modeling functions, garchfit, garchpred, and garchsim, all operate on the specification structure. The following table describes how each function uses the specification structure.

For more information about specification structure parameters, see the garchset function reference page.

Function

Description

Use of GARCH Specification Structure

garchfit

Estimates the parameters of a conditional mean specification of ARMAX form and a conditional variance specification of GARCH, GJR, or EGARCH form.

  • Input. Optionally accepts a GARCH specification structure as input.

    If the structure contains the model orders (R, M, P, Q) but no coefficient vectors (C, AR, MA, Regress, K, ARCH, GARCH, Leverage), garchfit uses maximum likelihood to estimate the coefficients for the specified mean and variance models.

    If the structure contains coefficient vectors, garchfit uses them as initial estimates for further refinement. If you do not provide a specification structure, garchfit returns a specification structure for the default model.

  • Output. Returns a specification structure that contains a fully specified ARMAX/GARCH model.

garchpred

Provides minimum-mean-square-error (MMSE) forecasts of the conditional mean and standard deviation of a return series, for a specified number of periods into the future.

  • Input. Requires a GARCH specification structure that contains the coefficient vectors for the model for which garchpred forecasts the conditional mean and standard deviation.

  • Output. The garchpred function does not modify or return the specification structure.

garchsim

Uses Monte Carlo methods to simulate sample paths for return series, innovations, and conditional standard deviation processes.

  • Input. Requires a GARCH specification structure that contains the coefficient vectors for the model for which garchsim simulates sample paths.

  • Output. garchsim does not modify or return the specification structure.

Associating Model Equation Variables with Corresponding Parameters in Specification Structures

Specification Structure Parameter Names

The names of specification structure parameters that define the ARMAX and GARCH models usually reflect the variable names of their corresponding components in the conditional mean and variance model equations described in Conditional Mean and Variance Models.

Conditional Mean Model

In the conditional mean model:

Unlike the other components of the conditional mean equation, the GARCH specification structure does not include X. X is an optional matrix of returns that some Econometrics Toolbox functions use as explanatory variables in the regression component of the conditional mean. For example, y could contain return series of a market index collected over the same period as the return series X. Toolbox functions that require a regression matrix provide a separate argument you can use to specify it.

Conditional Variance Models

In conditional variance models:

Working with Specification Structures

Creating Specification Structures

In general, you must use the garchset function to create a specification structure that contains at least the chosen variance model and the mean and variance model orders. The only exception is the default model, for which garchfit can create a specification structure. The model parameters you provide must specify a valid model.

When you create a specification structure, you can specify both the conditional mean and variance models. Alternatively, you can specify either the conditional mean or the conditional variance model. If you do not specify both models, garchset assigns default parameters to the one that you did not specify.

For the conditional mean, the default is a constant ARMA(0,0,?) model. For the conditional variance, the default is a constant GARCH(0,0) model. The question mark (?) indicates that garchset cannot interpret whether you intend to include a regression component (see Regression).

The following examples create specification structures and display the results. You need only enter the leading characters that uniquely identify the parameter. As illustrated here, garchset parameter names are case insensitive.

For the Default Model.   The following is a sampling of statements that all create specification structures for the default model.

spec = garchset('R',0,'m',0,'P',1,'Q',1);
spec = garchset('p',1,'Q',1);
spec = garchset;

The output of each of these commands is the same. The Comment field summarizes the model. Because R = M = 0, the fields R, M, AR, and MA do not appear.

spec = 
          Comment: 'Mean: ARMAX(0,0,?); Variance: GARCH(1,1)'
     Distribution: 'Gaussian'
                C: []
    VarianceModel: 'GARCH'
                P: 1
                Q: 1
                K: []
            GARCH: []
             ARCH: []

For ARMA(0,0)/GJR(1,1).   garchset accepts the constant default for the mean model.

spec = garchset('VarianceModel','GJR','P',1,'Q',1)

spec = 
          Comment: 'Mean: ARMAX(0,0,?); Variance: GJR(1,1)'
     Distribution: 'Gaussian'
                C: []
    VarianceModel: 'GJR'
                P: 1
                Q: 1
                K: []
            GARCH: []
             ARCH: []
         Leverage: []

For AR(2)/GARCH(1,2) with Initial Parameter Estimates.   garchset infers the model orders from the lengths of the coefficient vectors, assuming a GARCH(P,Q) conditional variance process as the default:

spec = garchset('C',0,'AR',[0.5 -0.8],'K',0.0002,... 
                'GARCH',0.8,'ARCH',[0.1 0.05])
spec = 

          Comment: 'Mean: ARMAX(2,0,?); Variance: GARCH(1,2)'
     Distribution: 'Gaussian'
                R: 2
                C: 0
               AR: [0.5000 -0.8000]
    VarianceModel: 'GARCH'
                P: 1
                Q: 2
                K: 2.0000e-004
            GARCH: 0.8000
             ARCH: [0.1000 0.0500]

Modifying Specification Structures

The following example creates an initial structure, and then updates the existing structure with additional parameter/value pairs. At each step, the result must be a valid specification structure:

spec = garchset('VarianceModel','EGARCH','M',1,'P',1,'Q',1);
spec = garchset(spec,'R',1,'Distribution','T')

spec = 
          Comment: 'Mean: ARMAX(1,1,?); Variance: EGARCH(1,1)'
     Distribution: 'T'
              DoF: []
                R: 1
                M: 1
                C: []
               AR: []
               MA: []
    VarianceModel: 'EGARCH'
                P: 1
                Q: 1
                K: []
            GARCH: []
             ARCH: []
         Leverage: []

Retrieving Specification Structure Values

This example does the following:

  1. Creates a specification structure, spec, by providing the model coefficients.

  2. Uses the garchset function to infer the model orders from the lengths of specified model coefficients, assuming the GARCH(P,Q) default variance model.

  3. Uses garchget to retrieve the variance model and the model orders for the conditional mean.

    You need only type the leading characters that uniquely identify the parameter.

    spec = garchset('C',0,'AR',[0.5 -0.8],'K',0.0002,... 
                    'GARCH',0.8,'ARCH',[0.1 0.05])
    spec = 
    
              Comment: 'Mean: ARMAX(2,0,?); Variance: GARCH(1,2)'
         Distribution: 'Gaussian'
                    R: 2
                    C: 0
                   AR: [0.5000 -0.8000]
        VarianceModel: 'GARCH'
                    P: 1
                    Q: 2
                    K: 2.0000e-004
                GARCH: 0.8000
                 ARCH: [0.1000 0.0500]
    R = garchget(spec,'R')
    R =
          2
    
    M = garchget(spec,'m')
    M =
          0
    
    var = garchget(spec,'VarianceModel')
    var =
          GARCH
    

Example: Specification Structures

  1. Display the fields of the coeff specification structure, for the estimated default model from Example: Using the Default Model:

    coeff
    coeff =
              Comment: 'Mean: ARMAX(0,0,0); Variance: GARCH(1,1)'
         Distribution: 'Gaussian'
                    C: -6.1919e-005
        VarianceModel: 'GARCH'
                    P: 1
                    Q: 1
                    K: 1.0761e-006
                GARCH: 0.8060
                 ARCH: 0.1531
    

    The terms to the left of the colon (:) denote parameter names.

    When you display a specification structure, only the fields that are applicable to the specified model appear. For example, R = M = 0 in this model, so these fields do not appear.

    By default, garchset and garchfit automatically generate the Comment field. This field summarizes the ARMAX and GARCH models used for the conditional mean and variance equations. You can use garchset to set the value of the Comment field, but the value you give it replaces the summary statement.

  2. Display the MA(1)/GJR(1,1) estimated model from Presample Data:

    coeff = 
              Comment: 'Mean: ARMAX(0,1,0); Variance: GJR(1,1)'
         Distribution: 'Gaussian'
                    M: 1
                    C: 5.6403e-004
                   MA: 0.2501
        VarianceModel: 'GJR'
                    P: 1
                    Q: 1
                    K: 1.1907e-005
                GARCH: 0.6945
                 ARCH: 0.0249
             Leverage: 0.2454
              Display: 'off'
    

    length(MA) = M, length(GARCH) = P, and length(ARCH) = Q.

  3. Consider what you would see if you had created the specification structure for the same MA(1)/GJR(1,1) example, but had not yet estimated the model coefficients. The specification structure would appear as follows:

    spec = garchset('VarianceModel','GJR','M',1,'P',1,'Q',1,...
           'Display','off')
    spec = 
              Comment: 'Mean: ARMAX(0,1,?); Variance: GJR(1,1)'
         Distribution: 'Gaussian'
                    M: 1
                    C: []
                   MA: []
        VarianceModel: 'GJR'
                    P: 1
                    Q: 1
                    K: []
                GARCH: []
                 ARCH: []
             Leverage: []
              Display: 'off'
    

    The empty matrix symbols, [], indicate that the specified model requires these fields, but that you have not yet assigned them values. For the specification to be complete, you must assign valid values to these fields. For example, you can use the garchset function to assign values to these fields as initial parameter estimates. You can also pass such a specification structure to garchfit, which uses the parameters it estimates to complete the model specification. You cannot pass such a structure to garchsim, garchinfer, or garchpred. These functions require complete specifications.

    For descriptions of all specification structure fields, see the garchset function reference page.

  


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