Class GeometricBrownianMotion
java.lang.Object
org.ojalgo.random.process.AbstractProcess<LogNormal>
org.ojalgo.random.process.SingleValueBasedProcess<LogNormal>
org.ojalgo.random.process.GeometricBrownianMotion
- All Implemented Interfaces:
Process1D.ComponentProcess<LogNormal>, RandomProcess<LogNormal>
public final class GeometricBrownianMotion
extends SingleValueBasedProcess<LogNormal>
implements Process1D.ComponentProcess<LogNormal>
Diffusion process defined by a stochastic differential equation:
dX = r X dt + s X dWA stochastic process is said to follow a geometric Brownian motion if it satisfies this stochastic differential equation.
-
Nested Class Summary
Nested classes/interfaces inherited from interface RandomProcess
RandomProcess.SimulationResults -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final WienerProcessprivate final doubleprivate final double -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateGeometricBrownianMotion(double localDrift, double diffusionFunction) -
Method Summary
Modifier and TypeMethodDescriptionconvert(double convertionFactor) (package private) doubledoStep(double stepSize, double normalisedRandomIncrement) static GeometricBrownianMotiongetDistribution(double evaluationPoint) private doublegetDistributionLocation(double stepSize, double variance) private doublegetDistributionVariance(double stepSize) (package private) doublegetExpected(double stepSize) Expected future value(package private) doublegetLowerConfidenceQuantile(double stepSize, double confidence) (package private) double(package private) doublegetStandardDeviation(double stepSize) (package private) doublegetUpperConfidenceQuantile(double stepSize, double confidence) doublegetValue()(package private) doublegetVariance(double stepSize) static GeometricBrownianMotionmake(double expected, double variance) Assuming initial value = 1.0 and horizon = 1.0.static GeometricBrownianMotionmake(double expected, double variance, double horizon) Assuming initial value = 1.0.static GeometricBrownianMotionmake(double initialValue, double expectedFutureValue, double aVariance, double aHorizon) voidsetValue(double newValue) doublestep(double stepSize, double standardGaussianInnovation) Methods inherited from class SingleValueBasedProcess
getCurrentValue, setCurrentValue, simulateMethods inherited from class AbstractProcess
getExpected, getLowerConfidenceQuantile, getStandardDeviation, getUpperConfidenceQuantile, getVariance, stepMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface RandomProcess
simulate
-
Field Details
-
GENERATOR
-
myDiffusionFunction
private final double myDiffusionFunction -
myLocalDrift
private final double myLocalDrift
-
-
Constructor Details
-
GeometricBrownianMotion
public GeometricBrownianMotion(double localDrift, double diffusionFunction) -
GeometricBrownianMotion
private GeometricBrownianMotion()
-
-
Method Details
-
estimate
- Parameters:
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.
-
make
Assuming initial value = 1.0 and horizon = 1.0. -
make
Assuming initial value = 1.0. -
make
public static GeometricBrownianMotion make(double initialValue, double expectedFutureValue, double aVariance, double aHorizon) - Parameters:
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?
-
convert
- Parameters:
convertionFactor- A step size change factor.
-
getDistribution
- Specified by:
getDistributionin interfaceRandomProcess<LogNormal>- Parameters:
evaluationPoint- How far into the future?- Returns:
- The distribution for the process value at that future time.
-
getValue
public double getValue()- Specified by:
getValuein interfaceProcess1D.ComponentProcess<LogNormal>
-
setValue
public void setValue(double newValue) - Specified by:
setValuein interfaceProcess1D.ComponentProcess<LogNormal>
-
step
public double step(double stepSize, double standardGaussianInnovation) - Specified by:
stepin interfaceProcess1D.ComponentProcess<LogNormal>
-
getDistributionLocation
private double getDistributionLocation(double stepSize, double variance) -
getDistributionVariance
private double getDistributionVariance(double stepSize) -
doStep
double doStep(double stepSize, double normalisedRandomIncrement) - Specified by:
doStepin classAbstractProcess<LogNormal>
-
getExpected
double getExpected(double stepSize) Expected future value- Specified by:
getExpectedin classAbstractProcess<LogNormal>
-
getLowerConfidenceQuantile
double getLowerConfidenceQuantile(double stepSize, double confidence) - Specified by:
getLowerConfidenceQuantilein classAbstractProcess<LogNormal>
-
getNormalisedRandomIncrement
double getNormalisedRandomIncrement()- Specified by:
getNormalisedRandomIncrementin classAbstractProcess<LogNormal>
-
getStandardDeviation
double getStandardDeviation(double stepSize) - Specified by:
getStandardDeviationin classAbstractProcess<LogNormal>
-
getUpperConfidenceQuantile
double getUpperConfidenceQuantile(double stepSize, double confidence) - Specified by:
getUpperConfidenceQuantilein classAbstractProcess<LogNormal>
-
getVariance
double getVariance(double stepSize) - Specified by:
getVariancein classAbstractProcess<LogNormal>
-