net.finmath.montecarlo.interestrate.modelplugins
Class AbstractLIBORCovarianceModelParametric
- java.lang.Object
-
- net.finmath.montecarlo.interestrate.modelplugins.AbstractLIBORCovarianceModel
-
- net.finmath.montecarlo.interestrate.modelplugins.AbstractLIBORCovarianceModelParametric
-
- Direct Known Subclasses:
- BlendedLocalVolatilityModel, LIBORCovarianceModelExponentialForm5Param, LIBORCovarianceModelExponentialForm7Param, LIBORCovarianceModelFromVolatilityAndCorrelation, LIBORCovarianceModelStochasticVolatility
public abstract class AbstractLIBORCovarianceModelParametric extends AbstractLIBORCovarianceModel
Base class for parametric covariance models, see alsoAbstractLIBORCovarianceModel. Parametric models feature a parameter vector which can be inspected and modified for calibration purposes. The parameter vector may have zero length, which indicated that the model is not calibrateable. This class includes the implementation of a generic calibration algorithm. If you provide an arbitrary list of calibration products, the class can return a new instance where the parameters are chosen such that the (weighted) root-mean-square error of the difference of the value of the calibration products and given target values is minimized.
-
-
Constructor Summary
Constructors Constructor and Description AbstractLIBORCovarianceModelParametric(TimeDiscretizationInterface timeDiscretization, TimeDiscretizationInterface liborPeriodDiscretization, int numberOfFactors)Constructor consuming time discretizations, which are handled by the super class.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description abstract java.lang.Objectclone()AbstractLIBORCovarianceModelParametricgetCloneCalibrated(LIBORMarketModelInterface calibrationModel, AbstractLIBORMonteCarloProduct[] calibrationProducts, double[] calibrationTargetValues, double[] calibrationWeights)AbstractLIBORCovarianceModelParametricgetCloneCalibrated(LIBORMarketModelInterface calibrationModel, AbstractLIBORMonteCarloProduct[] calibrationProducts, double[] calibrationTargetValues, double[] calibrationWeights, java.util.Map<java.lang.String,java.lang.Object> calibrationParameters)Performs a generic calibration of the parametric model by trying to match a given vector of calibration product to a given vector of target values using a given vector of weights.AbstractLIBORCovarianceModelParametricgetCloneWithModifiedParameters(double[] parameters)abstract double[]getParameter()Get the parameters of determining this parametric covariance model.abstract voidsetParameter(double[] parameter)java.lang.StringtoString()-
Methods inherited from class net.finmath.montecarlo.interestrate.modelplugins.AbstractLIBORCovarianceModel
getCovariance, getCovariance, getFactorLoading, getFactorLoading, getFactorLoading, getFactorLoadingPseudoInverse, getLiborPeriodDiscretization, getNumberOfFactors, getTimeDiscretization
-
-
-
-
Constructor Detail
-
AbstractLIBORCovarianceModelParametric
public AbstractLIBORCovarianceModelParametric(TimeDiscretizationInterface timeDiscretization, TimeDiscretizationInterface liborPeriodDiscretization, int numberOfFactors)
Constructor consuming time discretizations, which are handled by the super class.- Parameters:
timeDiscretization- The vector of simulation time discretization points.liborPeriodDiscretization- The vector of tenor discretization points.numberOfFactors- The number of factors to use (a factor reduction is performed)
-
-
Method Detail
-
getParameter
public abstract double[] getParameter()
Get the parameters of determining this parametric covariance model. The parameters are usually free parameters which may be used in calibration.- Returns:
- Parameter vector.
-
setParameter
public abstract void setParameter(double[] parameter)
-
clone
public abstract java.lang.Object clone()
- Overrides:
clonein classjava.lang.Object
-
getCloneWithModifiedParameters
public AbstractLIBORCovarianceModelParametric getCloneWithModifiedParameters(double[] parameters)
-
getCloneCalibrated
public AbstractLIBORCovarianceModelParametric getCloneCalibrated(LIBORMarketModelInterface calibrationModel, AbstractLIBORMonteCarloProduct[] calibrationProducts, double[] calibrationTargetValues, double[] calibrationWeights) throws CalculationException
- Throws:
CalculationException
-
getCloneCalibrated
public AbstractLIBORCovarianceModelParametric getCloneCalibrated(LIBORMarketModelInterface calibrationModel, AbstractLIBORMonteCarloProduct[] calibrationProducts, double[] calibrationTargetValues, double[] calibrationWeights, java.util.Map<java.lang.String,java.lang.Object> calibrationParameters) throws CalculationException
Performs a generic calibration of the parametric model by trying to match a given vector of calibration product to a given vector of target values using a given vector of weights. Optional calibration parameters may be passed using the map calibrationParameters. The keys are (Strings):- brownianMotion: Under this key an object implementing
BrownianMotionInterfacemay be provided. If so, this Brownian motion is used to build the valuation model. - maxIterations: Under this key an object of type Integer may be provided specifying the maximum number of iterations.
- accuracy: Under this key an object of type Double may be provided specifying the desired accuracy. Note that this is understood in the sense that the solver will stop if the iteration does not improve by more than this number.
- Parameters:
calibrationModel- The LIBOR market model to be used for calibrations (specifies forward curve and tenor discretization).calibrationProducts- The array of calibration products.calibrationTargetValues- The array of target values.calibrationWeights- The array of weights.calibrationParameters- A map of type Map<String, Object> specifying some (optional) calibration parameters.- Returns:
- A new parametric model of the same type than
thisone, but with calibrated parameters. - Throws:
CalculationException- Thrown if calibration has failed.
- brownianMotion: Under this key an object implementing
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG