umontreal.iro.lecuyer.stochprocess
Class OrnsteinUhlenbeckProcessEuler
- java.lang.Object
-
- umontreal.iro.lecuyer.stochprocess.StochasticProcess
-
- umontreal.iro.lecuyer.stochprocess.OrnsteinUhlenbeckProcess
-
- umontreal.iro.lecuyer.stochprocess.OrnsteinUhlenbeckProcessEuler
-
public class OrnsteinUhlenbeckProcessEuler extends OrnsteinUhlenbeckProcess
. This class represents an Ornstein-Uhlenbeck process as inOrnsteinUhlenbeckProcess, but the process is generated using the simple Euler scheme where Zj∼N(0, 1). This is a good approximation only for small time intervals tj - tj-1.
-
-
Constructor Summary
Constructors Constructor and Description OrnsteinUhlenbeckProcessEuler(double x0, double alpha, double b, double sigma, NormalGen gen)Here, the normal variate generator is specified directly instead of specifying the stream.OrnsteinUhlenbeckProcessEuler(double x0, double alpha, double b, double sigma, RandomStream stream)Constructor with parameters α = alpha, b, σ = sigma and initial value X(t0) = x0.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description double[]generatePath()Generates a sample path of the process at all observation times, which are provided in array t.doublenextObservation()Generates and returns the next observation at time tj+1 = nextTime.doublenextObservation(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).doublenextObservation(double x, double dt)Generates and returns an observation of the process in dt time units, assuming that the process has value x at the current time.-
Methods inherited from class umontreal.iro.lecuyer.stochprocess.OrnsteinUhlenbeckProcess
generatePath, getAlpha, getB, getGen, getSigma, getStream, setParams, setStream
-
Methods inherited from class umontreal.iro.lecuyer.stochprocess.StochasticProcess
getArrayMappingCounterToIndex, getCurrentObservation, getCurrentObservationIndex, getNbObservationTimes, getObservation, getObservationTimes, getPath, getSubpath, getX0, hasNextObservation, resetStartProcess, setObservationTimes, setObservationTimes, setX0
-
-
-
-
Constructor Detail
-
OrnsteinUhlenbeckProcessEuler
public OrnsteinUhlenbeckProcessEuler(double x0, double alpha, double b, double sigma, RandomStream stream)Constructor with parameters α = alpha, b, σ = sigma and initial value X(t0) = x0. The normal variates Zj will be generated by inversion using the stream stream.
-
OrnsteinUhlenbeckProcessEuler
public OrnsteinUhlenbeckProcessEuler(double x0, double alpha, double b, double sigma, NormalGen gen)Here, the normal variate generator is specified directly instead of specifying the stream. The normal generator gen can use another method than inversion.
-
-
Method Detail
-
nextObservation
public double nextObservation()
Generates and returns the next observation at time tj+1 = nextTime. Assumes the previous observation time is tj defined earlier (either by this method or by setObservationTimes), as well as the value of the previous observation X(tj). Warning: This method will reset the observations time tj+1 for this process to nextTime. The user must make sure that the tj+1 supplied is >= tj.- Overrides:
nextObservationin classOrnsteinUhlenbeckProcess
-
nextObservation
public double nextObservation(double nextTime)
Description copied from class:OrnsteinUhlenbeckProcessGenerates 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). Warning: This method will reset the observations time tj+1 for this process to nextTime. The user must make sure that the tj+1 supplied is >= tj.- Overrides:
nextObservationin classOrnsteinUhlenbeckProcess
-
nextObservation
public double nextObservation(double x, double dt)Generates and returns an observation of the process in dt time units, assuming that the process has value x at the current time. Uses the process parameters specified in the constructor. Note that this method does not affect the sample path of the process stored internally (if any).- Overrides:
nextObservationin classOrnsteinUhlenbeckProcess
-
generatePath
public double[] generatePath()
Generates a sample path of the process at all observation times, which are provided in array t. Note that t[0] should be the observation time of x0, the initial value of the process, and t[] should have at least d + 1 elements (see the setObservationTimes method).- Overrides:
generatePathin classOrnsteinUhlenbeckProcess
-
-
DMelt 3.0 © DataMelt by jWork.ORG