ForwardRateAgreementDiscountingMethod { public MulticurveSensitivity parSpreadCurveSensitivity(final ForwardRateAgreement fra, final MulticurveProviderInterface multicurve) { ArgumentChecker.notNull(fra, "FRA"); ArgumentChecker.notNull(multicurve, "Multiurves"); final Map<String, List<ForwardSensitivity>> mapFwd = new HashMap<>(); final List<ForwardSensitivity> listForward = new ArrayList<>(); listForward.add(new SimplyCompoundedForwardSensitivity(fra.getFixingPeriodStartTime(), fra.getFixingPeriodEndTime(), fra.getFixingYearFraction(), 1.0)); mapFwd.put(multicurve.getName(fra.getIndex()), listForward); return MulticurveSensitivity.ofForward(mapFwd); } 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 parSpreadCurveSensitivity() { final SimpleParameterSensitivity psComputed = PSPSC.calculateSensitivity(FRA, MULTICURVE, MULTICURVE.getAllNames()); final SimpleParameterSensitivity psFD = PSMQCS_FDC.calculateSensitivity(FRA, MULTICURVE); AssertSensitivityObjects.assertEquals("CashDiscountingProviderMethod: presentValueCurveSensitivity ", psFD, psComputed, TOLERANCE_SPREAD_DELTA); }
@Test public void parSpreadCurveSensitivityMethodVsCalculator() { final MulticurveSensitivity pvcsMethod = FRA_METHOD.parSpreadCurveSensitivity(FRA, MULTICURVE); final MulticurveSensitivity pvcsCalculator = FRA.accept(PSMQCSDC, MULTICURVE); assertEquals("Forex swap present value curve sensitivity: Method vs Calculator", pvcsMethod, pvcsCalculator); }