public class OUSim extends Object implements RandomNumberGenerator
Constructor and 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.
|
Modifier and Type | Method and Description |
---|---|
double |
dt()
Get the time interval \(\delta_t\) of this generator.
|
OUProcess |
getProcess()
Get the underlying OU process of this generator.
|
double |
nextDouble()
Get the next random
double . |
void |
seed(long... seeds)
Seed the random number/vector/scenario generator to produce repeatable experiments.
|
public OUSim(OUProcess ou, double dt, double x0, RandomStandardNormalGenerator rng)
ou
- the underlying OU processdt
- the time interval \(\delta_t\)x0
- the starting valuerng
- the standard Gaussian innovation generatorpublic OUSim(OUProcess ou, double dt, double x0)
StandardNormalRNG
is used for generating i.i.d
innovations.ou
- the underlying OU processdt
- the time interval \(\delta_t\)x0
- the starting valuepublic OUSim(OUProcess ou, double dt)
StandardNormalRNG
is used for generating i.i.d innovations.ou
- the underlying OU processdt
- the time interval \(\delta_t\)public OUSim(OUProcess ou)
StandardNormalRNG
is used for generating i.i.d innovations.ou
- the underlying OU processpublic double nextDouble()
RandomNumberGenerator
double
.nextDouble
in interface RandomNumberGenerator
public void seed(long... seeds)
Seedable
public OUProcess getProcess()
public double dt()
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.