SSJ
V. labo.

umontreal.iro.lecuyer.stochprocess
Class MultivariateGeometricBrownianMotion

java.lang.Object
  extended by umontreal.iro.lecuyer.stochprocess.StochasticProcess
      extended by umontreal.iro.lecuyer.stochprocess.MultivariateStochasticProcess
          extended by umontreal.iro.lecuyer.stochprocess.MultivariateGeometricBrownianMotion

public class MultivariateGeometricBrownianMotion
extends MultivariateStochasticProcess

This class is a multivariate version of GeometricBrownianMotion. It represents a multivariate GBM process {S(t) = (S1(t),..., Sc(t)), t >= 0}, which can be written as

Si(t) = Si(0)exp[Xi(t)],

where X(t) = (X1(t),..., Xc(t)) is a multivariate Brownian motion. The GBM process is simulated by simulating the BM process X (which is stored internally) and taking the exponential.


Constructor Summary
MultivariateGeometricBrownianMotion(int c, double[] x0, double[] mu, double[] sigma, MultivariateBrownianMotion mbm)
          Constructs a new MultivariateGeometricBrownianMotion with parameters μ = mu, σ = sigma, and S(t0) = x0, using mbm as the underlying MultivariateBrownianMotion.
 
Method Summary
 double[] generatePath()
          Generates, returns, and saves the sample path {X(t0),X(t1),…,X(td)}, which can then be accessed via getPath, getSubpath, or getObservation.
 MultivariateBrownianMotion getBrownianMotion()
          Returns a reference to the MultivariateBrownianMotion object used to generate the process.
 NormalGen getGen()
          Returns the normal random variate generator used.
 RandomStream getStream()
          Returns the random stream for the underlying Brownian motion.
 double[] nextObservationVector()
           
 void nextObservationVector(double[] obs)
          Generates and returns the vector of next observations
 void resetStartProcess()
          Same as in StochasticProcess, but also invokes resetStartProcess for the underlying BrownianMotion object.
 void setObservationTimes(double[] t, int d)
          Sets the observation times of the MultivariateGeometricBrownianMotion, but also those of the inner MultivariateBrownianMotion.
 void setParams(int c, double[] x0, double[] mu, double[] sigma)
          Sets the parameters S(t0) = x0, μ = mu and σ = sigma of the process.
 void setStream(RandomStream stream)
          Resets the random stream for the underlying Brownian motion to stream.
 
Methods inherited from class umontreal.iro.lecuyer.stochprocess.MultivariateStochasticProcess
getCurrentObservation, getDimension, getObservation, getObservation, getSubpath, getX0
 
Methods inherited from class umontreal.iro.lecuyer.stochprocess.StochasticProcess
generatePath, getArrayMappingCounterToIndex, getCurrentObservation, getCurrentObservationIndex, getNbObservationTimes, getObservation, getObservationTimes, getPath, getX0, hasNextObservation, nextObservation, setObservationTimes, setX0
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultivariateGeometricBrownianMotion

public MultivariateGeometricBrownianMotion(int c,
                                           double[] x0,
                                           double[] mu,
                                           double[] sigma,
                                           MultivariateBrownianMotion mbm)
Constructs a new MultivariateGeometricBrownianMotion with parameters μ = mu, σ = sigma, and S(t0) = x0, using mbm as the underlying MultivariateBrownianMotion. The parameters of mbm are automatically reset to μ - σ2/2 and σ, regardless of the original parameters of mbm. The correlation structure is determined by the underlying MultivariateBrownianMotion. The observation times are the same as those of mbm. The generation method depends on that of mbm (sequential, bridge sampling, PCA, etc.).

Method Detail

setObservationTimes

public void setObservationTimes(double[] t,
                                int d)
Sets the observation times of the MultivariateGeometricBrownianMotion, but also those of the inner MultivariateBrownianMotion.

Overrides:
setObservationTimes in class MultivariateStochasticProcess

nextObservationVector

public double[] nextObservationVector()

nextObservationVector

public void nextObservationVector(double[] obs)
Generates and returns the vector of next observations

Specified by:
nextObservationVector in class MultivariateStochasticProcess

generatePath

public double[] generatePath()
Description copied from class: MultivariateStochasticProcess
Generates, returns, and saves the sample path {X(t0),X(t1),…,X(td)}, which can then be accessed via getPath, getSubpath, or getObservation. The generation method depends on the process type. If path[] denotes the returned array, then path[cj + i-1] contains Xi(tj) for j = 0,..., d and i = 1,..., c.

Specified by:
generatePath in class MultivariateStochasticProcess

resetStartProcess

public void resetStartProcess()
Same as in StochasticProcess, but also invokes resetStartProcess for the underlying BrownianMotion object.

Overrides:
resetStartProcess in class StochasticProcess

setParams

public void setParams(int c,
                      double[] x0,
                      double[] mu,
                      double[] sigma)
Sets the parameters S(t0) = x0, μ = mu and σ = sigma of the process. Warning: This method will recompute some quantities stored internally, which may be slow if called repeatedly.


setStream

public void setStream(RandomStream stream)
Resets the random stream for the underlying Brownian motion to stream.

Specified by:
setStream in class StochasticProcess

getStream

public RandomStream getStream()
Returns the random stream for the underlying Brownian motion.

Specified by:
getStream in class StochasticProcess

getGen

public NormalGen getGen()
Returns the normal random variate generator used.


getBrownianMotion

public MultivariateBrownianMotion getBrownianMotion()
Returns a reference to the MultivariateBrownianMotion object used to generate the process.


SSJ
V. labo.

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