Products & Services Solutions Academia Support User Community Company

Learn more about Econometrics Toolbox   

Estimation

This example fits the NASDAQ daily returns from example nasdaq data set to an ARMA(1,1)/GJR(1,1) model with conditionally t-distributed residuals.

  1. Load the nasdaq data set and convert daily closing prices to daily returns:

    load garchdata
    nasdaq = price2ret(NASDAQ);
  2. Create a specification structure for an ARMA(1,1)/GJR(1,1) model with conditionally t-distributed residuals:

    spec = garchset('VarianceModel','GJR',...
                    'R',1,'M',1,'P',1,'Q',1);
    spec = garchset(spec,'Display','off','Distribution','T');

      Note   This example is for illustration purposes only. Such an elaborate ARMA(1,1) model is typically not needed, and should only be used after you have performed a sound pre-estimation analysis.

  3. Estimate the parameters of the mean and conditional variance models via garchfit. Make sure that the example returns the estimated residuals and conditional standard deviations inferred from the optimization process, so that they can be used as presample data:

    [coeff,errors,LLF,eFit,sFit] = garchfit(spec,nasdaq);

    Alternatively, you could replace this call to garchfit with the following successive calls to garchfit and garchinfer. This is because the estimated residuals and conditional standard deviations are also available from the inference function garchinfer:

    [coeff,errors] = garchfit(spec,nasdaq);
    [eFit,sFit]    = garchinfer(coeff,nasdaq);

    Either approach produces the same estimation results:

    garchdisp(coeff,errors)
      Mean: ARMAX(1,1,0); Variance: GJR(1,1)
      Conditional Probability Distribution: T
      Number of Model Parameters Estimated: 8
                                   Standard          T     
      Parameter       Value          Error       Statistic 
     -----------   -----------   ------------   -----------
               C    0.00099913     0.00023366       4.2759
           AR(1)    -0.1074        0.11568         -0.9284
           MA(1)    0.26286        0.11205          2.3459
               K    1.4274e-006    3.812e-007       3.7446
        GARCH(1)    0.90103        0.01111         81.0988
         ARCH(1)    0.048458       0.013521         3.5839
     Leverage(1)    0.085677       0.016792         5.1021
             DoF    7.8264         0.92862          8.4280

  


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