|
SSJ V. 2.6. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object umontreal.iro.lecuyer.stochprocess.StochasticProcess umontreal.iro.lecuyer.stochprocess.GeometricBrownianMotion
public class GeometricBrownianMotion
. Represents a geometric Brownian motion (GBM) process {S(t), t >= 0}, which evolves according to the stochastic differential equation
where μ and σ are the drift and volatility parameters, and {B(t), t >= 0} is a standard Brownian motion (for which B(t)∼N(0, t)). This process can also be written as the exponential of a Brownian motion: where X(t) = (μ - σ2/2)t + σtB(t). The GBM process is simulated by simulating the BM process X and taking the exponential. This BM process is stored internally.
Constructor Summary | |
---|---|
GeometricBrownianMotion(double s0,
double mu,
double sigma,
BrownianMotion bm)
Constructs a new GeometricBrownianMotion with parameters μ = BrownianMotion . |
|
GeometricBrownianMotion(double s0,
double mu,
double sigma,
RandomStream stream)
Same as GeometricBrownianMotion (s0, mu, sigma, new BrownianMotion (0.0, 0.0, 1.0, stream)). |
Method Summary | |
---|---|
double[] |
generatePath()
Generates, returns, and saves the sample path {X(t0), X(t1),…, X(td)}. |
double[] |
generatePath(RandomStream stream)
Same as generatePath(), but first resets the stream to stream. |
BrownianMotion |
getBrownianMotion()
Returns a reference to the BrownianMotion object
used to generate the process. |
NormalGen |
getGen()
Returns the NormalGen used. |
double |
getMu()
Returns the value of μ. |
double |
getSigma()
Returns the value of σ. |
RandomStream |
getStream()
Returns the RandomStream
for the underlying Brownian motion. |
double |
nextObservation()
Generates and returns the next observation X(tj) of the stochastic process. |
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 process to a copy of T, with t0 = T[0] and td = T[d]. |
void |
setParams(double s0,
double mu,
double sigma)
Sets the parameters S(t0) = |
void |
setStream(RandomStream stream)
Resets the RandomStream
for the underlying Brownian motion to stream. |
Methods inherited from class umontreal.iro.lecuyer.stochprocess.StochasticProcess |
---|
getArrayMappingCounterToIndex, getCurrentObservation, getCurrentObservationIndex, getNbObservationTimes, getObservation, getObservationTimes, getPath, getSubpath, getX0, hasNextObservation, setObservationTimes, setX0 |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GeometricBrownianMotion(double s0, double mu, double sigma, RandomStream stream)
public GeometricBrownianMotion(double s0, double mu, double sigma, BrownianMotion bm)
BrownianMotion
.
The parameters of bm are automatically reset to
μ - σ2/2 and σ, regardless of the original parameters
of bm.
The observation times are the same as those of bm. The generation
method depends on that of bm (sequential, bridge sampling, PCA, etc.).
Method Detail |
---|
public void setObservationTimes(double[] t, int d)
StochasticProcess
setObservationTimes
in class StochasticProcess
public double nextObservation()
StochasticProcess
nextObservation
in class StochasticProcess
public double[] generatePath()
StochasticProcess
generatePath
in class StochasticProcess
public double[] generatePath(RandomStream stream)
StochasticProcess
generatePath
in class StochasticProcess
public void resetStartProcess()
resetStartProcess
in class StochasticProcess
public void setParams(double s0, double mu, double sigma)
public void setStream(RandomStream stream)
RandomStream
for the underlying Brownian motion to stream.
setStream
in class StochasticProcess
public RandomStream getStream()
RandomStream
for the underlying Brownian motion.
getStream
in class StochasticProcess
public double getMu()
public double getSigma()
public NormalGen getGen()
NormalGen
used.
public BrownianMotion getBrownianMotion()
BrownianMotion
object
used to generate the process.
|
SSJ V. 2.6. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |