Documentation of 'umontreal.iro.lecuyer.stochprocess.CIRProcessEuler' Java class
CIRProcessEuler
umontreal.iro.lecuyer.stochprocess

Class CIRProcessEuler



  • public class CIRProcessEuler
    extends StochasticProcess
    . This class represents a CIR process as in CIRProcess, but the process is generated using the simple Euler scheme

    X(tj) - X(tj-1) = α(b - X(tj-1))(tj - tj-1) + σ((t_j - t_j-1)X(t_j-1))1/2 Zj

    where ZjN(0, 1). This is a good approximation only for small time intervals tj - tj-1.
    • Constructor Detail

      • CIRProcessEuler

        public CIRProcessEuler(double x0,
                               double alpha,
                               double b,
                               double sigma,
                               RandomStream stream)
        Constructs a new CIRProcessEuler with parameters α = alpha, b, σ = sigma and initial value X(t0) = x0. The normal variates Zj will be generated by inversion using the stream stream.
      • CIRProcessEuler

        public CIRProcessEuler(double x0,
                               double alpha,
                               double b,
                               double sigma,
                               NormalGen gen)
        The normal variate generator gen is specified directly instead of specifying the stream. gen can use another method than inversion.
    • Method Detail

      • nextObservation

        public double nextObservation()
        Description copied from class: StochasticProcess
        Generates and returns the next observation X(tj) of the stochastic process. The processes are usually sampled sequentially, i.e. if the last observation generated was for time tj-1, the next observation returned will be for time tj. In some cases, subclasses extending this abstract class may use non-sequential sampling algorithms (such as bridge sampling). The order of generation of the tj's is then specified by the subclass. All the processes generated using principal components analysis (PCA) do not have this method.
        Overrides:
        nextObservation in class StochasticProcess
      • nextObservation

        public 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). 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.
      • nextObservation

        public 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. 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).
      • generatePath

        public double[] generatePath()
        Description copied from class: StochasticProcess
        Generates, returns, and saves the sample path {X(t0), X(t1),…, X(td)}. It can then be accessed via getPath, getSubpath, or getObservation. The generation method depends on the process type.
        Specified by:
        generatePath in class StochasticProcess
      • setParams

        public void setParams(double x0,
                              double alpha,
                              double b,
                              double sigma)
        Resets the parameters X(t0) = x0, α = alpha, b = b and σ = sigma of the process. Warning: This method will recompute some quantities stored internally, which may be slow if called too frequently.
      • getAlpha

        public double getAlpha()
        Returns the value of α.
      • getB

        public double getB()
        Returns the value of b.
      • getSigma

        public double getSigma()
        Returns the value of σ.
      • getGen

        public NormalGen getGen()
        Returns the normal random variate generator used. The RandomStream used for that generator can be changed via getGen().setStream(stream), for example.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.