public class GeometricBrownianMotion extends StochasticProcess
path| Constructor and Description |
|---|
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)).
|
| Modifier and Type | Method and Description |
|---|---|
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. |
getArrayMappingCounterToIndex, getCurrentObservation, getCurrentObservationIndex, getNbObservationTimes, getObservation, getObservationTimes, getPath, getSubpath, getX0, hasNextObservation, setObservationTimes, setX0public 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.).public void setObservationTimes(double[] t,
int d)
StochasticProcesssetObservationTimes in class StochasticProcesspublic double nextObservation()
StochasticProcessnextObservation in class StochasticProcesspublic double[] generatePath()
StochasticProcessgeneratePath in class StochasticProcesspublic double[] generatePath(RandomStream stream)
StochasticProcessgeneratePath in class StochasticProcesspublic void resetStartProcess()
resetStartProcess in class StochasticProcesspublic void setParams(double s0,
double mu,
double sigma)
public void setStream(RandomStream stream)
RandomStream
for the underlying Brownian motion to stream.setStream in class StochasticProcesspublic RandomStream getStream()
RandomStream
for the underlying Brownian motion.getStream in class StochasticProcesspublic double getMu()
public double getSigma()
public BrownianMotion getBrownianMotion()
BrownianMotion object
used to generate the process.To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.