SuanShu, a Java numerical and statistical library

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

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

public class Garch
extends java.lang.Object

This class does fitting for the Generalized Autoregressive Conditional Heteroscedasticity (GARCH) model.

This implementation does the fitting by maximizing the likelihood function, using the gradient information.

See Also:
"Bollerslev, Tim. Generalized autoregressive conditional heteroskedasticity, Journal of Econometrics, Issue 3, Vol. 31. 1986."

Constructor Summary
Garch(TimeSeries xt, int p, int q)
          Fit the GARCH(p, q) model to the time series.
Garch(TimeSeries xt, int p, int q, int maxIterations)
          Fit the GARCH(p, q) model to the time series.
 
Method Summary
 RealVectorFunction dLogLikelihood(double[] e_t2, int p, int q)
          the gradient of the log-likelihood function for a set of observations The gradient log-likelihood takes θ as the inputs.
 RealScalarFunction logLikelihood(double[] e_t2, int p, int q)
          the log-likelihood function for a set of observations The log-likelihood takes θ as the inputs.
 GarchModel model()
          Get the fitted GARCH model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Garch

public Garch(TimeSeries xt,
             int p,
             int q,
             int maxIterations)
Fit the GARCH(p, q) model to the time series.

Parameters:
xt - a time series of the observations
q - the ARCH order
p - the GARCH part order
maxIterations - the maximum number of iterations in the numerical optimization algorithm

Garch

public Garch(TimeSeries xt,
             int p,
             int q)
Fit the GARCH(p, q) model to the time series.

Parameters:
xt - a time series of the observations
q - the ARCH order
p - the GARCH part order
Method Detail

model

public GarchModel model()
Get the fitted GARCH model.

Returns:
the fitted GARCH model, the estimators.

logLikelihood

public RealScalarFunction logLikelihood(double[] e_t2,
                                        int p,
                                        int q)
the log-likelihood function for a set of observations

The log-likelihood takes θ as the inputs.

Parameters:
e_t2 - squared observations
q - the ARCH order
p - the GARCH part order
Returns:
log-likelihood function for a set of observations
See Also:
"Bollerslev, Tim. "Eq. 18. Generalized autoregressive conditional heteroskedasticity," Journal of Econometrics, Issue 3, Vol. 31. 1986."

dLogLikelihood

public final RealVectorFunction dLogLikelihood(double[] e_t2,
                                               int p,
                                               int q)
the gradient of the log-likelihood function for a set of observations

The gradient log-likelihood takes θ as the inputs.

Parameters:
e_t2 - the squared observations
p - the number of AR terms
q - the number of MA terms
Returns:
the gradient of the log-likelihood function
See Also:
"Bollerslev, Tim. "Eqs. 19, 21. Generalized autoregressive conditional heteroskedasticity," Journal of Econometrics, Issue 3, Vol. 31. 1986."

SuanShu, a Java numerical and statistical library

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