org.ojalgo.random.process
Class DiffusionProcess

java.lang.Object
  extended by org.ojalgo.random.process.DiffusionProcess
All Implemented Interfaces:
RandomProcess

public class DiffusionProcess
extends Object
implements RandomProcess

Diffusion process defined by a stochastic differential equation dX = r X dt + s X dW

Author:
apete

Constructor Summary
DiffusionProcess(double aLocalDrift, double aDiffusionFunction)
           
DiffusionProcess(double aReturn, double aVariance, double aHorizon)
           
 
Method Summary
 DiffusionProcess createNewWithChangedStepSize(double aConvertionFactor)
           
static DiffusionProcess estimate(TimeInMillisSeries<?> aSeries, TimeUnit aTimeUnit)
           
 double getCurrentValue()
           
 double getDeviationValue(double aHorizon)
           
 double getDiffusionFunction()
           
 double getExpected(double aHorizon)
          Expected relative change (+/- some percentage)
 double getExpectedValue(double aHorizon)
           
 double getLocalDrift()
           
 double getStandardDeviation(double aHorizon)
           
 double getVariance(double aHorizon)
           
 void setCurrentValue(double aCurrentValue)
           
 void setDiffusionFunction(double aDiffusionFunction)
           
 void setExpected(double aReturn, double aHorizon)
           
 void setLocalDrift(double aLocalDrift)
           
 void setStandardDeviation(double aStandardDeviation, double aHorizon)
          Will update both the diffusion function and the local drift.
 void setVariance(double aVariance, double aHorizon)
          Will update both the diffusion function and the local drift.
 double step()
          Default step count is 1.0.
 double step(double aStepCount)
          If the implementing class maintains state, the current value should be updated when calling this method.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiffusionProcess

public DiffusionProcess(double aLocalDrift,
                        double aDiffusionFunction)

DiffusionProcess

public DiffusionProcess(double aReturn,
                        double aVariance,
                        double aHorizon)
Method Detail

estimate

public static DiffusionProcess estimate(TimeInMillisSeries<?> aSeries,
                                        TimeUnit aTimeUnit)
Parameters:
aSeries - A series of observations, each with a timestamp, that should be evenly spaced.
aTimeUnit - You have to specify with what unit the DiffusionProcess will meassure time.

createNewWithChangedStepSize

public DiffusionProcess createNewWithChangedStepSize(double aConvertionFactor)

getCurrentValue

public double getCurrentValue()

getDeviationValue

public double getDeviationValue(double aHorizon)

getDiffusionFunction

public double getDiffusionFunction()

getExpected

public double getExpected(double aHorizon)
Expected relative change (+/- some percentage)


getExpectedValue

public double getExpectedValue(double aHorizon)

getLocalDrift

public double getLocalDrift()

getStandardDeviation

public double getStandardDeviation(double aHorizon)

getVariance

public double getVariance(double aHorizon)

setCurrentValue

public void setCurrentValue(double aCurrentValue)

setDiffusionFunction

public void setDiffusionFunction(double aDiffusionFunction)

setExpected

public void setExpected(double aReturn,
                        double aHorizon)

setLocalDrift

public void setLocalDrift(double aLocalDrift)

setStandardDeviation

public void setStandardDeviation(double aStandardDeviation,
                                 double aHorizon)
Will update both the diffusion function and the local drift.

See Also:
getDiffusionFunction(), getLocalDrift()

setVariance

public void setVariance(double aVariance,
                        double aHorizon)
Will update both the diffusion function and the local drift.

See Also:
getDiffusionFunction(), getLocalDrift()

step

public double step()
Description copied from interface: RandomProcess
Default step count is 1.0.

Specified by:
step in interface RandomProcess

step

public double step(double aStepCount)
Description copied from interface: RandomProcess
If the implementing class maintains state, the current value should be updated when calling this method.

Specified by:
step in interface RandomProcess