Package com.opengamma.analytics.math.minimization

Examples of com.opengamma.analytics.math.minimization.ScalarMinimizer


          chiSqr += FunctionUtils.square((data[i].getBlackVolatility() - _formula.getVolatilityFunction(options[i], forward).evaluate(sabrFormulaData)) / errors[i]);
        }
        return chiSqr;
      }
    };
    final ScalarMinimizer lineMinimizer = new BrentMinimizer1D();
    final ConjugateDirectionVectorMinimizer minimzer = new ConjugateDirectionVectorMinimizer(lineMinimizer, 1e-6, 10000);
    final DoubleMatrix1D fp = transforms.transform(new DoubleMatrix1D(initialFitParameters));
    final DoubleMatrix1D minPos = minimzer.minimize(function, fp);
    final double chiSquare = function.evaluate(minPos);
    final DoubleMatrix1D res = transforms.inverseTransform(minPos);
View Full Code Here


        final double plenty = getPlenty(data, basisFunction, weightsAndPos, isNormalized);
        return chi2 + 0.0 * plenty; // TODO This is not working with a plenty!!!!
      }
    };

    final ScalarMinimizer lineMinimizer = new BrentMinimizer1D();
    final ConjugateGradientVectorMinimizer minimizer = new ConjugateGradientVectorMinimizer(lineMinimizer, 1e-3, 1000);

        final double[] start = new double[nodePos.size()];
        for (int i = 0; i < start.length; i++) {
          start[i] = VALUE;
View Full Code Here

TOP

Related Classes of com.opengamma.analytics.math.minimization.ScalarMinimizer

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.