Module ojalgo

Class GeometricBrownianMotion

java.lang.Object
org.ojalgo.random.process.GeometricBrownianMotion
All Implemented Interfaces:
RandomProcess<LogNormal>

public final class GeometricBrownianMotion extends Object
Diffusion process defined by a stochastic differential equation:
 dX = r X dt + s X dW
 
A stochastic process is said to follow a geometric Brownian motion if it satisfies this stochastic differential equation.
Author:
apete
  • Constructor Details

    • GeometricBrownianMotion

      public GeometricBrownianMotion(double localDrift, double diffusionFunction)
  • Method Details

    • estimate

      public static GeometricBrownianMotion estimate(Access1D<?> seriesOfSamples, double samplePeriod)
      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

      public static GeometricBrownianMotion make(double expected, double variance)
      Assuming initial value = 1.0 and horizon = 1.0.
    • make

      public static GeometricBrownianMotion make(double expected, double variance, double horizon)
      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

      public GeometricBrownianMotion convert(double convertionFactor)
      Parameters:
      convertionFactor - A step size change factor.
    • getDistribution

      public LogNormal getDistribution(double evaluationPoint)
      Specified by:
      getDistribution in interface RandomProcess<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: RandomProcess
      Returns 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 calling RandomProcess.getDistribution(double) with argumant 1.0, and then Distribution.getExpected().
    • getLowerConfidenceQuantile

      public final 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).
    • getStandardDeviation

      public final double getStandardDeviation()
      Equivalent to calling RandomProcess.getDistribution(double) with argumant 1.0, and then Distribution.getStandardDeviation().
    • getUpperConfidenceQuantile

      public final 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).
    • getVariance

      public final double getVariance()
      Equivalent to calling RandomProcess.getDistribution(double) with argumant 1.0, and then Distribution.getVariance().