- java.lang.Object
-
- net.finmath.marketdata2.calibration.Solver
-
public class Solver extends Object
Generates a calibrated model for a given set ofcalibrationProducts
with respect to givenCurveFromInterpolationPoints
s. The model and the curve are assumed to be immutable, i.e., the solver will return a calibrate clone, containing clones for every curve which is part of the set of curves to be calibrated. The calibration is performed as a multi-threaded global optimization. I will greatly profit from a multi-core architecture.- Version:
- 1.0
- Author:
- Christian Fries
-
-
Constructor Summary
Constructors Constructor Description Solver(AnalyticModel model, Vector<AnalyticProduct> calibrationProducts)
Generate a solver for the given parameter objects (independents) and objective functions (dependents).Solver(AnalyticModel model, Vector<AnalyticProduct> calibrationProducts, double evaluationTime, double calibrationAccuracy)
Generate a solver for the given parameter objects (independents) and objective functions (dependents).Solver(AnalyticModel model, Vector<AnalyticProduct> calibrationProducts, List<Double> calibrationTargetValues, double evaluationTime, double calibrationAccuracy)
Generate a solver for the given parameter objects (independents) and objective functions (dependents).Solver(AnalyticModel model, Vector<AnalyticProduct> calibrationProducts, List<Double> calibrationTargetValues, ParameterTransformation parameterTransformation, double evaluationTime, double calibrationAccuracy)
Generate a solver for the given parameter objects (independents) and objective functions (dependents).Solver(AnalyticModel model, Vector<AnalyticProduct> calibrationProducts, List<Double> calibrationTargetValues, ParameterTransformation parameterTransformation, double evaluationTime, StochasticOptimizerFactory optimizerFactory)
Generate a solver for the given parameter objects (independents) and objective functions (dependents).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getAccuracy()
Returns the accuracy achieved in the last solver run.AnalyticModel
getCalibratedModel(Set<ParameterObject> objectsToCalibrate)
Find the model such that the equationobjectiveFunctions.getValue(model) = 0
holds.int
getIterations()
Returns the number of iterations required in the last solver step.
-
-
-
Constructor Detail
-
Solver
public Solver(AnalyticModel model, Vector<AnalyticProduct> calibrationProducts, List<Double> calibrationTargetValues, ParameterTransformation parameterTransformation, double evaluationTime, StochasticOptimizerFactory optimizerFactory)
Generate a solver for the given parameter objects (independents) and objective functions (dependents).- Parameters:
model
- The model from which a calibrated clone should be created.calibrationProducts
- The objective functions.calibrationTargetValues
- Array of target values for the objective functions.parameterTransformation
- A parameter transformation, if any, otherwise null.evaluationTime
- Evaluation time applied to the calibration products.optimizerFactory
- A factory providing the optimizer (for the given objective function)
-
Solver
public Solver(AnalyticModel model, Vector<AnalyticProduct> calibrationProducts, List<Double> calibrationTargetValues, ParameterTransformation parameterTransformation, double evaluationTime, double calibrationAccuracy)
Generate a solver for the given parameter objects (independents) and objective functions (dependents).- Parameters:
model
- The model from which a calibrated clone should be created.calibrationProducts
- The objective functions.calibrationTargetValues
- Array of target values for the objective functions.parameterTransformation
- A parameter transformation, if any, otherwise null.evaluationTime
- Evaluation time applied to the calibration products.calibrationAccuracy
- The error tolerance of the solver.
-
Solver
public Solver(AnalyticModel model, Vector<AnalyticProduct> calibrationProducts, List<Double> calibrationTargetValues, double evaluationTime, double calibrationAccuracy)
Generate a solver for the given parameter objects (independents) and objective functions (dependents).- Parameters:
model
- The model from which a calibrated clone should be created.calibrationProducts
- The objective functions.calibrationTargetValues
- Array of target values for the objective functions.evaluationTime
- Evaluation time applied to the calibration products.calibrationAccuracy
- The error tolerance of the solver.
-
Solver
public Solver(AnalyticModel model, Vector<AnalyticProduct> calibrationProducts, double evaluationTime, double calibrationAccuracy)
Generate a solver for the given parameter objects (independents) and objective functions (dependents).- Parameters:
model
- The model from which a calibrated clone should be created.calibrationProducts
- The objective functions.evaluationTime
- Evaluation time applied to the calibration products.calibrationAccuracy
- The error tolerance of the solver.
-
Solver
public Solver(AnalyticModel model, Vector<AnalyticProduct> calibrationProducts)
Generate a solver for the given parameter objects (independents) and objective functions (dependents).- Parameters:
model
- The model from which a calibrated clone should be created.calibrationProducts
- The objective functions.
-
-
Method Detail
-
getCalibratedModel
public AnalyticModel getCalibratedModel(Set<ParameterObject> objectsToCalibrate) throws SolverException
Find the model such that the equationobjectiveFunctions.getValue(model) = 0
holds.- Parameters:
objectsToCalibrate
- The set of parameterized objects to calibrate.- Returns:
- A reference to a calibrated clone of the given model.
- Throws:
SolverException
- Thrown if the underlying optimizer does not find a solution.
-
getIterations
public int getIterations()
Returns the number of iterations required in the last solver step.- Returns:
- The number of iterations required.
-
getAccuracy
public double getAccuracy()
Returns the accuracy achieved in the last solver run.- Returns:
- The accuracy achieved in the last solver run.
-
-