/** * Solve using a user supplied NonLinearParameterTransforms. * <p> * This returns {@link LeastSquareResults}. * * @param start the first guess at the parameter values * @param transform transform from model parameters to fitting parameters, and vice versa * @return the calibration results */ public LeastSquareResultsWithTransform solve(DoubleArray start, NonLinearParameterTransforms transform) { NonLinearTransformFunction transFunc = new NonLinearTransformFunction(volFunc, volAdjointFunc, transform); LeastSquareResults solRes = SOLVER.solve(marketValues, errors, transFunc.getFittingFunction(), transFunc.getFittingJacobian(), transform.transform(start), getConstraintFunction(transform), getMaximumStep()); return new LeastSquareResultsWithTransform(solRes, transform); }
transFunc.getFittingJacobian(), transform.transform(initialValues)); LeastSquareResultsWithTransform resTransform = new LeastSquareResultsWithTransform(res, transform); vols = updateParameters(sabrDefinition, vols, resTransform.getModelParameters());
LeastSquareResults res = solver.solve(adjustedPrices, errors, transFunc.getFittingFunction(), transFunc.getFittingJacobian(), transform.transform(start)); LeastSquareResultsWithTransform resTransform = new LeastSquareResultsWithTransform(res, transform); vols = updateParameters(vols, nExpiries, i, betaFix, resTransform.getModelParameters()); totalChiSq += res.getChiSq();