public final class GeometricBrownianMotion extends Object
dX = r X dt + s X dWA stochastic process is said to follow a geometric Brownian motion if it satisfies this stochastic differential equation.
RandomProcess.SimulationResults
Constructor and Description |
---|
GeometricBrownianMotion(double localDrift,
double diffusionFunction) |
Modifier and Type | Method and Description |
---|---|
boolean |
addObservation(Double x,
double y) |
GeometricBrownianMotion |
convert(double convertionFactor) |
static GeometricBrownianMotion |
estimate(Access1D<?> seriesOfSamples,
double samplePeriod) |
LogNormal |
getDistribution(double evaluationPoint) |
double |
getExpected()
Equivalent to calling
RandomProcess.getDistribution(double) with argumant 1.0 , and
then Distribution.getExpected() . |
double |
getLowerConfidenceQuantile(double confidence)
The same thing can be achieved by first calling
RandomProcess.getDistribution(double) with
argumant 1.0 , and then ContinuousDistribution.getQuantile(double) (but with
different input argument). |
protected double |
getNormalisedRandomIncrement() |
double |
getStandardDeviation()
Equivalent to calling
RandomProcess.getDistribution(double) with argumant 1.0 , and
then Distribution.getStandardDeviation() . |
double |
getUpperConfidenceQuantile(double confidence)
The same thing can be achieved by first calling
RandomProcess.getDistribution(double) with
argumant 1.0 , and then ContinuousDistribution.getQuantile(double) (but with
different input argument). |
double |
getValue() |
double |
getVariance()
Equivalent to calling
RandomProcess.getDistribution(double) with argumant 1.0 , and
then Distribution.getVariance() . |
static GeometricBrownianMotion |
make(double expected,
double variance)
Assuming initial value = 1.0 and horizon = 1.0.
|
static GeometricBrownianMotion |
make(double expected,
double variance,
double horizon)
Assuming initial value = 1.0.
|
static GeometricBrownianMotion |
make(double initialValue,
double expectedFutureValue,
double aVariance,
double aHorizon) |
protected void |
setObservations(Collection<? extends ComparableToDouble<Double>> c) |
void |
setValue(double newValue) |
RandomProcess.SimulationResults |
simulate(int numberOfRealisations,
int numberOfSteps,
double stepSize) |
protected double |
step(double currentValue,
double stepSize,
double normalisedRandomIncrement) |
public GeometricBrownianMotion(double localDrift, double diffusionFunction)
public static GeometricBrownianMotion estimate(Access1D<?> seriesOfSamples, double samplePeriod)
seriesOfSamples
- A series of samples, evenly spaced in time.samplePeriod
- The amount of time (in which ever unit you prefer) between each sample in the
series.public static GeometricBrownianMotion make(double expected, double variance)
public static GeometricBrownianMotion make(double expected, double variance, double horizon)
public static GeometricBrownianMotion make(double initialValue, double expectedFutureValue, double aVariance, double aHorizon)
initialValue
- The process initial value.expectedFutureValue
- An expected value (sometime in the future).aVariance
- The variance of that future value.aHorizon
- When do you expect that value?public GeometricBrownianMotion convert(double convertionFactor)
convertionFactor
- A step size change factor.public LogNormal getDistribution(double evaluationPoint)
evaluationPoint
- How far into the future?protected double getNormalisedRandomIncrement()
protected double step(double currentValue, double stepSize, double normalisedRandomIncrement)
public final boolean addObservation(Double x, double y)
public final double getExpected()
RandomProcess.getDistribution(double)
with argumant 1.0
, and
then Distribution.getExpected()
.public final double getLowerConfidenceQuantile(double confidence)
RandomProcess.getDistribution(double)
with
argumant 1.0
, and then ContinuousDistribution.getQuantile(double)
(but with
different input argument).public final double getStandardDeviation()
RandomProcess.getDistribution(double)
with argumant 1.0
, and
then Distribution.getStandardDeviation()
.public final double getUpperConfidenceQuantile(double confidence)
RandomProcess.getDistribution(double)
with
argumant 1.0
, and then ContinuousDistribution.getQuantile(double)
(but with
different input argument).public final double getValue()
public final double getVariance()
RandomProcess.getDistribution(double)
with argumant 1.0
, and
then Distribution.getVariance()
.public final void setValue(double newValue)
public final RandomProcess.SimulationResults simulate(int numberOfRealisations, int numberOfSteps, double stepSize)
simulate
in interface RandomProcess<D extends Distribution>
protected final void setObservations(Collection<? extends ComparableToDouble<Double>> c)
Copyright © 2019 Optimatika. All rights reserved.