Class OUSim
- 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:
- Wikipedia: Ornstein-Uhlenbeck process
-
-
Constructor Summary
Constructors Constructor Description OUSim(OUProcess ou)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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doubledt()Get the time interval \(\delta_t\) of this generator.OUProcessgetProcess()Get the underlying OU process of this generator.doublenextDouble()Get the next randomdouble.voidseed(long... seeds)Seed the random number/vector/scenario generator to produce repeatable experiments.
-
-
-
Constructor Detail
-
OUSim
public OUSim(OUProcess ou, double dt, double x0, RandomStandardNormalGenerator rng)
Create an OU process simulator.- Parameters:
ou- the underlying OU processdt- the time interval \(\delta_t\)x0- the starting valuerng- the standard Gaussian innovation generator
-
OUSim
public OUSim(OUProcess ou, double dt, double x0)
Create an OU process simulator.StandardNormalRNGis used for generating i.i.d innovations.- Parameters:
ou- the underlying OU processdt- 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.StandardNormalRNGis used for generating i.i.d innovations.- Parameters:
ou- the underlying OU processdt- 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.StandardNormalRNGis used for generating i.i.d innovations.- Parameters:
ou- the underlying OU process
-
-
Method Detail
-
nextDouble
public double nextDouble()
Description copied from interface:RandomNumberGeneratorGet the next randomdouble.- Specified by:
nextDoublein interfaceRandomNumberGenerator- Returns:
- the next random number
-
seed
public void seed(long... seeds)
Description copied from interface:SeedableSeed the random number/vector/scenario generator to produce repeatable experiments.
-
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\)
-
-