Package com.opengamma.analytics.financial.provider.calculator.hullwhite

Examples of com.opengamma.analytics.financial.provider.calculator.hullwhite.PresentValueSABRHullWhiteMonteCarloCalculator


  /**
   * Tests the present value of the Hull-White Monte-Carlo calibrated to SABR swaption.
   */
  public void presentValueSABRHullWhiteMonteCarlo() {
    final MultipleCurrencyAmount pvSABR = METHOD_SWPT_SABR.presentValue(SWAPTION_LONG_PAYER, SABR_MULTICURVES);
    final PresentValueSABRHullWhiteMonteCarloCalculator pvcSABRHWMC = PresentValueSABRHullWhiteMonteCarloCalculator.getInstance();
    final MultipleCurrencyAmount pvMC = SWAPTION_LONG_PAYER.accept(pvcSABRHWMC, SABR_MULTICURVES);
    assertEquals("Swaption Physical SABR: Present value using Hull-White by Monte Carlo", pvSABR.getAmount(EUR), pvMC.getAmount(EUR), 2.5E+4);
  }
View Full Code Here


    System.out.println("SwaptionPhysicalFixedIborSABRMethodTest: " + nbTest + " physical swaptions SABR (price): " + (endTime - startTime) + " ms");
    // Performance note: price: 16-Nov-12: On Mac Pro 3.2 GHz Quad-Core Intel Xeon: 75 ms for 5000 swaptions.

    // 4. Compute present value using Hull-White Monte Carlo. Only for MC testing.
    final int nbTest2 = 10;
    final PresentValueSABRHullWhiteMonteCarloCalculator pvcSABRHWMC = PresentValueSABRHullWhiteMonteCarloCalculator.getInstance();
    final MultipleCurrencyAmount[] pvMC = new MultipleCurrencyAmount[nbTest2];

    startTime = System.currentTimeMillis();
    for (int looptest = 0; looptest < nbTest2; looptest++) {
      pvMC[looptest] = SWAPTION_LONG_PAYER.accept(pvcSABRHWMC, SABR_MULTICURVES);
View Full Code Here

TOP

Related Classes of com.opengamma.analytics.financial.provider.calculator.hullwhite.PresentValueSABRHullWhiteMonteCarloCalculator

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.