Class ARMAGARCHFit


  • public class ARMAGARCHFit
    extends Object
    This implementation fits, for a data set, an ARMA-GARCH model by Quasi-Maximum Likelihood Estimation. "QMLE" stands for Quasi-Maximum Likelihood Estimation, which assumes Normal distribution and uses robust standard errors for inference. Hence, we currently support only Normal innovations. The parameters of both ARMA and GARCH models are jointly estimated by maximizing a likelihood function.

    Please refer to the reference for the standard assumptions.

    To reduce the number of parameters, hence more accuracy, we assume that the constant parameters \(\mu\) and \(\omega\) are expressed as: \[ \mu=(1-\sum_{i=1}^p \phi_i) * MEAN(X), \\ \omega=(1-\sum_{i=1}^r \alpha_i - \sum_{i=1}^r \beta_i) * MEAN(X). \]

    The R equivalent function is garchFit in fGarch.

    • Constructor Detail

      • ARMAGARCHFit

        public ARMAGARCHFit​(double[] x,
                            int AR,
                            int MA,
                            int p,
                            int q,
                            double epsilon,
                            int maxIterations)
        Constructs a model.
        Parameters:
        x - the input series
        AR - the order for AR in ARMA model
        MA - the order for MA in ARMA model
        p - the order for GARCH in GARCH model
        q - the order for ARCH in GARCH model
        epsilon - the tolerance
        maxIterations - the maximum number of optimization steps
      • ARMAGARCHFit

        public ARMAGARCHFit​(double[] x,
                            int AR,
                            int MA,
                            int p,
                            int q)
        Constructs a model with the default tolerance and maximum number of iterations.
        Parameters:
        x - the input series
        AR - the order for AR in ARMA model
        MA - the order for MA in ARMA model
        p - the order for ARCH in GARCH model
        q - the order for GARCH in GARCH model
    • Method Detail

      • getMeanForecast

        public double[] getMeanForecast​(int k)
        Calculates the k-step ahead forecast of X in ARMA model. When k < max(p, q), getMeanForecastPQ() is called. When k > max(p, q), the first max(p, q) days forecasts are the same as those of getMeanForecastPQ(). And the (k - max(p, q)) days of forecasts are calculated by iteration.
        Parameters:
        k - the number of forecasts
        Returns:
        the ARMA forecast
      • getVarForecast

        public double[] getVarForecast​(int k)
        Calculates the k-step ahead of conditional variance h in GARCH model. When k < max(p, q), getVarForecastPQ() is called. When k > max(p, q), the first max(p, q) days forecasts are the same as those of getVarForecastPQ(). The (k - max(p, q)) days of forecasts are calculated by iteration.
        Parameters:
        k - the number of forecasts
        Returns:
        the GARCH forecast
      • getMeanResidual

        public double[] getMeanResidual()
      • getVarResidual

        public double[] getVarResidual()