Module net.finmath.lib
Class LIBORVolatilityModel
- java.lang.Object
-
- net.finmath.montecarlo.interestrate.models.covariance.LIBORVolatilityModel
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
LIBORVolatilityModelFourParameterExponentialForm,LIBORVolatilityModelFourParameterExponentialFormIntegrated,LIBORVolatilityModelFromGivenMatrix,LIBORVolatilityModelMaturityDependentFourParameterExponentialForm,LIBORVolatilityModelPiecewiseConstant,LIBORVolatilityModelTimeHomogenousPiecewiseConstant,LIBORVolatilityModelTwoParameterExponentialForm
public abstract class LIBORVolatilityModel extends Object implements Serializable
Abstract base class and interface description of a volatility model (as it is used inLIBORCovarianceModelFromVolatilityAndCorrelation). Derive from this class and implement thegetVolatlitymethod. You have to call the constructor of this class to set the time discretizations.- Version:
- 1.0
- Author:
- Christian Fries
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LIBORVolatilityModel(TimeDiscretization timeDiscretization, TimeDiscretization liborPeriodDiscretization)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Objectclone()abstract LIBORVolatilityModelgetCloneWithModifiedData(Map<String,Object> dataModified)Returns a clone of this model where the specified properties have been modified.abstract LIBORVolatilityModelgetCloneWithModifiedParameter(RandomVariable[] parameter)TimeDiscretizationgetLiborPeriodDiscretization()abstract RandomVariable[]getParameter()double[]getParameterAsDouble()TimeDiscretizationgetTimeDiscretization()abstract RandomVariablegetVolatility(int timeIndex, int component)Implement this method to complete the implementation.
-
-
-
Constructor Detail
-
LIBORVolatilityModel
public LIBORVolatilityModel(TimeDiscretization timeDiscretization, TimeDiscretization liborPeriodDiscretization)
- Parameters:
timeDiscretization- The vector of simulation time discretization points.liborPeriodDiscretization- The vector of tenor discretization points.
-
-
Method Detail
-
getParameter
public abstract RandomVariable[] getParameter()
-
getCloneWithModifiedParameter
public abstract LIBORVolatilityModel getCloneWithModifiedParameter(RandomVariable[] parameter)
-
getVolatility
public abstract RandomVariable getVolatility(int timeIndex, int component)
Implement this method to complete the implementation.- Parameters:
timeIndex- The time index (for timeDiscretizationFromArray)component- The libor index (for liborPeriodDiscretization)- Returns:
- A random variable (e.g. as a vector of doubles) representing the volatility for each path.
-
getParameterAsDouble
public double[] getParameterAsDouble()
-
getLiborPeriodDiscretization
public TimeDiscretization getLiborPeriodDiscretization()
- Returns:
- Returns the liborPeriodDiscretization.
-
getTimeDiscretization
public TimeDiscretization getTimeDiscretization()
- Returns:
- Returns the timeDiscretizationFromArray.
-
getCloneWithModifiedData
public abstract LIBORVolatilityModel getCloneWithModifiedData(Map<String,Object> dataModified)
Returns a clone of this model where the specified properties have been modified. Note that there is no guarantee that a model reacts on a specification of a properties in the parameter mapdataModified. If data is provided which is ignored by the model no exception may be thrown. Furthermore the structure of the correlation model has to match changed data. A change of the time discretizations may requires a change in the parameters but this function will just insert the new time discretization without changing the parameters. An exception may not be thrown.- Parameters:
dataModified- Key-value-map of parameters to modify.- Returns:
- A clone of this model (or a new instance of this model if no parameter was modified).
-
-