finMath lib documentation
net.finmath.analytic.calibration

## Class Solver

• public class Solver
extends Object
Generates a calibrated model for a given set of calibrationProducts with respect to given Curves. 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.
Author:
Christian Fries
• ### Constructor Summary

Constructors
Constructor and Description
Solver(AnalyticModelInterface model, Vector<AnalyticProductInterface> calibrationProducts)
Generate a solver for the given parameter objects (independents) and objective functions (dependents).
Solver(AnalyticModelInterface model, Vector<AnalyticProductInterface> calibrationProducts, double evaluationTime, double calibrationAccuracy)
Generate a solver for the given parameter objects (independents) and objective functions (dependents).
Solver(AnalyticModelInterface model, Vector<AnalyticProductInterface> calibrationProducts, List<Double> calibrationTargetValues, double evaluationTime, double calibrationAccuracy)
Generate a solver for the given parameter objects (independents) and objective functions (dependents).
Solver(AnalyticModelInterface model, Vector<AnalyticProductInterface> calibrationProducts, List<Double> calibrationTargetValues, ParameterTransformation parameterTransformation, double evaluationTime, double calibrationAccuracy)
Generate a solver for the given parameter objects (independents) and objective functions (dependents).
Solver(AnalyticModelInterface model, Vector<AnalyticProductInterface> calibrationProducts, List<Double> calibrationTargetValues, ParameterTransformation parameterTransformation, double evaluationTime, StochasticOptimizerFactoryInterface optimizerFactory)
Generate a solver for the given parameter objects (independents) and objective functions (dependents).
• ### Method Summary

All Methods
Modifier and Type Method and Description
double getAccuracy()
Returns the accuracy achieved in the last solver run.
AnalyticModelInterface getCalibratedModel(Set<ParameterObjectInterface> objectsToCalibrate)
Find the model such that the equation  objectiveFunctions.getValue(model) = 0  holds.
int getIterations()
Returns the number of iterations required in the last solver step.
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Constructor Detail

• #### Solver

public Solver(AnalyticModelInterface model,
Vector<AnalyticProductInterface> calibrationProducts,
List<Double> calibrationTargetValues,
ParameterTransformation parameterTransformation,
double evaluationTime,
StochasticOptimizerFactoryInterface 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(AnalyticModelInterface model,
Vector<AnalyticProductInterface> 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(AnalyticModelInterface model,
Vector<AnalyticProductInterface> 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(AnalyticModelInterface model,
Vector<AnalyticProductInterface> 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(AnalyticModelInterface model,
Vector<AnalyticProductInterface> 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 AnalyticModelInterface getCalibratedModel(Set<ParameterObjectInterface> objectsToCalibrate)
throws SolverException
Find the model such that the equation
 objectiveFunctions.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.