garchGJRFit#

Purpose#

Estimates asymmetric GJR-GARCH model.

Library#

tsmt

Format#

out1 = garchGJRFit(y, p [, q, c0]);
out1 = garchGJRFit(dataset, formula, p [, q, c0]);
Parameters:
  • y (Matrix) – dependent variables.

  • x (Matrix) – independent variables.

  • dataset (string) – name of data set or null string.

  • formula (string) – formula string of the model. E.g. "y ~ X1 + X2" ‘y’ is the name of dependent variable, ‘X1’ and ‘X2’ are names of independent variables; E.g. "y ~ ." , ‘.’ means including all variables except dependent variable ‘y’;

  • p (scalar) – order of the GARCH parameters.

  • q (scalar) – Optional input. order of the ARCH parameters.

  • c0

    Optional input. garchControl structure.

    type c0:

    Optional input

    return out1:

    garchEstimation structure containing the following members:

    out1.aic

    scalar, Akiake criterion.

    out1.bic

    scalar, Bayesian information criterion.

    out1.lrs

    scalar, likelihood ratio statistic.

    out1.numObs

    scalar, number of observations.

    out1.df

    scalar, degrees of freedom.

    out1.par

    instance of PV structure containing parameter estimates.

    out1.retcode

    scalar, return code:

    1:

    normal convergence.

    2:

    forced exit.

    3:

    function calculation failed.

    4:

    gradient calculation failed.

    5:

    Hessian calculation failed.

    6:

    line search failed.

    7:

    error with constraints.

    8:

    function complex.

    out1.moment

    KxK matrix, moment matrix of parameter estimates.

    out1.climits

    Kx2 matrix, confidence limits.

    rtype out1:

    struct

Example#

new;
cls,;
library tsmt;

y = loadd( getGAUSSHome() $+ "pkgs/tsmt/examples/gjrgarch.dat");

// GARCH control structure
struct garchControl c0;
c0 = garchControlCreate;
c0.cmlmtControlproc = &prc;

// Covariance type
c0.covtype = 2;


// Control cmlmt estimation
proc prc(struct cmlmtControl c0);
    c0.printiters = 10;
    c0.switch = 0;
    c0.algorithm = 1;
retp(c0);
endp;

// GARCH order
p = 1;

// ARCH order
q = 1;

// Estimate model
struct garchEstimation f0;
f0 = garchgjrFit(y, p, q, c0);

Source#

tsgarch.src

See also

Functions garchFit(), garchMFit()