InterestRateFutureSecurityHullWhiteMethod extends FuturesSecurityHullWhiteMethod { public double parRate(final InterestRateFutureSecurity futures, final HullWhiteOneFactorProviderInterface multicurve) { return 1.0d - price(futures, multicurve); } private  InterestRateFutureSecurityHullWhiteMethod(); static InterestRateFutureSecurityHullWhiteMethod getInstance(); double parRate(final InterestRateFutureSecurity futures, final HullWhiteOneFactorProviderInterface multicurve); double convexityAdjustment(final InterestRateFutureSecurity futures, final HullWhiteOneFactorProviderInterface multicurve);  }
@Test public void parRate() { final double price = METHOD_IRFUT_HW.price(ERU2, HW_MULTICURVES); final double parRateExpected = 1.0d - price; final double parRateComputed = METHOD_IRFUT_HW.parRate(ERU2, HW_MULTICURVES); assertEquals("InterestRateFutureSecurityHullWhiteProviderMethod: parRate", parRateExpected, parRateComputed, TOLERANCE_PRICE); }
@Test public void parRateMethodVsCalculator() { final double parRateMethod = METHOD_IRFUT_HW.parRate(ERU2, HW_MULTICURVES); final double parRateCalculator = ERU2.accept(PRHWC, HW_MULTICURVES); assertEquals("InterestRateFutureSecurityHullWhiteProviderMethod: parRate", parRateMethod, parRateCalculator, TOLERANCE_PRICE); }