|
SSJ V. 2.6.2. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object umontreal.iro.lecuyer.stochprocess.StochasticProcess umontreal.iro.lecuyer.stochprocess.OrnsteinUhlenbeckProcess
public class OrnsteinUhlenbeckProcess
This class represents an Ornstein-Uhlenbeck process {X(t) : t >= 0}, sampled at times 0 = t0 < t1 < ... < td. This process obeys the stochastic differential equation
with initial condition X(0) = x0, where α, b and σ are positive constants, and {B(t), t >= 0} is a standard Brownian motion (with drift 0 and volatility 1). This process is mean-reverting in the sense that it always tends to drift toward its general mean b. The process is generated using the sequential technique where Zj∼N(0, 1). The time intervals tj - tj-1 can be arbitrarily large.
Constructor Summary | |
---|---|
OrnsteinUhlenbeckProcess(double x0,
double alpha,
double b,
double sigma,
NormalGen gen)
Here, the normal variate generator is specified directly instead of specifying the stream. |
|
OrnsteinUhlenbeckProcess(double x0,
double alpha,
double b,
double sigma,
RandomStream stream)
Constructs a new OrnsteinUhlenbeckProcess with parameters α = alpha, b, σ = sigma and initial value X(t0) = x0. |
Method Summary | |
---|---|
double[] |
generatePath()
Generates, returns, and saves the sample path {X(t0), X(t1),…, X(td)}. |
double[] |
generatePath(RandomStream stream)
Same as generatePath(), but first resets the stream to stream. |
double |
getAlpha()
Returns the value of α. |
double |
getB()
Returns the value of b. |
NormalGen |
getGen()
Returns the normal random variate generator used. |
double |
getSigma()
Returns the value of σ. |
RandomStream |
getStream()
Returns the random stream of the normal generator. |
double |
nextObservation()
Generates and returns the next observation X(tj) of the stochastic process. |
double |
nextObservation(double nextTime)
Generates and returns the next observation at time tj+1 = nextTime, using the previous observation time tj defined earlier (either by this method or by setObservationTimes), as well as the value of the previous observation X(tj). |
double |
nextObservation(double x,
double dt)
Generates an observation of the process in dt time units, assuming that the process has value x at the current time. |
void |
setParams(double x0,
double alpha,
double b,
double sigma)
Resets the parameters X(t0) = x0, α = alpha, b = b and σ = sigma of the process. |
void |
setStream(RandomStream stream)
Resets the random stream of the normal generator to stream. |
Methods inherited from class umontreal.iro.lecuyer.stochprocess.StochasticProcess |
---|
getArrayMappingCounterToIndex, getCurrentObservation, getCurrentObservationIndex, getNbObservationTimes, getObservation, getObservationTimes, getPath, getSubpath, getX0, hasNextObservation, resetStartProcess, setObservationTimes, setObservationTimes, setX0 |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OrnsteinUhlenbeckProcess(double x0, double alpha, double b, double sigma, RandomStream stream)
public OrnsteinUhlenbeckProcess(double x0, double alpha, double b, double sigma, NormalGen gen)
Method Detail |
---|
public double nextObservation()
StochasticProcess
nextObservation
in class StochasticProcess
public double nextObservation(double nextTime)
public double nextObservation(double x, double dt)
public double[] generatePath()
StochasticProcess
generatePath
in class StochasticProcess
public double[] generatePath(RandomStream stream)
StochasticProcess
generatePath
in class StochasticProcess
public void setParams(double x0, double alpha, double b, double sigma)
public void setStream(RandomStream stream)
setStream
in class StochasticProcess
public RandomStream getStream()
getStream
in class StochasticProcess
public double getAlpha()
public double getB()
public double getSigma()
public NormalGen getGen()
|
SSJ V. 2.6.2. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |