public AbstractVolatilitySurfaceParametric getCloneCalibrated ( final AnalyticModel calibrationModel , final Vector < AnalyticProduct > calibrationProducts , final List < Double > calibrationTargetValues , Map < String , Object > calibrationParameters , final ParameterTransformation parameterTransformation , OptimizerFactory optimizerFactory ) throws SolverException { if ( calibrationParameters == null ) { calibrationParameters = new HashMap <> ( ) ; } Integer maxIterationsParameter = ( Integer ) calibrationParameters . get ( "maxIterations" ) ; Double accuracyParameter = ( Double ) calibrationParameters . get ( "accuracy" ) ; Double evaluationTimeParameter = ( Double ) calibrationParameters . get ( "evaluationTime" ) ; // @TODO currently ignored, we use the setting form the OptimizerFactory int maxIterations = maxIterationsParameter != null ? maxIterationsParameter . intValue ( ) : 600 ; double accuracy = accuracyParameter != null ? accuracyParameter . doubleValue ( ) : 1E-8 ; double evaluationTime = evaluationTimeParameter != null ? evaluationTimeParameter . doubleValue ( ) : 0.0 ; AnalyticModel model = calibrationModel . addVolatilitySurfaces ( this ) ; Solver solver = new Solver ( model , calibrationProducts , calibrationTargetValues , parameterTransformation , evaluationTime , optimizerFactory ) ; Set < ParameterObject > objectsToCalibrate = new HashSet <> ( ) ; objectsToCalibrate . add ( this ) ; AnalyticModel modelCalibrated = solver . getCalibratedModel ( objectsToCalibrate ) ; // Diagnostic output if ( logger . isLoggable ( Level . FINE ) ) { double lastAccuracy = solver . getAccuracy ( ) ; int lastIterations = solver . getIterations ( ) ; logger . fine ( "The solver achieved an accuracy of " + lastAccuracy + " in " + lastIterations + "." ) ; } return ( AbstractVolatilitySurfaceParametric ) modelCalibrated . getVolatilitySurface ( this . getName ( ) ) ; }
Create a clone of this volatility surface using a generic calibration of its parameters to given market data .