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 convert(double aConvertionFactor)
           
 DiffusionProcess createNewWithChangedStepSize(double aConvertionFactor)
          Deprecated. v30 Use convert(double) instead
static DiffusionProcess estimate(SampleSet aSampleSet, long aStepSize, CalendarDateUnit aTimeUnit)
           
static DiffusionProcess estimate(TimeInMillisSeries<?> aSeries, CalendarDateUnit aTimeUnit)
           
 double getCurrentValue()
          If the implementing class maintains state, the current value should be updated when calling the RandomProcess.step() method.
 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 size is 1.0.
 double step(double aStepSize)
           
 
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(SampleSet aSampleSet,
                                        long aStepSize,
                                        CalendarDateUnit aTimeUnit)
Parameters:
aSampleSet - Some sampled data
aStepSize - The number of millis inbetween each sample
aTimeUnit - You have to specify with what unit the process will meassure time.

estimate

public static DiffusionProcess estimate(TimeInMillisSeries<?> aSeries,
                                        CalendarDateUnit 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 process will meassure time.

convert

public DiffusionProcess convert(double aConvertionFactor)
Parameters:
aConvertionFactor - A step size change factor.

createNewWithChangedStepSize

@Deprecated
public DiffusionProcess createNewWithChangedStepSize(double aConvertionFactor)
Deprecated. v30 Use convert(double) instead


getCurrentValue

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

Specified by:
getCurrentValue in interface RandomProcess

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 size is 1.0.

Specified by:
step in interface RandomProcess
Returns:
A process change value

step

public double step(double aStepSize)
Specified by:
step in interface RandomProcess
Returns:
A process change value