net.finmath.marketdata.calibration
Class CalibratedCurves
- java.lang.Object
-
- net.finmath.marketdata.calibration.CalibratedCurves
-
public class CalibratedCurves extends java.lang.ObjectGenerate a collection of calibrated curves (discount curves, forward curves) from a vector of calibration products.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classCalibratedCurves.CalibrationSpecSpecification of calibration product.
-
Constructor Summary
Constructors Constructor and Description CalibratedCurves(CalibratedCurves.CalibrationSpec[] calibrationSpecs)Generate a collection of calibrated curves (discount curves, forward curves) from a vector of calibration products.CalibratedCurves(CalibratedCurves.CalibrationSpec[] calibrationSpecs, AnalyticModel calibrationModel)Generate a collection of calibrated curves (discount curves, forward curves) from a vector of calibration products and a given model.CalibratedCurves(CalibratedCurves.CalibrationSpec[] calibrationSpecs, AnalyticModel calibrationModel, double calibrationAccuracy)Generate a collection of calibrated curves (discount curves, forward curves) from a vector of calibration products and a given model.CalibratedCurves(CalibratedCurves.CalibrationSpec[] calibrationSpecs, AnalyticModel calibrationModel, double evaluationTime, double calibrationAccuracy)Generate a collection of calibrated curves (discount curves, forward curves) from a vector of calibration products and a given model.CalibratedCurves(java.util.Collection<CalibratedCurves.CalibrationSpec> calibrationSpecs)Generate a collection of calibrated curves (discount curves, forward curves) from a vector of calibration products.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description AnalyticProductInterfacegetCalibrationProductForSpec(CalibratedCurves.CalibrationSpec calibrationSpec)CurveInterfacegetCurve(java.lang.String name)Get a curve for a given name.doublegetLastAccuracy()Return the accuracy achieved in the last calibration.intgetLastNumberOfInterations()Return the number of iterations needed to calibrate the model.AnalyticModelInterfacegetModel()Return the calibrated model, i.e., the model maintaining a collection of curves calibrated to the given calibration specifications.
-
-
-
Constructor Detail
-
CalibratedCurves
public CalibratedCurves(CalibratedCurves.CalibrationSpec[] calibrationSpecs, AnalyticModel calibrationModel, double evaluationTime, double calibrationAccuracy) throws SolverException, java.lang.CloneNotSupportedException
Generate a collection of calibrated curves (discount curves, forward curves) from a vector of calibration products and a given model. If the model already contains a curve referenced as calibration curve that curve is replaced by a clone, retaining the given curve information and adding a new calibration point. If the model does not contain the curve referenced as calibration curve, the curve will be added to the model. Use case: You already have a discount curve as part of the model and like to calibrate an additional curve to an additional set of instruments.- Parameters:
calibrationSpecs- Array of calibration specs.calibrationModel- A given model used to value the calibration products.evaluationTime- Evaluation time applied to the calibration products.calibrationAccuracy- Error tolerance of the solver. Set to 0 if you need machine precision.- Throws:
SolverException- May be thrown if the solver does not cannot find a solution of the calibration problem.java.lang.CloneNotSupportedException- Thrown, when a curve could not be cloned.
-
CalibratedCurves
public CalibratedCurves(CalibratedCurves.CalibrationSpec[] calibrationSpecs, AnalyticModel calibrationModel, double calibrationAccuracy) throws SolverException, java.lang.CloneNotSupportedException
Generate a collection of calibrated curves (discount curves, forward curves) from a vector of calibration products and a given model. If the model already contains a curve referenced as calibration curve that curve is replaced by a clone, retaining the given curve information and adding a new calibration point. If the model does not contain the curve referenced as calibration curve, the curve will be added to the model. Use case: You already have a discount curve as part of the model and like to calibrate an additional curve to an additional set of instruments.- Parameters:
calibrationSpecs- Array of calibration specs.calibrationModel- A given model used to value the calibration products.calibrationAccuracy- Error tolerance of the solver. Set to 0 if you need machine precision.- Throws:
SolverException- May be thrown if the solver does not cannot find a solution of the calibration problem.java.lang.CloneNotSupportedException- Thrown, when a curve could not be cloned.
-
CalibratedCurves
public CalibratedCurves(CalibratedCurves.CalibrationSpec[] calibrationSpecs, AnalyticModel calibrationModel) throws SolverException, java.lang.CloneNotSupportedException
Generate a collection of calibrated curves (discount curves, forward curves) from a vector of calibration products and a given model. If the model already contains a curve referenced as calibration curve that curve is replaced by a clone, retaining the given curve information and adding a new calibration point. If the model does not contain the curve referenced as calibration curve, the curve will be added to the model. Use case: You already have a discount curve as part of the model and like to calibrate an additional curve to an additional set of instruments.- Parameters:
calibrationSpecs- Array of calibration specs.calibrationModel- A given model used to value the calibration products.- Throws:
SolverException- May be thrown if the solver does not cannot find a solution of the calibration problem.java.lang.CloneNotSupportedException- Thrown, when a curve could not be cloned.
-
CalibratedCurves
public CalibratedCurves(java.util.Collection<CalibratedCurves.CalibrationSpec> calibrationSpecs) throws SolverException, java.lang.CloneNotSupportedException
Generate a collection of calibrated curves (discount curves, forward curves) from a vector of calibration products.- Parameters:
calibrationSpecs- Array of calibration specs.- Throws:
SolverException- May be thrown if the solver does not cannot find a solution of the calibration problem.java.lang.CloneNotSupportedException- Thrown, when a curve could not be cloned.
-
CalibratedCurves
public CalibratedCurves(CalibratedCurves.CalibrationSpec[] calibrationSpecs) throws SolverException, java.lang.CloneNotSupportedException
Generate a collection of calibrated curves (discount curves, forward curves) from a vector of calibration products.- Parameters:
calibrationSpecs- Array of calibration specs.- Throws:
SolverException- May be thrown if the solver does not cannot find a solution of the calibration problem.java.lang.CloneNotSupportedException- Thrown, when a curve could not be cloned.
-
-
Method Detail
-
getCalibrationProductForSpec
public AnalyticProductInterface getCalibrationProductForSpec(CalibratedCurves.CalibrationSpec calibrationSpec)
-
getModel
public AnalyticModelInterface getModel()
Return the calibrated model, i.e., the model maintaining a collection of curves calibrated to the given calibration specifications.- Returns:
- The calibrated model.
-
getCurve
public CurveInterface getCurve(java.lang.String name)
Get a curve for a given name.- Parameters:
name- Name of the curve- Returns:
- The curve model.
-
getLastNumberOfInterations
public int getLastNumberOfInterations()
Return the number of iterations needed to calibrate the model.- Returns:
- The number of iterations needed to calibrate the model.
-
getLastAccuracy
public double getLastAccuracy()
Return the accuracy achieved in the last calibration.- Returns:
- The accuracy achieved in the last calibration.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG