Class GARCH

  • All Implemented Interfaces:
    HistoricalSimulationModel

    public class GARCH
    extends Object
    implements HistoricalSimulationModel
    Log-normal process with GARCH(1,1) volatility. This class estimate the process \[ \mathrm{d} \log(X) = \sigma(t) \mathrm{d}W(t) \] where \( \sigma \) is given by a GARCH(1,1) process from time discrete realizations \( X_{i} \). That is, given a time series of values \( X_{i} \) the GARCH(1,1) volatility of the log-returns \( \log(X_{i+1}/X_{i}) \) is estimated.
    Version:
    1.0
    Author:
    Christian Fries
    • Constructor Detail

      • GARCH

        public GARCH​(double[] values)
        Create GARCH model estimated form the given time series of values.
        Parameters:
        values - Given set of values.
      • GARCH

        public GARCH​(double[] values,
                     int windowIndexStart,
                     int windowIndexEnd)
        Create GARCH model estimated form the given time series of values.
        Parameters:
        values - Given set of values.
        windowIndexStart - First index to consider in the given set of values.
        windowIndexEnd - Last index to consider in the given set of values.
    • Method Detail

      • getCloneWithWindow

        public GARCH getCloneWithWindow​(int windowIndexStart,
                                        int windowIndexEnd)
        Description copied from interface: HistoricalSimulationModel
        Create a new model, using only a window of the times series.
        Specified by:
        getCloneWithWindow in interface HistoricalSimulationModel
        Parameters:
        windowIndexStart - Index of the first element to be part of the new time series.
        windowIndexEnd - Index of the last element to be part of the new time series.
        Returns:
        A new historical simulation using a different data window.
      • getLogLikelihoodForParameters

        public double getLogLikelihoodForParameters​(double omega,
                                                    double alpha,
                                                    double beta)
        Get log likelihood of the sample time series for given model parameters.
        Parameters:
        omega - The parameter ω of the GARCH model.
        alpha - The parameter α of the GARCH model.
        beta - The parameter β of the GARCH model.
        Returns:
        The log likelihood of the times series under the specified GARCH model.
      • getLastResidualForParameters

        public double getLastResidualForParameters​(double omega,
                                                   double alpha,
                                                   double beta)
        Returns the last estimate of the time series volatility.
        Parameters:
        omega - The parameter ω of the GARCH model.
        alpha - The parameter α of the GARCH model.
        beta - The parameter β of the GARCH model.
        Returns:
        Last residual, i.e., σ
      • getSzenarios

        public double[] getSzenarios​(double omega,
                                     double alpha,
                                     double beta)
      • getQuantilPredictionsForParameters

        public double[] getQuantilPredictionsForParameters​(double omega,
                                                           double alpha,
                                                           double beta,
                                                           double[] quantiles)