java.lang.Object
org.ojalgo.random.process.GeometricBrownianMotion
- All Implemented Interfaces:
RandomProcess<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.
- Author:
- apete
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ojalgo.random.process.RandomProcess
RandomProcess.SimulationResults -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvert(double convertionFactor) static GeometricBrownianMotiongetDistribution(double evaluationPoint) final doubleEquivalent to callingRandomProcess.getDistribution(double)with argumant1.0, and thenDistribution.getExpected().final doublegetLowerConfidenceQuantile(double confidence) The same thing can be achieved by first callingRandomProcess.getDistribution(double)with argumant1.0, and thenContinuousDistribution.getQuantile(double)(but with different input argument).final doubleEquivalent to callingRandomProcess.getDistribution(double)with argumant1.0, and thenDistribution.getStandardDeviation().final doublegetUpperConfidenceQuantile(double confidence) The same thing can be achieved by first callingRandomProcess.getDistribution(double)with argumant1.0, and thenContinuousDistribution.getQuantile(double)(but with different input argument).doublegetValue()final doubleEquivalent to callingRandomProcess.getDistribution(double)with argumant1.0, and thenDistribution.getVariance().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) simulate(int numberOfRealisations, int numberOfSteps, double stepSize) Returns an collection of sample sets.doublestep(double stepSize, double standardGaussianInnovation) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ojalgo.random.process.RandomProcess
simulate
-
Constructor Details
-
GeometricBrownianMotion
public GeometricBrownianMotion(double localDrift, double diffusionFunction)
-
-
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() -
setValue
public void setValue(double newValue) -
step
public double step(double stepSize, double standardGaussianInnovation) -
simulate
public RandomProcess.SimulationResults simulate(int numberOfRealisations, int numberOfSteps, double stepSize) Description copied from interface:RandomProcessReturns an collection of sample sets. The array has numberOfSteps elements, and each sample set has numberOfRealisations samples.- Returns:
- An array of sample sets. The array has aNumberOfSteps elements, and each sample set has aNumberOfRealisations samples.
-
getExpected
public final double getExpected()Equivalent to callingRandomProcess.getDistribution(double)with argumant1.0, and thenDistribution.getExpected(). -
getLowerConfidenceQuantile
public final double getLowerConfidenceQuantile(double confidence) The same thing can be achieved by first callingRandomProcess.getDistribution(double)with argumant1.0, and thenContinuousDistribution.getQuantile(double)(but with different input argument). -
getStandardDeviation
public final double getStandardDeviation()Equivalent to callingRandomProcess.getDistribution(double)with argumant1.0, and thenDistribution.getStandardDeviation(). -
getUpperConfidenceQuantile
public final double getUpperConfidenceQuantile(double confidence) The same thing can be achieved by first callingRandomProcess.getDistribution(double)with argumant1.0, and thenContinuousDistribution.getQuantile(double)(but with different input argument). -
getVariance
public final double getVariance()Equivalent to callingRandomProcess.getDistribution(double)with argumant1.0, and thenDistribution.getVariance().
-