SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.stats.timeseries.linear.univariate.stationaryprocess.garch
Class GarchModel

java.lang.Object
  extended by com.numericalmethod.suanshu.stats.timeseries.linear.univariate.stationaryprocess.garch.GarchModel

public class GarchModel
extends java.lang.Object

This class represents a GARCH specification. The GARCH(p, q) model (where p is the order of the GARCH terms h_(t-i) and q is the order of the ARCH terms e_(t-i)^2) is given by

 h(t)= α0 + Σ(α_i * e_(t-i)^2) + Σ(β_i * h_(t-i))
 

See Also:
Wikipedia: GARCH

Constructor Summary
GarchModel(double a0, double[] a, double[] b)
          Construct a GARCH model.
GarchModel(GarchModel that)
          Copy constructor.
 
Method Summary
 double a0()
          Get the constant term.
 double[] alpha()
          Get the ARCH coefficients.
 double[] beta()
          Get the GARCH coefficients.
 int maxPQ()
          Get the maximum of ARCH length or GARCH length.
 int p()
          Get the number of GARCH terms.
 int q()
          Get the number of ARCH terms.
 double sigma2(double[] e2, double[] sigma2_lag)
          Compute the conditional variance based on the past information.
 double var()
          Compute the unconditional variance of the GARCH model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GarchModel

public GarchModel(double a0,
                  double[] a,
                  double[] b)
Construct a GARCH model.

Parameters:
a0 - the constant term
a - the ARCH coefficients; null if no ARCH coefficients
b - the GARCH coefficients; null if no GARCH coefficients

GarchModel

public GarchModel(GarchModel that)
Copy constructor.

Parameters:
that - a GARCH model
Method Detail

a0

public double a0()
Get the constant term.

Returns:
the constant term

alpha

public double[] alpha()
Get the ARCH coefficients.

Returns:
the ARCH coefficients; could be null

beta

public double[] beta()
Get the GARCH coefficients.

Returns:
the GARCH coefficients; could be null

p

public int p()
Get the number of GARCH terms.

Returns:
the number of GARCH terms

q

public int q()
Get the number of ARCH terms.

Returns:
the number of ARCH terms

maxPQ

public int maxPQ()
Get the maximum of ARCH length or GARCH length.

Returns:
max(ARCH terms, GARCH terms)

var

public double var()
Compute the unconditional variance of the GARCH model.

Returns:
the unconditional variance

sigma2

public double sigma2(double[] e2,
                     double[] sigma2_lag)
Compute the conditional variance based on the past information.

Parameters:
e2 - the last q squared observations
sigma2_lag - the last p conditional variance
Returns:
the conditional variance, h(t | Ft)

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.