DepositIborDiscountingMethod { public double parSpread(final DepositIbor deposit, final MulticurveProviderInterface multicurve) { return multicurve.getSimplyCompoundForwardRate(deposit.getIndex(), deposit.getStartTime(), deposit.getEndTime(), deposit.getAccrualFactor()) - deposit.getRate(); } private  DepositIborDiscountingMethod(); static DepositIborDiscountingMethod getInstance(); MultipleCurrencyAmount presentValue(final DepositIbor deposit, final MulticurveProviderInterface multicurves); MultipleCurrencyMulticurveSensitivity presentValueCurveSensitivity(final DepositIbor deposit, final MulticurveProviderInterface multicurves); double parRate(final DepositIbor deposit, final MulticurveProviderInterface multicurve); double parSpread(final DepositIbor deposit, final MulticurveProviderInterface multicurve); MulticurveSensitivity parSpreadCurveSensitivity(final DepositIbor deposit, final MulticurveProviderInterface multicurve);  }
@Test public void parSpreadMethodVsCalculator() { final ZonedDateTime referenceDate = TRADE_DATE; final DepositIbor deposit = DEPOSIT_IBOR_DEFINITION.toDerivative(referenceDate); final double parSpreadMethod = METHOD_DEPOSIT.parSpread(deposit, PROVIDER_MULTICURVES); final double parSpreadCalculator = deposit.accept(PSMQDC, PROVIDER_MULTICURVES); assertEquals("DepositDefinition: present value", parSpreadMethod, parSpreadCalculator, TOLERANCE_SPREAD); }