BondTransactionDiscountingMethod { public MulticurveSensitivity parSpreadYieldCurveSensitivity(final BondFixedTransaction bond, final IssuerProviderInterface issuerMulticurves) { final double parSpreadPrice = parSpread(bond, issuerMulticurves); final double parSpreadYieldBar = 1.0d; final double yieldAtParBar = parSpreadYieldBar; final double dirtyPriceAtPar = bond.getTransactionPrice() + parSpreadPrice + bond.getBondStandard().getAccruedInterest(); final double modifiedDurationAtPar = METHOD_BOND_SECURITY. modifiedDurationFromCleanPrice(bond.getBondStandard(), bond.getTransactionPrice() + parSpreadPrice); final double dYielddCleanAtPar = -1.0d / (modifiedDurationAtPar * dirtyPriceAtPar); final double parSpreadPriceBar = dYielddCleanAtPar * yieldAtParBar; final MulticurveSensitivity parSpreadPriceCurveSensitivity = parSpreadCurveSensitivity(bond, issuerMulticurves); return parSpreadPriceCurveSensitivity.multipliedBy(parSpreadPriceBar); } private  BondTransactionDiscountingMethod(); static BondTransactionDiscountingMethod getInstance(); MultipleCurrencyAmount presentValue(final BondFixedTransaction bond, 
      final IssuerProviderInterface issuerMulticurves); MultipleCurrencyAmount presentValue(final BondIborTransaction bond, 
      final IssuerProviderInterface issuerMulticurves); MultipleCurrencyAmount presentValueFromCleanPrice(
      final BondTransaction<? extends BondSecurity<? extends Payment, ? extends Coupon>> bond, 
          final IssuerProviderInterface issuerMulticurves, final double cleanPrice); MultipleCurrencyAmount presentValueFromYield(
      final BondTransaction<? extends BondSecurity<? extends Payment, ? extends Coupon>> bond, 
          final IssuerProviderInterface issuerMulticurves, final double yield); MultipleCurrencyMulticurveSensitivity presentValueCurveSensitivity(final BondFixedTransaction bond, 
      final IssuerProviderInterface issuerMulticurves); MultipleCurrencyMulticurveSensitivity presentValueCurveSensitivity(final BondIborTransaction bond, 
      final IssuerProviderInterface issuerMulticurves); double parSpread(final BondFixedTransaction bond, final IssuerProviderInterface issuerMulticurves); double parSpread(final BondIborTransaction bond, final IssuerProviderInterface issuerMulticurves); double parSpreadYield(final BondFixedTransaction bond, final IssuerProviderInterface issuerMulticurves); MulticurveSensitivity parSpreadCurveSensitivity(final BondFixedTransaction bond, final IssuerProviderInterface issuerMulticurves); MulticurveSensitivity parSpreadCurveSensitivity(final BondIborTransaction bond, 
      final IssuerProviderInterface issuerMulticurves); MulticurveSensitivity parSpreadYieldCurveSensitivity(final BondFixedTransaction bond, 
      final IssuerProviderInterface issuerMulticurves);  }
@Test public void parSpreadYieldCurveSensitivity() { final MulticurveSensitivity pscsyCalculator = BOND_FIXED_STD.accept(PSRCSIDC, ISSUER_MULTICURVES); final MulticurveSensitivity psycsMethod = METHOD_BOND_TR.parSpreadYieldCurveSensitivity(BOND_FIXED_STD, ISSUER_MULTICURVES); AssertSensitivityObjects.assertEquals("BondTransactionDiscountingMethod: parSpreadYield curve sensitivity", psycsMethod, pscsyCalculator, TOLERANCE_PRICE_DELTA); }