Module net.finmath.lib
Class LIBORVolatilityModelFromGivenMatrix
java.lang.Object
net.finmath.montecarlo.interestrate.models.covariance.LIBORVolatilityModel
net.finmath.montecarlo.interestrate.models.covariance.LIBORVolatilityModelFromGivenMatrix
- All Implemented Interfaces:
Serializable
Implements a simple volatility model using given piece-wise constant values on
a given discretization grid.
- Version:
- 1.0
- Author:
- Christian Fries
- See Also:
- Serialized Form
-
Constructor Summary
ConstructorsConstructorDescriptionLIBORVolatilityModelFromGivenMatrix(RandomVariableFactory randomVariableFactory, TimeDiscretization timeDiscretization, TimeDiscretization liborPeriodDiscretization, double[][] volatility)Creates a simple volatility model using given piece-wise constant values on a given discretization grid.LIBORVolatilityModelFromGivenMatrix(RandomVariableFactory randomVariableFactory, TimeDiscretization timeDiscretization, TimeDiscretization liborPeriodDiscretization, double[][] volatility, boolean isCalibrateable)Creates a simple volatility model using given piece-wise constant values on a given discretization grid.LIBORVolatilityModelFromGivenMatrix(RandomVariableFactory randomVariableFactory, TimeDiscretization timeDiscretization, TimeDiscretization liborPeriodDiscretization, RandomVariable[][] volatility, boolean isCalibrateable)Creates a simple volatility model using given piece-wise constant values on a given discretization grid.LIBORVolatilityModelFromGivenMatrix(TimeDiscretization timeDiscretization, TimeDiscretization liborPeriodDiscretization, double[][] volatility)Creates a simple volatility model using given piece-wise constant values on a given discretization grid.LIBORVolatilityModelFromGivenMatrix(TimeDiscretization timeDiscretization, TimeDiscretization liborPeriodDiscretization, RandomVariable[][] volatility)Creates a simple volatility model using given piece-wise constant values on a given discretization grid.LIBORVolatilityModelFromGivenMatrix(TimeDiscretization timeDiscretization, TimeDiscretization liborPeriodDiscretization, RandomVariable[][] volatility, boolean isCalibrateable)Creates a simple volatility model using given piece-wise constant values on a given discretization grid. -
Method Summary
Modifier and TypeMethodDescriptionclone()getCloneWithModifiedData(Map<String,Object> dataModified)Returns a clone of this model where the specified properties have been modified.getCloneWithModifiedParameter(RandomVariable[] parameter)getVolatility(int timeIndex, int component)Implement this method to complete the implementation.Methods inherited from class net.finmath.montecarlo.interestrate.models.covariance.LIBORVolatilityModel
getLiborPeriodDiscretization, getParameterAsDouble, getTimeDiscretization
-
Constructor Details
-
LIBORVolatilityModelFromGivenMatrix
public LIBORVolatilityModelFromGivenMatrix(RandomVariableFactory randomVariableFactory, TimeDiscretization timeDiscretization, TimeDiscretization liborPeriodDiscretization, RandomVariable[][] volatility, boolean isCalibrateable)Creates a simple volatility model using given piece-wise constant values on a given discretization grid. The indexing of the matrixvolatilityis [timeIndex][compnentIndex] where timeIndex refers to the simulation time index j of t_j and componentIndex refers to the tenor time discretization i for the i-th forward rate. In other words, \sigma_i(t_j) is given by volatility[j][i].- Parameters:
randomVariableFactory- The random variable factor used to construct random variables from the parameters.timeDiscretization- Discretization of simulation time.liborPeriodDiscretization- Discretization of tenor times.volatility- Volatility matrix volatility[timeIndex][componentIndex] where timeIndex the index of the start time in timeDiscretizationFromArray and componentIndex from liborPeriodDiscretizationisCalibrateable- Set this to true, if the parameters are available for calibration.
-
LIBORVolatilityModelFromGivenMatrix
public LIBORVolatilityModelFromGivenMatrix(TimeDiscretization timeDiscretization, TimeDiscretization liborPeriodDiscretization, RandomVariable[][] volatility, boolean isCalibrateable)Creates a simple volatility model using given piece-wise constant values on a given discretization grid. The indexing of the matrixvolatilityis [timeIndex][compnentIndex] where timeIndex refers to the simulation time index j of t_j and componentIndex refers to the tenor time discretization i for the i-th forward rate. In other words, \sigma_i(t_j) is given by volatility[j][i].- Parameters:
timeDiscretization- Discretization of simulation time.liborPeriodDiscretization- Discretization of tenor times.volatility- Volatility matrix volatility[timeIndex][componentIndex] where timeIndex the index of the start time in timeDiscretizationFromArray and componentIndex from liborPeriodDiscretizationisCalibrateable- Set this to true, if the parameters are available for calibration.
-
LIBORVolatilityModelFromGivenMatrix
public LIBORVolatilityModelFromGivenMatrix(TimeDiscretization timeDiscretization, TimeDiscretization liborPeriodDiscretization, RandomVariable[][] volatility)Creates a simple volatility model using given piece-wise constant values on a given discretization grid. The indexing of the matrixvolatilityis [timeIndex][compnentIndex] where timeIndex refers to the simulation time index j of t_j and componentIndex refers to the tenor time discretization i for the i-th forward rate. In other words, \sigma_i(t_j) is given by volatility[j][i].- Parameters:
timeDiscretization- Discretization of simulation time.liborPeriodDiscretization- Discretization of tenor times.volatility- Volatility matrix volatility[timeIndex][componentIndex] where timeIndex the index of the start time in timeDiscretizationFromArray and componentIndex from liborPeriodDiscretization
-
LIBORVolatilityModelFromGivenMatrix
public LIBORVolatilityModelFromGivenMatrix(RandomVariableFactory randomVariableFactory, TimeDiscretization timeDiscretization, TimeDiscretization liborPeriodDiscretization, double[][] volatility, boolean isCalibrateable)Creates a simple volatility model using given piece-wise constant values on a given discretization grid.- Parameters:
randomVariableFactory- The random variable factor used to construct random variables from the parameters.timeDiscretization- Discretization of simulation time.liborPeriodDiscretization- Discretization of tenor times.volatility- Volatility matrix volatility[timeIndex][componentIndex] where timeIndex the index of the start time in timeDiscretizationFromArray and componentIndex from liborPeriodDiscretizationisCalibrateable- Set this to true, if the parameters are available for calibration.
-
LIBORVolatilityModelFromGivenMatrix
public LIBORVolatilityModelFromGivenMatrix(RandomVariableFactory randomVariableFactory, TimeDiscretization timeDiscretization, TimeDiscretization liborPeriodDiscretization, double[][] volatility)Creates a simple volatility model using given piece-wise constant values on a given discretization grid. The indexing of the matrixvolatilityis [timeIndex][compnentIndex] where timeIndex refers to the simulation time index j of t_j and componentIndex refers to the tenor time discretization i for the i-th forward rate. In other words, \sigma_i(t_j) is given by volatility[j][i].- Parameters:
randomVariableFactory- The random variable factor used to construct random variables from the parameters.timeDiscretization- Discretization of simulation time.liborPeriodDiscretization- Discretization of tenor times.volatility- Volatility matrix volatility[timeIndex][componentIndex] where timeIndex the index of the start time in timeDiscretizationFromArray and componentIndex from liborPeriodDiscretization
-
LIBORVolatilityModelFromGivenMatrix
public LIBORVolatilityModelFromGivenMatrix(TimeDiscretization timeDiscretization, TimeDiscretization liborPeriodDiscretization, double[][] volatility)Creates a simple volatility model using given piece-wise constant values on a given discretization grid. The indexing of the matrixvolatilityis [timeIndex][compnentIndex] where timeIndex refers to the simulation time index j of t_j and componentIndex refers to the tenor time discretization i for the i-th forward rate. In other words, \sigma_i(t_j) is given by volatility[j][i].- Parameters:
timeDiscretization- Discretization of simulation time.liborPeriodDiscretization- Discretization of tenor times.volatility- Volatility matrix volatility[timeIndex][componentIndex] where timeIndex the index of the start time in timeDiscretizationFromArray and componentIndex from liborPeriodDiscretization
-
-
Method Details
-
getVolatility
Description copied from class:LIBORVolatilityModelImplement this method to complete the implementation.- Specified by:
getVolatilityin classLIBORVolatilityModel- 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.
-
getParameter
- Specified by:
getParameterin classLIBORVolatilityModel
-
getCloneWithModifiedParameter
public LIBORVolatilityModelFromGivenMatrix getCloneWithModifiedParameter(RandomVariable[] parameter)- Specified by:
getCloneWithModifiedParameterin classLIBORVolatilityModel
-
clone
- Specified by:
clonein classLIBORVolatilityModel
-
getCloneWithModifiedData
Description copied from class:LIBORVolatilityModelReturns 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.- Specified by:
getCloneWithModifiedDatain classLIBORVolatilityModel- 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).
-