Package com.opengamma.analytics.financial.interestrate.method

Examples of com.opengamma.analytics.financial.interestrate.method.SuccessiveRootFinderCalibrationEngine


    startTime = System.currentTimeMillis();
    for (int looptest = 0; looptest < nbTest; looptest++) {
      final G2ppPiecewiseConstantParameters g2Parameters = new G2ppPiecewiseConstantParameters(meanReversion, new double[][] { {0.01}, {0.01 / ratio}}, new double[0], correlation);
      final SwaptionPhysicalG2ppCalibrationObjective objective = new SwaptionPhysicalG2ppCalibrationObjective(g2Parameters, ratio);
      final SuccessiveRootFinderCalibrationEngine calibrationEngine = new SwaptionPhysicalG2ppSuccessiveRootFinderCalibrationEngine(objective);
      for (int loopexp = 0; loopexp < EXPIRY_TENOR.length; loopexp++) {
        calibrationEngine.addInstrument(SWAPTION_LONG_PAYER[loopexp], METHOD_SABR);
      }
      calibrationEngine.calibrate(SABR_BUNDLE);
      pv[looptest] = METHOD_G2PP.presentValue(SWAPTION_LONG_PAYER[EXPIRY_TENOR.length - 1], objective.getG2Bundle());
    }
    endTime = System.currentTimeMillis();
    System.out.println(nbTest + " Hull-White calibration to swaption (5 swaptions) + price: " + (endTime - startTime) + " ms");
    // Performance note: calibration: 12-Dec-2012: On Mac Pro 3.2 GHz Quad-Core Intel Xeon: 135 ms for 100 calibration with 5 swaptions.
View Full Code Here

TOP

Related Classes of com.opengamma.analytics.financial.interestrate.method.SuccessiveRootFinderCalibrationEngine

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.