Package net.finmath.montecarlo.model
Class AbstractProcessModel
- java.lang.Object
-
- net.finmath.montecarlo.model.AbstractProcessModel
-
- All Implemented Interfaces:
ProcessModel
- Direct Known Subclasses:
BachelierModel,BlackScholesModel,BlackScholesModelWithCurves,DisplacedLognomalModelExperimental,HestonModel,HullWhiteModel,HullWhiteModelWithConstantCoeff,HullWhiteModelWithDirectSimulation,HullWhiteModelWithShiftExtension,InhomogeneousDisplacedLognomalModel,InhomogenousBachelierModel,LIBORMarketModelFromCovarianceModel,LIBORMarketModelStandard,LIBORMarketModelWithTenorRefinement,MertonModel,MonteCarloMultiAssetBlackScholesModel,VarianceGammaModel
public abstract class AbstractProcessModel extends Object implements ProcessModel
This class is an abstract base class to implement a model provided to an MonteCarloProcessFromProcessModel. Manages the delegation to MonteCarloProcess. For details seeProcessModel.- Version:
- 1.3
- Author:
- Christian Fries
- See Also:
The interface definition contains more details.
-
-
Constructor Summary
Constructors Constructor Description AbstractProcessModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description RandomVariable[]getInitialValue()Returns the initial value of the model.RandomVariablegetMonteCarloWeights(int timeIndex)Deprecated.intgetNumberOfFactors()Returns the number of factors m, i.e., the number of independent Brownian drivers.MonteCarloProcessgetProcess()Deprecated.RandomVariablegetProcessValue(int timeIndex, int componentIndex)Deprecated.LocalDateTimegetReferenceDate()Returns the model's date corresponding to the time discretization's \( t = 0 \).doublegetTime(int timeIndex)Return the simulation time for a given time index.TimeDiscretizationgetTimeDiscretization()Get the time discretization of the model (simulation time).intgetTimeIndex(double time)Return the time index associated for the given simulation time.voidsetProcess(MonteCarloProcess process)Deprecated.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.finmath.montecarlo.model.ProcessModel
applyStateSpaceTransform, applyStateSpaceTransformInverse, getCloneWithModifiedData, getDrift, getDrift, getFactorLoading, getFactorLoading, getInitialState, getInitialState, getNumberOfComponents, getNumeraire, getNumeraire, getRandomVariableForConstant
-
-
-
-
Method Detail
-
getInitialValue
public RandomVariable[] getInitialValue()
Returns the initial value of the model.- Returns:
- The initial value of the model.
-
getReferenceDate
public LocalDateTime getReferenceDate()
Description copied from interface:ProcessModelReturns the model's date corresponding to the time discretization's \( t = 0 \). Note: Currently not all models provide a reference date. This will change in future versions.- Specified by:
getReferenceDatein interfaceProcessModel- Returns:
- The model's date corresponding to the time discretization's \( t = 0 \).
-
setProcess
@Deprecated public void setProcess(MonteCarloProcess process)
Deprecated.Description copied from interface:ProcessModelSet the numerical scheme used to generate the stochastic process. The model needs the numerical scheme to calculate, e.g., the numeraire.- Specified by:
setProcessin interfaceProcessModel- Parameters:
process- The process.
-
getProcess
@Deprecated public MonteCarloProcess getProcess()
Deprecated.Description copied from interface:ProcessModelGet the numerical scheme used to generate the stochastic process. The model needs the numerical scheme to calculate, e.g., the numeraire.- Specified by:
getProcessin interfaceProcessModel- Returns:
- the process
-
getNumberOfFactors
public int getNumberOfFactors()
Description copied from interface:ProcessModelReturns the number of factors m, i.e., the number of independent Brownian drivers.- Specified by:
getNumberOfFactorsin interfaceProcessModel- Returns:
- The number of factors.
-
getProcessValue
@Deprecated public RandomVariable getProcessValue(int timeIndex, int componentIndex) throws CalculationException
Deprecated.- Parameters:
timeIndex- The time index of evaluation time (using this models time discretization)componentIndex- The component of the process vector- Returns:
- Process realization as a random variable
- Throws:
CalculationException- Thrown if the valuation fails, specific cause may be available via thecause()method.- See Also:
Process.getProcessValue(int, int)
-
getMonteCarloWeights
@Deprecated public RandomVariable getMonteCarloWeights(int timeIndex) throws CalculationException
Deprecated.- Parameters:
timeIndex- The time index of evaluation time (using this models time discretization)- Returns:
- A random variable representing the Monte-Carlo probabilities.
- Throws:
CalculationException- Thrown if the valuation fails, specific cause may be available via thecause()method.- See Also:
Process.getMonteCarloWeights(int)
-
getTimeDiscretization
public final TimeDiscretization getTimeDiscretization()
Get the time discretization of the model (simulation time).- Specified by:
getTimeDiscretizationin interfaceProcessModel- Returns:
- The time discretization of the model (simulation time).
- See Also:
MonteCarloProcessFromProcessModel.getTimeDiscretization()
-
getTime
public final double getTime(int timeIndex)
Return the simulation time for a given time index.- Parameters:
timeIndex- Time index- Returns:
- Returns the time for a given time index.
- See Also:
MonteCarloProcessFromProcessModel.getTime(int)
-
getTimeIndex
public final int getTimeIndex(double time)
Return the time index associated for the given simulation time.- Parameters:
time- A given time.- Returns:
- The time index corresponding to the given time.
- See Also:
MonteCarloProcessFromProcessModel.getTimeIndex(double)
-
-