java.lang.Object
dev.nm.stat.stochasticprocess.univariate.sde.process.ou.OUSim
All Implemented Interfaces:
RandomNumberGenerator, Seedable

public class OUSim extends Object implements RandomNumberGenerator
This class simulates a discrete path of a univariate Ornstein-Uhlenbeck (OU) process.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create an OU process simulator with a time interval of 1, using the overall mean as the starting value.
    OUSim(OUProcess ou, double dt)
    Create an OU process simulator using the overall mean as the starting value.
    OUSim(OUProcess ou, double dt, double x0)
    Create an OU process simulator.
    OUSim(OUProcess ou, double dt, double x0, RandomStandardNormalGenerator rng)
    Create an OU process simulator.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    dt()
    Get the time interval \(\delta_t\) of this generator.
    Get the underlying OU process of this generator.
    double
    Get the next random double.
    void
    seed(long... seeds)
    Seed the random number/vector/scenario generator to produce repeatable experiments.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • OUSim

      public OUSim(OUProcess ou, double dt, double x0, RandomStandardNormalGenerator rng)
      Create an OU process simulator.
      Parameters:
      ou - the underlying OU process
      dt - the time interval \(\delta_t\)
      x0 - the starting value
      rng - the standard Gaussian innovation generator
    • OUSim

      public OUSim(OUProcess ou, double dt, double x0)
      Create an OU process simulator. StandardNormalRNG is used for generating i.i.d innovations.
      Parameters:
      ou - the underlying OU process
      dt - the time interval \(\delta_t\)
      x0 - the starting value
    • OUSim

      public OUSim(OUProcess ou, double dt)
      Create an OU process simulator using the overall mean as the starting value. StandardNormalRNG is used for generating i.i.d innovations.
      Parameters:
      ou - the underlying OU process
      dt - the time interval \(\delta_t\)
    • OUSim

      public OUSim(OUProcess ou)
      Create an OU process simulator with a time interval of 1, using the overall mean as the starting value. StandardNormalRNG is used for generating i.i.d innovations.
      Parameters:
      ou - the underlying OU process
  • Method Details

    • 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
    • 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
    • getProcess

      public OUProcess getProcess()
      Get the underlying OU process of this generator.
      Returns:
      the underlying OU process
    • dt

      public double dt()
      Get the time interval \(\delta_t\) of this generator.
      Returns:
      the time interval \(\delta_t\)