|
SSJ V. labo. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectumontreal.iro.lecuyer.stochprocess.StochasticProcess
umontreal.iro.lecuyer.stochprocess.MultivariateStochasticProcess
umontreal.iro.lecuyer.stochprocess.MultivariateBrownianMotion
public class MultivariateBrownianMotion
This class represents a multivariate Brownian motion process {X(t) = (X1(t),..., Xc(t)), t >= 0}, sampled at times 0 = t0 < t1 < ... < td. Each vector coordinate is a univariate Brownian motion {Xi(t), t >= 0}, with drift and volatility parameters μi and σi, so it can be written as
where Xi(0) = 0, each Zj, i∼N(0, 1), and each Zj = (Zj, 1,..., Zj, c) has correlation matrix Rz. We write μ = (μ1,..., μc)t, σ = (σ1,..., σc)t, and Σ for the covariance matrix of X(1) - X(0), which equals Σ = σRzσt (so the element (k, l ) or Σ is the element (k, l ) of Rz multiplied by σkσl). The trajectories are sampled by the sequential (or random walk) method.
Constructor Summary | |
---|---|
MultivariateBrownianMotion(int c,
double[] x0,
double[] mu,
double[] sigma,
double[][] corrZ,
NormalGen gen)
Constructs a new MultivariateBrownianMotion with parameters μ = |
|
MultivariateBrownianMotion(int c,
double[] x0,
double[] mu,
double[] sigma,
double[][] corrZ,
RandomStream stream)
Constructs a new MultivariateBrownianMotion with parameters μ = |
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. |
double[] |
generatePath(double[] uniform01)
Same as generatePath() but requires a vector of uniform random numbers which are used to generate the path. |
double[] |
generatePath(RandomStream stream)
Same as generatePath(), but first resets the stream to stream. |
NormalGen |
getGen()
Returns the normal random variate generator used. |
double[] |
getMu()
Returns the vector mu. |
RandomStream |
getStream()
Returns the random stream of the normal generator. |
double[] |
nextObservationVector()
Generates and returns the next observation X(tj) of the multivariate stochastic process in a vector created automatically. |
void |
nextObservationVector(double[] obs)
Generates and returns in obs the next observation X(tj) of the multivariate stochastic process. |
double[] |
nextObservationVector(double[] x,
double dt)
Generates an observation (vector) of the process in dt time units, assuming that the process has (vector) value x at the current time. |
double[] |
nextObservationVector(double nextTime,
double[] obs)
Generates and returns the vector of next observations, at time tj+1 = |
void |
setParams(double[] x0,
double[] mu,
double[] sigma)
Sets the dimension c = |
void |
setParams(int c,
double[] x0,
double[] mu,
double[] sigma,
double[][] corrZ)
Sets the dimension c = |
void |
setStream(RandomStream stream)
Resets the random stream of the normal generator to stream. |
Methods inherited from class umontreal.iro.lecuyer.stochprocess.MultivariateStochasticProcess |
---|
getCurrentObservation, getDimension, getObservation, getObservation, getSubpath, getX0, setObservationTimes |
Methods inherited from class umontreal.iro.lecuyer.stochprocess.StochasticProcess |
---|
getArrayMappingCounterToIndex, getCurrentObservation, getCurrentObservationIndex, getNbObservationTimes, getObservation, getObservationTimes, getPath, getX0, hasNextObservation, nextObservation, resetStartProcess, setObservationTimes, setX0 |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MultivariateBrownianMotion(int c, double[] x0, double[] mu, double[] sigma, double[][] corrZ, RandomStream stream)
RandomStream
stream.
public MultivariateBrownianMotion(int c, double[] x0, double[] mu, double[] sigma, double[][] corrZ, NormalGen gen)
Method Detail |
---|
public void nextObservationVector(double[] obs)
nextObservationVector
in class MultivariateStochasticProcess
public double[] nextObservationVector()
public double[] nextObservationVector(double nextTime, double[] obs)
public double[] nextObservationVector(double[] x, double dt)
public double[] generatePath()
MultivariateStochasticProcess
generatePath
in class MultivariateStochasticProcess
public double[] generatePath(double[] uniform01)
public double[] generatePath(RandomStream stream)
StochasticProcess
generatePath
in class StochasticProcess
public void setParams(int c, double[] x0, double[] mu, double[] sigma, double[][] corrZ)
public void setParams(double[] x0, double[] mu, double[] sigma)
public void setStream(RandomStream stream)
setStream
in class StochasticProcess
public RandomStream getStream()
getStream
in class StochasticProcess
public NormalGen getGen()
public double[] getMu()
|
SSJ V. labo. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |