Class DiscountingCapitalIndexedBondTradePricer


  • public class DiscountingCapitalIndexedBondTradePricer
    extends Object
    Pricer for for capital index bond trades.

    This function provides the ability to price a ResolvedCapitalIndexedBondTrade.

    Price

    Strata uses decimal prices for bonds in the trade model, pricers and market data. For example, a price of 99.32% is represented in Strata by 0.9932.
    • Method Detail

      • presentValue

        public CurrencyAmount presentValue​(ResolvedCapitalIndexedBondTrade trade,
                                           RatesProvider ratesProvider,
                                           LegalEntityDiscountingProvider discountingProvider)
        Calculates the present value of the bond trade.

        The present value of the trade is the value on the valuation date. The result is expressed using the payment currency of the bond.

        Coupon payments of the underlying product are considered based on the settlement date of the trade.

        Parameters:
        trade - the trade
        ratesProvider - the rates provider, used to determine price index values
        discountingProvider - the discount factors provider
        Returns:
        the present value of the bond trade
      • presentValueWithZSpread

        public CurrencyAmount presentValueWithZSpread​(ResolvedCapitalIndexedBondTrade trade,
                                                      RatesProvider ratesProvider,
                                                      LegalEntityDiscountingProvider discountingProvider,
                                                      double zSpread,
                                                      CompoundedRateType compoundedRateType,
                                                      int periodsPerYear)
        Calculates the present value of the bond trade with z-spread.

        The present value of the trade is the value on the valuation date. The result is expressed using the payment currency of the bond.

        The z-spread is a parallel shift applied to continuously compounded rates or periodic compounded rates of the discounting curve.

        Coupon payments of the underlying product are considered based on the settlement date of the trade.

        Parameters:
        trade - the trade
        ratesProvider - the rates provider, used to determine price index values
        discountingProvider - the discount factors provider
        zSpread - the z-spread
        compoundedRateType - the compounded rate type
        periodsPerYear - the number of periods per year
        Returns:
        the present value of the bond trade
      • presentValueSensitivity

        public PointSensitivities presentValueSensitivity​(ResolvedCapitalIndexedBondTrade trade,
                                                          RatesProvider ratesProvider,
                                                          LegalEntityDiscountingProvider discountingProvider)
        Calculates the present value sensitivity of the bond trade.

        The present value sensitivity of the trade is the sensitivity of the present value to the underlying curves.

        Coupon payments of the underlying product are considered based on the settlement date of the trade.

        Parameters:
        trade - the trade
        ratesProvider - the rates provider, used to determine price index values
        discountingProvider - the discount factors provider
        Returns:
        the present value sensitivity of the bond trade
      • presentValueSensitivityWithZSpread

        public PointSensitivities presentValueSensitivityWithZSpread​(ResolvedCapitalIndexedBondTrade trade,
                                                                     RatesProvider ratesProvider,
                                                                     LegalEntityDiscountingProvider discountingProvider,
                                                                     double zSpread,
                                                                     CompoundedRateType compoundedRateType,
                                                                     int periodsPerYear)
        Calculates the present value sensitivity of the bond trade with z-spread.

        The present value sensitivity of the trade is the sensitivity of the present value to the underlying curves.

        Coupon payments of the underlying product are considered based on the settlement date of the trade.

        Parameters:
        trade - the trade
        ratesProvider - the rates provider, used to determine price index values
        discountingProvider - the discount factors provider
        zSpread - the z-spread
        compoundedRateType - the compounded rate type
        periodsPerYear - the number of periods per year
        Returns:
        the present value sensitivity of the bond trade
      • presentValueFromCleanPrice

        public CurrencyAmount presentValueFromCleanPrice​(ResolvedCapitalIndexedBondTrade trade,
                                                         RatesProvider ratesProvider,
                                                         LegalEntityDiscountingProvider discountingProvider,
                                                         ReferenceData refData,
                                                         double cleanRealPrice)
        Calculates the present value of the bond trade from the clean price.

        Since the sign of the settlement notional is opposite to that of the product, negative amount will be returned for positive quantity of trade.

        Parameters:
        trade - the trade
        ratesProvider - the rates provider, used to determine price index values
        refData - the reference data used to calculate the settlement date
        discountingProvider - the discount factors provider
        cleanRealPrice - the clean real price
        Returns:
        the present value of the settlement
      • presentValueFromCleanPriceWithZSpread

        public CurrencyAmount presentValueFromCleanPriceWithZSpread​(ResolvedCapitalIndexedBondTrade trade,
                                                                    RatesProvider ratesProvider,
                                                                    LegalEntityDiscountingProvider discountingProvider,
                                                                    ReferenceData refData,
                                                                    double cleanRealPrice,
                                                                    double zSpread,
                                                                    CompoundedRateType compoundedRateType,
                                                                    int periodsPerYear)
        Calculates the present value of the settlement of the bond trade from the clean price with z-spread.

        Since the sign of the settlement notional is opposite to that of the product, negative amount will be returned for positive quantity of trade.

        The z-spread is a parallel shift applied to continuously compounded rates or periodic compounded rates of the discounting curve.

        Parameters:
        trade - the trade
        ratesProvider - the rates provider, used to determine price index values
        discountingProvider - the discount factors provider
        refData - the reference data used to calculate the settlement date
        zSpread - the z-spread
        compoundedRateType - the compounded rate type
        periodsPerYear - the number of periods per year
        cleanRealPrice - the clean real price
        Returns:
        the present value of the settlement
      • presentValueSensitivityFromCleanPrice

        public PointSensitivities presentValueSensitivityFromCleanPrice​(ResolvedCapitalIndexedBondTrade trade,
                                                                        RatesProvider ratesProvider,
                                                                        LegalEntityDiscountingProvider discountingProvider,
                                                                        ReferenceData refData,
                                                                        double cleanRealPrice)
        Calculates the present value sensitivity of the settlement of the bond trade from the real clean price.

        The present value sensitivity of the settlement is the sensitivity of the present value to the underlying curves.

        Parameters:
        trade - the trade
        ratesProvider - the rates provider, used to determine price index values
        refData - the reference data used to calculate the settlement date
        discountingProvider - the discount factors provider
        cleanRealPrice - the clean real price
        Returns:
        the present value sensitivity of the settlement
      • presentValueSensitivityFromCleanPriceWithZSpread

        public PointSensitivities presentValueSensitivityFromCleanPriceWithZSpread​(ResolvedCapitalIndexedBondTrade trade,
                                                                                   RatesProvider ratesProvider,
                                                                                   LegalEntityDiscountingProvider discountingProvider,
                                                                                   ReferenceData refData,
                                                                                   double cleanRealPrice,
                                                                                   double zSpread,
                                                                                   CompoundedRateType compoundedRateType,
                                                                                   int periodsPerYear)
        Calculates the present value sensitivity of the settlement of the bond trade from the real clean price with z-spread.

        The present value sensitivity of the settlement is the sensitivity of the present value to the underlying curves.

        Parameters:
        trade - the trade
        ratesProvider - the rates provider, used to determine price index values
        refData - the reference data used to calculate the settlement date
        discountingProvider - the discount factors provider
        zSpread - the z-spread
        compoundedRateType - the compounded rate type
        periodsPerYear - the number of periods per year
        cleanRealPrice - the clean real price
        Returns:
        the present value sensitivity of the settlement
      • currencyExposureFromCleanPrice

        public MultiCurrencyAmount currencyExposureFromCleanPrice​(ResolvedCapitalIndexedBondTrade trade,
                                                                  RatesProvider ratesProvider,
                                                                  LegalEntityDiscountingProvider discountingProvider,
                                                                  ReferenceData refData,
                                                                  double cleanRealPrice)
        Calculates the currency exposure of the bond trade.
        Parameters:
        trade - the trade
        ratesProvider - the rates provider, used to determine price index values
        discountingProvider - the discount factors provider
        refData - the reference data used to calculate the settlement date
        cleanRealPrice - the clean real price
        Returns:
        the currency exposure of the trade
      • currencyExposureFromCleanPriceWithZSpread

        public MultiCurrencyAmount currencyExposureFromCleanPriceWithZSpread​(ResolvedCapitalIndexedBondTrade trade,
                                                                             RatesProvider ratesProvider,
                                                                             LegalEntityDiscountingProvider discountingProvider,
                                                                             ReferenceData refData,
                                                                             double cleanRealPrice,
                                                                             double zSpread,
                                                                             CompoundedRateType compoundedRateType,
                                                                             int periodsPerYear)
        Calculates the currency exposure of the bond trade with z-spread.
        Parameters:
        trade - the trade
        ratesProvider - the rates provider, used to determine price index values
        discountingProvider - the discount factors provider
        refData - the reference data used to calculate the settlement date
        zSpread - the z-spread
        compoundedRateType - the compounded rate type
        periodsPerYear - the number of periods per year
        cleanRealPrice - the clean real price
        Returns:
        the currency exposure of the trade
      • currencyExposureWithZSpread

        public MultiCurrencyAmount currencyExposureWithZSpread​(ResolvedCapitalIndexedBondTrade trade,
                                                               RatesProvider ratesProvider,
                                                               LegalEntityDiscountingProvider discountingProvider,
                                                               double zSpread,
                                                               CompoundedRateType compoundedRateType,
                                                               int periodsPerYear)
        Calculates the currency exposure of the bond trade with z-spread.
        Parameters:
        trade - the trade
        ratesProvider - the rates provider, used to determine price index values
        discountingProvider - the discount factors provider
        zSpread - the z-spread
        compoundedRateType - the compounded rate type
        periodsPerYear - the number of periods per year
        Returns:
        the currency exposure of the trade
      • currentCash

        public CurrencyAmount currentCash​(ResolvedCapitalIndexedBondTrade trade,
                                          RatesProvider ratesProvider)
        Calculates the current cash of the bond trade.
        Parameters:
        trade - the trade
        ratesProvider - the rates provider, used to determine price index values
        Returns:
        the current cash
      • netAmount

        public CurrencyAmount netAmount​(ResolvedCapitalIndexedBondTrade trade,
                                        RatesProvider ratesProvider)
        Calculates the net amount of the settlement of the bond trade.

        Since the sign of the settlement notional is opposite to that of the product, negative amount will be returned for positive quantity of trade.

        Parameters:
        trade - the trade
        ratesProvider - the rates provider, used to determine price index values
        Returns:
        the net amount