Package org.jquantlib.math.optimization

Examples of org.jquantlib.math.optimization.ProjectedCostFunction


        parameterAreFixed[2] = itsCoeffs.nuIsFixed_;
        parameterAreFixed[3] = itsCoeffs.rhoIsFixed_;

        final Array inversedTransformatedGuess = new Array(transformation_.inverse(guess));

        final ProjectedCostFunction constrainedSABRError = new ProjectedCostFunction(costFunction, inversedTransformatedGuess, parameterAreFixed);

        final Array projectedGuess = new Array(constrainedSABRError.project(inversedTransformatedGuess));

        final NoConstraint constraint = new NoConstraint();
        final Problem problem = new Problem(constrainedSABRError, constraint, projectedGuess);
        itsCoeffs.SABREndCriteria_ = optMethod_.minimize(problem, endCriteria_);
        final Array projectedResult = new Array(problem.currentValue());
        final Array transfResult = new Array(constrainedSABRError.include(projectedResult));

        final Array result = transformation_.direct(transfResult);
        itsCoeffs.alpha_ = result.get(0);
        itsCoeffs.beta_ = result.get(1);
        itsCoeffs.nu_ = result.get(2);
View Full Code Here


        parameterAreFixed[2] = itsCoeffs.nuIsFixed_;
        parameterAreFixed[3] = itsCoeffs.rhoIsFixed_;

        final Array inversedTransformatedGuess = new Array(transformation_.inverse(guess));

        final ProjectedCostFunction constrainedSABRError = new ProjectedCostFunction(costFunction, inversedTransformatedGuess, parameterAreFixed);

        final Array projectedGuess = new Array(constrainedSABRError.project(inversedTransformatedGuess));

        final NoConstraint constraint = new NoConstraint();
        final Problem problem = new Problem(constrainedSABRError, constraint, projectedGuess);
        itsCoeffs.SABREndCriteria_ = optMethod_.minimize(problem, endCriteria_);
        final Array projectedResult = new Array(problem.currentValue());
        final Array transfResult = new Array(constrainedSABRError.include(projectedResult));

        final Array result = transformation_.direct(transfResult);
        itsCoeffs.alpha_ = result.get(0);
        itsCoeffs.beta_ = result.get(1);
        itsCoeffs.nu_ = result.get(2);
View Full Code Here

TOP

Related Classes of org.jquantlib.math.optimization.ProjectedCostFunction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.