ForwardRateAgreementDiscountingMethod { public double parRate(final ForwardRateAgreement fra, final MulticurveProviderInterface multicurve) { ArgumentChecker.notNull(fra, "FRA"); ArgumentChecker.notNull(multicurve, "Multiurves"); return multicurve.getSimplyCompoundForwardRate(fra.getIndex(), fra.getFixingPeriodStartTime(), fra.getFixingPeriodEndTime(), fra.getFixingYearFraction()); } private  ForwardRateAgreementDiscountingMethod(); static ForwardRateAgreementDiscountingMethod getInstance(); MultipleCurrencyAmount presentValue(final ForwardRateAgreement fra, final MulticurveProviderInterface multicurve); MultipleCurrencyMulticurveSensitivity presentValueCurveSensitivity(final ForwardRateAgreement fra, final MulticurveProviderInterface multicurve); double parRate(final ForwardRateAgreement fra, final MulticurveProviderInterface multicurve); double parSpread(final ForwardRateAgreement fra, final MulticurveProviderInterface multicurve); MulticurveSensitivity parSpreadCurveSensitivity(final ForwardRateAgreement fra, final MulticurveProviderInterface multicurve);  }
@Test public void parRate() { final double forward = FRA_METHOD.parRate(FRA, MULTICURVE); final double forwardExpected = MULTICURVE.getSimplyCompoundForwardRate(USDLIBOR3M, FRA.getFixingPeriodStartTime(), FRA.getFixingPeriodEndTime(), FRA.getFixingYearFraction()); assertEquals("FRA discounting: par rate", forwardExpected, forward, TOLERANCE_RATE); }
@Test public void parRateMethodVsCalculator() { final double forwardMethod = FRA_METHOD.parRate(FRA, MULTICURVE); final double forwardCalculator = FRA.accept(PRDC, MULTICURVE); assertEquals("FRA discounting: par rate", forwardMethod, forwardCalculator, TOLERANCE_RATE); }