Module net.finmath.lib
Class LIBORCovarianceModelFromVolatilityAndCorrelation
java.lang.Object
net.finmath.montecarlo.interestrate.models.covariance.AbstractLIBORCovarianceModel
net.finmath.montecarlo.interestrate.models.covariance.AbstractLIBORCovarianceModelParametric
net.finmath.montecarlo.interestrate.models.covariance.LIBORCovarianceModelFromVolatilityAndCorrelation
- All Implemented Interfaces:
Serializable
,LIBORCovarianceModel
,LIBORCovarianceModelCalibrateable
public class LIBORCovarianceModelFromVolatilityAndCorrelation
extends AbstractLIBORCovarianceModelParametric
A covariance model build from a volatility model implementing
LIBORVolatilityModel
and a correlation model
implementing LIBORCorrelationModel
.
The model parameters are given by the concatenation of the
parameters of the LIBORVolatilityModel
and
the parameters of the LIBORCorrelationModel
,
in this ordering
- Version:
- 1.0
- Author:
- Christian Fries
- See Also:
- Serialized Form
-
Constructor Summary
ConstructorsConstructorDescriptionLIBORCovarianceModelFromVolatilityAndCorrelation(TimeDiscretization timeDiscretization, TimeDiscretization liborPeriodDiscretization, LIBORVolatilityModel volatilityModel, LIBORCorrelationModel correlationModel)
-
Method Summary
Modifier and TypeMethodDescriptionclone()
getCloneWithModifiedData(Map<String,Object> dataModified)
Returns a clone of this model where the specified properties have been modified.getCloneWithModifiedParameters(double[] parameters)
Return an instance of this model using a new set of parameters.getCloneWithModifiedParameters(RandomVariable[] parameters)
Return an instance of this model using a new set of parameters.getCovariance(int timeIndex, int component1, int component2, RandomVariable[] realizationAtTimeIndex)
Returns the instantaneous covariance calculated from factor loadings.getFactorLoading(int timeIndex, int component, RandomVariable[] realizationAtTimeIndex)
Return the factor loading for a given time index and component index.getFactorLoadingPseudoInverse(int timeIndex, int component, int factor, RandomVariable[] realizationAtTimeIndex)
Returns the pseudo inverse of the factor matrix.Get the parameters of determining this parametric covariance model.double[]
Get the parameters of determining this parametric covariance model.Methods inherited from class net.finmath.montecarlo.interestrate.models.covariance.AbstractLIBORCovarianceModelParametric
getCloneCalibrated, getCloneCalibrated, getCloneCalibratedLegazy, toString
Methods inherited from class net.finmath.montecarlo.interestrate.models.covariance.AbstractLIBORCovarianceModel
getCovariance, getFactorLoading, getFactorLoading, getLiborPeriodDiscretization, getNumberOfFactors, 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.LIBORCovarianceModel
getCovariance, getFactorLoading, getFactorLoading, getLiborPeriodDiscretization, getNumberOfFactors, getTimeDiscretization
-
Constructor Details
-
LIBORCovarianceModelFromVolatilityAndCorrelation
public LIBORCovarianceModelFromVolatilityAndCorrelation(TimeDiscretization timeDiscretization, TimeDiscretization liborPeriodDiscretization, LIBORVolatilityModel volatilityModel, LIBORCorrelationModel correlationModel)
-
-
Method Details
-
getFactorLoading
public RandomVariable[] getFactorLoading(int timeIndex, int component, RandomVariable[] realizationAtTimeIndex)Description copied from interface:LIBORCovarianceModel
Return the factor loading for a given time index and component index. The factor loading is the vector fi such that the scalar product
fjfk = fj,1fk,1 + ... + fj,mfk,m
is the instantaneous covariance of the component j and k.- Specified by:
getFactorLoading
in interfaceLIBORCovarianceModel
- Specified by:
getFactorLoading
in classAbstractLIBORCovarianceModel
- Parameters:
timeIndex
- The time index at which factor loading is requested.component
- The index of the component i.realizationAtTimeIndex
- The realization of the stochastic process (may be used to implement local volatility/covariance/correlation models).- Returns:
- The factor loading fi(t).
-
getFactorLoadingPseudoInverse
public RandomVariable getFactorLoadingPseudoInverse(int timeIndex, int component, int factor, RandomVariable[] realizationAtTimeIndex)Description copied from interface:LIBORCovarianceModel
Returns the pseudo inverse of the factor matrix.- Specified by:
getFactorLoadingPseudoInverse
in interfaceLIBORCovarianceModel
- Specified by:
getFactorLoadingPseudoInverse
in classAbstractLIBORCovarianceModel
- Parameters:
timeIndex
- The time index at which factor loading inverse is requested.component
- The index of the component i.factor
- The index of the factor j.realizationAtTimeIndex
- The realization of the stochastic process (may be used to implement local volatility/covariance/correlation models).- Returns:
- The entry of the pseudo-inverse of the factor loading matrix.
-
getCovariance
public RandomVariable getCovariance(int timeIndex, int component1, int component2, RandomVariable[] realizationAtTimeIndex)Description copied from interface:LIBORCovarianceModel
Returns the instantaneous covariance calculated from factor loadings.- Specified by:
getCovariance
in interfaceLIBORCovarianceModel
- Overrides:
getCovariance
in classAbstractLIBORCovarianceModel
- Parameters:
timeIndex
- The time index at which covariance is requested.component1
- Index of component i.component2
- Index of component j.realizationAtTimeIndex
- The realization of the stochastic process.- Returns:
- The instantaneous covariance between component i and j.
-
getParameter
Description copied from class:AbstractLIBORCovarianceModelParametric
Get the parameters of determining this parametric covariance model. The parameters are usually free parameters which may be used in calibration.- Overrides:
getParameter
in classAbstractLIBORCovarianceModelParametric
- Returns:
- Parameter vector.
-
getCloneWithModifiedParameters
Description copied from class:AbstractLIBORCovarianceModelParametric
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 classAbstractLIBORCovarianceModelParametric
- Parameters:
parameters
- The new set of parameters.- Returns:
- An instance of AbstractLIBORCovarianceModelParametric with modified parameters.
-
getParameterAsDouble
public double[] getParameterAsDouble()Description copied from class:AbstractLIBORCovarianceModelParametric
Get the parameters of determining this parametric covariance model. The parameters are usually free parameters which may be used in calibration.- Specified by:
getParameterAsDouble
in classAbstractLIBORCovarianceModelParametric
- Returns:
- Parameter vector.
-
clone
- Specified by:
clone
in classAbstractLIBORCovarianceModelParametric
-
getCloneWithModifiedParameters
public AbstractLIBORCovarianceModelParametric getCloneWithModifiedParameters(RandomVariable[] parameters)Description copied from class:AbstractLIBORCovarianceModelParametric
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.- Overrides:
getCloneWithModifiedParameters
in classAbstractLIBORCovarianceModelParametric
- Parameters:
parameters
- The new set of parameters.- Returns:
- An instance of AbstractLIBORCovarianceModelParametric with modified parameters.
-
getVolatilityModel
-
getCorrelationModel
-
getCloneWithModifiedData
public AbstractLIBORCovarianceModelParametric getCloneWithModifiedData(Map<String,Object> dataModified) throws CalculationExceptionDescription copied from interface:LIBORCovarianceModel
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 covariance 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:
getCloneWithModifiedData
in interfaceLIBORCovarianceModel
- Specified by:
getCloneWithModifiedData
in classAbstractLIBORCovarianceModel
- 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).
- Throws:
CalculationException
- Thrown when the model could not be created.
-