SSJ
V. 2.6.

umontreal.iro.lecuyer.stochprocess
Class BrownianMotionBridge

java.lang.Object
  extended by umontreal.iro.lecuyer.stochprocess.StochasticProcess
      extended by umontreal.iro.lecuyer.stochprocess.BrownianMotion
          extended by umontreal.iro.lecuyer.stochprocess.BrownianMotionBridge

public class BrownianMotionBridge
extends BrownianMotion

Represents a Brownian motion process {X(t) : t >= 0} sampled using the bridge sampling technique (see for example). This technique generates first the value X(td) at the last observation time, then the value at time td/2 (or the nearest integer), then the values at time td/4 and at time t3d/4 (or the nearest integers), and so on. If the process has already been sampled at times ti < tk but not in between, the next sampling point in that interval will be tj where j = floor((i + k)/2). For example, if the sampling times used are { t0, t1, t2, t3, t4, t5}, then the observations are generated in the following order: X(t5), X(t2), X(t1), X(t3), X(t4).

Warning: Both the generatePath and the nextObservation methods from BrownianMotion are modified to use the bridge method. In the case of nextObservation, the user should understand that the observations returned are not ordered chronologically. However they will be once an entire path is generated and the observations are read from the internal array (referenced by the getPath method) that contains them.

The method nextObservation(double nextTime) differs from that of the class BrownianMotion in that nextTime represents the next observation time of the Brownian bridge. However, the ti supplied must still be non-decreasing with i.

Note also that, if the path is not entirely generated before being read from this array, there will be ``pollution'' from the previous path generated, and the observations will not represent a sample path of this process.


Constructor Summary
BrownianMotionBridge(double x0, double mu, double sigma, NormalGen gen)
          Constructs a new BrownianMotionBridge with parameters μ = mu, σ = sigma and initial value X(t0) = x0.
BrownianMotionBridge(double x0, double mu, double sigma, RandomStream stream)
          Constructs a new BrownianMotionBridge with parameters μ = mu, σ = 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(double[] uniform01)
          Same as generatePath(), but a vector of uniform random numbers must be provided to the method.
 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.
 void resetStartProcess()
          Resets the observation counter to its initial value j = 0, so that the current observation X(tj) becomes X(t0).
 
Methods inherited from class umontreal.iro.lecuyer.stochprocess.BrownianMotion
generatePath, getGen, getMu, getSigma, getStream, nextObservation, setParams, setStream
 
Methods inherited from class umontreal.iro.lecuyer.stochprocess.StochasticProcess
getArrayMappingCounterToIndex, getCurrentObservation, getCurrentObservationIndex, getNbObservationTimes, getObservation, getObservationTimes, getPath, getSubpath, getX0, hasNextObservation, setObservationTimes, setObservationTimes, setX0
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BrownianMotionBridge

public BrownianMotionBridge(double x0,
                            double mu,
                            double sigma,
                            RandomStream stream)
Constructs a new BrownianMotionBridge with parameters μ = mu, σ = sigma and initial value X(t0) = x0. The normal variates will be generated by inversion using the RandomStream stream.


BrownianMotionBridge

public BrownianMotionBridge(double x0,
                            double mu,
                            double sigma,
                            NormalGen gen)
Constructs a new BrownianMotionBridge with parameters μ = mu, σ = sigma and initial value X(t0) = x0. The normal variates will be generated by the NormalGen gen.

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 BrownianMotion

nextObservation

public double nextObservation(double nextTime)
Description copied from class: BrownianMotion
Generates and returns the next observation at time tj+1 = nextTime. It uses 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:
nextObservation in class BrownianMotion

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.

Overrides:
generatePath in class BrownianMotion

generatePath

public double[] generatePath(double[] uniform01)
Description copied from class: BrownianMotion
Same as generatePath(), but a vector of uniform random numbers must be provided to the method. These uniform random numbers are used to generate the path.

Overrides:
generatePath in class BrownianMotion

resetStartProcess

public void resetStartProcess()
Description copied from class: StochasticProcess
Resets the observation counter to its initial value j = 0, so that the current observation X(tj) becomes X(t0). This method should be invoked before generating observations sequentially one by one via nextObservation, for a new sample path.

Overrides:
resetStartProcess in class StochasticProcess

SSJ
V. 2.6.

To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.