java.lang.Object
dev.nm.stat.timeseries.linear.univariate.stationaryprocess.garch.GARCHSim
All Implemented Interfaces:
RandomNumberGenerator, Seedable

public class GARCHSim extends Object implements RandomNumberGenerator
This class simulates the GARCH models of this form. \[ h_t = \alpha_0 + \sum_{i=1}^{q} (\alpha_i e_{t-i}^2) + \sum_{i=1}^{p} (\beta_i h_{t-i}) \] p is the order of the GARCH terms ht-i; q is the order of the ARCH terms et-i2.
See Also:
  • Constructor Details

    • GARCHSim

      public GARCHSim(GARCHModel model, double[] z, RandomNumberGenerator rng)
      Simulate an GARCH model.
      Parameters:
      model - a GARCH model
      z - the innovations; size = q
      rng - a random number generator
    • GARCHSim

      public GARCHSim(GARCHModel model, RandomNumberGenerator rng)
      Simulate an GARCH model. The innovations are initialized to 0.
      Parameters:
      model - a GARCH model
      rng - a random number generator
    • GARCHSim

      public GARCHSim(GARCHModel model)
      Simulate an GARCH model. The innovations are initialized to 0.
      Parameters:
      model - a GARCH model
  • Method Details

    • seed

      public void seed(long... seeds)
      Description copied from interface: Seedable
      Seed the random number/vector/scenario generator to produce repeatable experiments.
      Specified by:
      seed in interface Seedable
      Parameters:
      seeds - the seeds
    • nextDouble

      public double nextDouble()
      Description copied from interface: RandomNumberGenerator
      Get the next random double.
      Specified by:
      nextDouble in interface RandomNumberGenerator
      Returns:
      the next random number
    • nextPair

      public Pair nextPair()
      Get the next random (e2_t, h_t).
      Returns:
      the next random (e2_t, h_t)