BondCapitalIndexedSecurityDiscountingMethod { public MultipleCurrencyAmount presentValueFromCleanRealPrice(final BondCapitalIndexedSecurity<?> bond, final InflationIssuerProviderInterface market, final double cleanPriceReal) { Validate.notNull(bond, "Coupon"); Validate.notNull(market, "Market"); double settlementFactor = bond.getIndexRatio(); final double cleanPriceNominal = cleanPriceReal * settlementFactor; return presentValueFromCleanNominalPrice(bond, market, cleanPriceNominal); }  static BondCapitalIndexedSecurityDiscountingMethod getInstance(); MultipleCurrencyAmount presentValue(final BondCapitalIndexedSecurity<?> bond, 
      final ParameterInflationIssuerProviderInterface provider); MultipleCurrencyAmount presentValueFromCleanRealPrice(final BondCapitalIndexedSecurity<?> bond, 
      final InflationIssuerProviderInterface market, final double cleanPriceReal); MultipleCurrencyAmount presentValueFromCleanNominalPrice(final BondCapitalIndexedSecurity<?> bond, 
      final InflationIssuerProviderInterface market, final double cleanPriceNominal); double accruedInterestFromCleanRealPrice(final BondCapitalIndexedSecurity<?> bond, final double cleanPrice); double accruedInterestFromCleanYield(final BondCapitalIndexedSecurity<?> bond, final double yield); double cleanRealPriceFromDirtyRealPrice(final BondCapitalIndexedSecurity<?> bond, final double dirtyPrice); double cleanNominalPriceFromDirtyNominalPrice(final BondCapitalIndexedSecurity<?> bond, final double dirtyPrice); double cleanRealPriceFromCurves(final BondCapitalIndexedSecurity<?> bond, 
      final InflationIssuerProviderInterface curves); double cleanNominalPriceFromCurves(final BondCapitalIndexedSecurity<?> bond, final InflationIssuerProviderInterface issuerMulticurves); double cleanRealPriceFromCleanNominalPrice(final BondCapitalIndexedSecurity<?> bond, final double cleanNominalPrice, final InflationIssuerProviderInterface issuerMulticurves); double dirtyNominalPriceFromCurves(final BondCapitalIndexedSecurity<?> bond, final InflationIssuerProviderInterface issuerMulticurves); double dirtyRealPriceFromCurves(final BondCapitalIndexedSecurity<?> bond, final InflationIssuerProviderInterface issuerMulticurves); double dirtyRealPriceFromCleanRealPrice(final BondCapitalIndexedSecurity<?> bond, final double cleanPrice); MultipleCurrencyAmount netAmount(final BondCapitalIndexedSecurity<Coupon> bond, final InflationIssuerProviderInterface market, final double cleanPriceReal); double dirtyPriceFromRealYield(final BondCapitalIndexedSecurity<?> bond, final double yield); double cleanPriceFromYield(final BondCapitalIndexedSecurity<?> bond, final double yield); double yieldRealFromDirtyRealPrice(final BondCapitalIndexedSecurity<?> bond, final double dirtyPrice); MultipleCurrencyInflationSensitivity presentValueCurveSensitivity(final BondCapitalIndexedSecurity<?> bond, 
      final ParameterInflationIssuerProviderInterface provider); double yieldRealFromCleanPrice(final BondCapitalIndexedSecurity<?> bond, final double cleanPrice); double modifiedDurationFromYieldStandard(final BondCapitalIndexedSecurity<?> bond, final double yield); double modifiedDurationFromYieldFiniteDifference(final BondCapitalIndexedSecurity<?> bond, final double yield); double convexityFromYieldFiniteDifference(final BondCapitalIndexedSecurity<?> bond, final double yield); double yieldRealFromCurves(final BondCapitalIndexedSecurity<?> bond, final InflationIssuerProviderInterface provider); double modifiedDurationFromCurves(final BondCapitalIndexedSecurity<?> bond, final InflationIssuerProviderInterface issuerMulticurves); double yieldRealFromCleanRealPrice(final BondCapitalIndexedSecurity<?> bond, final double cleanPrice); double modifiedDurationFromCleanPrice(final BondCapitalIndexedSecurity<?> bond, final double cleanPrice); double convexityFromYieldStandard(final BondCapitalIndexedSecurity<?> bond, final double yield); double convexityFromCurves(final BondCapitalIndexedSecurity<?> bond, final InflationIssuerProviderInterface issuerMulticurves); double convexityFromCleanPrice(final BondCapitalIndexedSecurity<?> bond, final double cleanPrice); MultipleCurrencyAmount presentValueFromZSpread(final BondCapitalIndexedSecurity<?> bond, final InflationIssuerProviderInterface issuerMulticurves, final double zSpread); double cleanPriceFromZSpread(final BondCapitalIndexedSecurity<?> bond, final InflationIssuerProviderInterface issuerMulticurves, final double zSpread); double zSpreadFromCurvesAndCleanPriceDirect(final BondCapitalIndexedSecurity<?> bond, final InflationIssuerProviderInterface issuerMulticurves, final double cleanPrice); double zSpreadFromCurvesAndCleanRealPriceDirect(final BondCapitalIndexedSecurity<?> bond, final InflationIssuerProviderInterface issuerMulticurves, final double cleanRealPrice); double zSpreadFromCurvesAndCleanNominalPriceDirect(final BondCapitalIndexedSecurity<?> bond, final InflationIssuerProviderInterface issuerMulticurves, final double cleanRealPrice); double zSpreadFromCurvesAndPV(final BondCapitalIndexedSecurity<?> bond, final InflationIssuerProviderInterface issuerMulticurves, final MultipleCurrencyAmount pv); double zSpreadFromCurvesAndCleanPrice(final BondCapitalIndexedSecurity<Coupon> bond, final InflationIssuerProviderInterface issuerMulticurves, final double cleanPrice);  }
@Test public void presentValueFromCleanPriceRealTips1() { final double cleanPriceReal = 1.05; Currency ccy = BOND_SECURITY_TIPS_1.getCurrency(); final MultipleCurrencyAmount pv = METHOD_BOND_INFLATION.presentValueFromCleanRealPrice(BOND_SECURITY_TIPS_1, MARKET, cleanPriceReal); MultipleCurrencyAmount pvPriceReal = BOND_SECURITY_TIPS_1.getSettlement().accept(PVDIIC, MARKET).multipliedBy(cleanPriceReal); MultipleCurrencyAmount pvAccrued = BOND_SECURITY_TIPS_1.getSettlement().accept(PVDIC, MARKET). multipliedBy(BOND_SECURITY_TIPS_1.getAccruedInterest()); MultipleCurrencyAmount pvExpected = pvPriceReal.plus(pvAccrued); assertEquals("Inflation Capital Indexed bond: present value from clean real price", pvExpected.getAmount(ccy), pv.getAmount(ccy), 1.0E-6); }