Module net.finmath.lib
Class ShortRateVolatilityModelPiecewiseConstant
- java.lang.Object
-
- net.finmath.montecarlo.interestrate.models.covariance.AbstractShortRateVolatilityModel
-
- net.finmath.montecarlo.interestrate.models.covariance.AbstractShortRateVolatilityModelParametric
-
- net.finmath.montecarlo.interestrate.models.covariance.ShortRateVolatilityModelPiecewiseConstant
-
- All Implemented Interfaces:
Serializable
,ShortRateVolatilityModel
,ShortRateVolatilityModelCalibrateable
,ShortRateVolatilityModelParametric
public class ShortRateVolatilityModelPiecewiseConstant extends AbstractShortRateVolatilityModelParametric implements ShortRateVolatilityModel
Short rate volatility model with a piecewise constant volatility and a piecewise constant mean reversion.- Version:
- 1.0
- Author:
- Christian Fries
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ShortRateVolatilityModelPiecewiseConstant(RandomVariableFactory abstractRandomVariableFactory, TimeDiscretization timeDiscretization, TimeDiscretization volatilityTimeDiscretization, double[] volatility, double[] meanReversion, boolean isVolatilityCalibrateable)
ShortRateVolatilityModelPiecewiseConstant(RandomVariableFactory abstractRandomVariableFactory, TimeDiscretization timeDiscretization, TimeDiscretization volatilityTimeDiscretization, double[] volatility, double[] meanReversion, boolean isVolatilityCalibrateable, boolean isMeanReversionCalibrateable)
ShortRateVolatilityModelPiecewiseConstant(RandomVariableFactory abstractRandomVariableFactory, TimeDiscretization timeDiscretization, TimeDiscretization volatilityTimeDiscretization, RandomVariable[] volatility, RandomVariable[] meanReversion, boolean isVolatilityCalibrateable)
ShortRateVolatilityModelPiecewiseConstant(RandomVariableFactory abstractRandomVariableFactory, TimeDiscretization timeDiscretization, TimeDiscretization volatilityTimeDiscretization, RandomVariable[] volatility, RandomVariable[] meanReversion, boolean isVolatilityCalibrateable, boolean isMeanReversionCalibrateable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
clone()
AbstractShortRateVolatilityModelParametric
getCloneWithModifiedParameters(double[] parameters)
Return an instance of this model using a new set of parameters.AbstractShortRateVolatilityModelParametric
getCloneWithModifiedParameters(RandomVariable[] parameters)
Return an instance of this model using a new set of parameters.RandomVariable
getMeanReversion(int timeIndex)
Returns the value of \( a(t) \) for \( t_{i} \leq t < t_{i+1} \).RandomVariable[]
getParameter()
Get the parameters of determining this parametric volatility model.RandomVariable
getVolatility(double time)
RandomVariable
getVolatility(int timeIndex)
Returns the value of \( \sigma(t) \) for \( t_{i} \leq t < t_{i+1} \).TimeDiscretization
getVolatilityTimeDiscretization()
Returns the time discretization used for the picewise constant volatility and mean reversion.-
Methods inherited from class net.finmath.montecarlo.interestrate.models.covariance.AbstractShortRateVolatilityModelParametric
getCloneCalibrated, getCloneCalibratedLegazy, getParameterAsDouble, toString
-
Methods inherited from class net.finmath.montecarlo.interestrate.models.covariance.AbstractShortRateVolatilityModel
getTimeDiscretization
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.finmath.montecarlo.interestrate.models.covariance.ShortRateVolatilityModel
getTimeDiscretization
-
-
-
-
Constructor Detail
-
ShortRateVolatilityModelPiecewiseConstant
public ShortRateVolatilityModelPiecewiseConstant(RandomVariableFactory abstractRandomVariableFactory, TimeDiscretization timeDiscretization, TimeDiscretization volatilityTimeDiscretization, RandomVariable[] volatility, RandomVariable[] meanReversion, boolean isVolatilityCalibrateable, boolean isMeanReversionCalibrateable)
-
ShortRateVolatilityModelPiecewiseConstant
public ShortRateVolatilityModelPiecewiseConstant(RandomVariableFactory abstractRandomVariableFactory, TimeDiscretization timeDiscretization, TimeDiscretization volatilityTimeDiscretization, double[] volatility, double[] meanReversion, boolean isVolatilityCalibrateable, boolean isMeanReversionCalibrateable)
-
ShortRateVolatilityModelPiecewiseConstant
public ShortRateVolatilityModelPiecewiseConstant(RandomVariableFactory abstractRandomVariableFactory, TimeDiscretization timeDiscretization, TimeDiscretization volatilityTimeDiscretization, double[] volatility, double[] meanReversion, boolean isVolatilityCalibrateable)
-
ShortRateVolatilityModelPiecewiseConstant
public ShortRateVolatilityModelPiecewiseConstant(RandomVariableFactory abstractRandomVariableFactory, TimeDiscretization timeDiscretization, TimeDiscretization volatilityTimeDiscretization, RandomVariable[] volatility, RandomVariable[] meanReversion, boolean isVolatilityCalibrateable)
-
-
Method Detail
-
getVolatility
public RandomVariable getVolatility(int timeIndex)
Description copied from interface:ShortRateVolatilityModel
Returns the value of \( \sigma(t) \) for \( t_{i} \leq t < t_{i+1} \).- Specified by:
getVolatility
in interfaceShortRateVolatilityModel
- Parameters:
timeIndex
- The index \( i \).- Returns:
- the value of \( \sigma(t) \) for \( t_{i} \leq t < t_{i+1} \)
-
getVolatility
public RandomVariable getVolatility(double time)
-
getMeanReversion
public RandomVariable getMeanReversion(int timeIndex)
Description copied from interface:ShortRateVolatilityModel
Returns the value of \( a(t) \) for \( t_{i} \leq t < t_{i+1} \).- Specified by:
getMeanReversion
in interfaceShortRateVolatilityModel
- Parameters:
timeIndex
- The index \( i \).- Returns:
- the value of \( a(t) \) for \( t_{i} \leq t < t_{i+1} \)
-
getParameter
public RandomVariable[] getParameter()
Description copied from class:AbstractShortRateVolatilityModelParametric
Get the parameters of determining this parametric volatility model. The parameters are usually free parameters which may be used in calibration.- Specified by:
getParameter
in interfaceShortRateVolatilityModelParametric
- Specified by:
getParameter
in classAbstractShortRateVolatilityModelParametric
- Returns:
- Parameter vector.
-
clone
public Object clone()
- Specified by:
clone
in classAbstractShortRateVolatilityModelParametric
-
getCloneWithModifiedParameters
public AbstractShortRateVolatilityModelParametric getCloneWithModifiedParameters(RandomVariable[] parameters)
Description copied from class:AbstractShortRateVolatilityModelParametric
Return an instance of this model using a new set of parameters. Note: To improve performance it is admissible to return the same instance of the object given that the parameters have not changed. Models should be immutable.- Specified by:
getCloneWithModifiedParameters
in interfaceShortRateVolatilityModelParametric
- Specified by:
getCloneWithModifiedParameters
in classAbstractShortRateVolatilityModelParametric
- Parameters:
parameters
- The new set of parameters.- Returns:
- An instance of AbstractShortRateVolatilityModel with modified parameters.
-
getCloneWithModifiedParameters
public AbstractShortRateVolatilityModelParametric getCloneWithModifiedParameters(double[] parameters)
Description copied from class:AbstractShortRateVolatilityModelParametric
Return an instance of this model using a new set of parameters. Note: To improve performance it is admissible to return the same instance of the object given that the parameters have not changed. Models should be immutable.- Specified by:
getCloneWithModifiedParameters
in interfaceShortRateVolatilityModelParametric
- Specified by:
getCloneWithModifiedParameters
in classAbstractShortRateVolatilityModelParametric
- Parameters:
parameters
- The new set of parameters.- Returns:
- An instance of AbstractShortRateVolatilityModel with modified parameters.
-
getVolatilityTimeDiscretization
public TimeDiscretization getVolatilityTimeDiscretization()
Returns the time discretization used for the picewise constant volatility and mean reversion.- Returns:
- The volatility discretization.
-
-