Class DiscountingBondFutureTradePricer


  • public final class DiscountingBondFutureTradePricer
    extends Object
    Pricer implementation for bond future trades.

    This function provides the ability to price a BondFutureTrade.

    Price

    Strata uses decimal prices for bond futures in the trade model, pricers and market data. This is coherent with the pricing of FixedCouponBond. The bond futures delivery is a bond for an amount computed from the bond future price, a conversion factor and the accrued interest.
    • Method Detail

      • price

        public double price​(ResolvedBondFutureTrade trade,
                            LegalEntityDiscountingProvider discountingProvider)
        Calculates the price of the bond future trade.

        The price of the trade is the price on the valuation date.

        Strata uses decimal prices for bond futures. This is coherent with the pricing of FixedCouponBond. For example, a price of 99.32% is represented in Strata by 0.9932.

        Parameters:
        trade - the trade
        discountingProvider - the discounting provider
        Returns:
        the price of the trade, in decimal form
      • priceWithZSpread

        public double priceWithZSpread​(ResolvedBondFutureTrade trade,
                                       LegalEntityDiscountingProvider discountingProvider,
                                       double zSpread,
                                       CompoundedRateType compoundedRateType,
                                       int periodPerYear)
        Calculates the price of the bond future trade with z-spread.

        The price of the trade is the price on the valuation date.

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

        Parameters:
        trade - the trade
        discountingProvider - the discounting provider
        zSpread - the z-spread
        compoundedRateType - the compounded rate type
        periodPerYear - the number of periods per year
        Returns:
        the price of the trade, in decimal form
      • presentValue

        public CurrencyAmount presentValue​(ResolvedBondFutureTrade trade,
                                           LegalEntityDiscountingProvider discountingProvider,
                                           double lastSettlementPrice)
        Calculates the present value of the bond future trade.

        The present value of the product is the value on the valuation date.

        This method calculates based on the difference between the model price and the last settlement price, or the trade price if traded on the valuation date.

        Parameters:
        trade - the trade
        discountingProvider - the discounting provider
        lastSettlementPrice - the last settlement price used for margining, in decimal form
        Returns:
        the present value
      • presentValueWithZSpread

        public CurrencyAmount presentValueWithZSpread​(ResolvedBondFutureTrade trade,
                                                      LegalEntityDiscountingProvider discountingProvider,
                                                      double lastSettlementPrice,
                                                      double zSpread,
                                                      CompoundedRateType compoundedRateType,
                                                      int periodPerYear)
        Calculates the present value of the bond future trade with z-spread.

        The present value of the product is the value on the valuation date.

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

        This method calculates based on the difference between the model price and the last settlement price, or the trade price if traded on the valuation date.

        Parameters:
        trade - the trade
        discountingProvider - the discounting provider
        lastSettlementPrice - the last settlement price used for margining, in decimal form
        zSpread - the z-spread
        compoundedRateType - the compounded rate type
        periodPerYear - the number of periods per year
        Returns:
        the present value
      • presentValueSensitivity

        public PointSensitivities presentValueSensitivity​(ResolvedBondFutureTrade trade,
                                                          LegalEntityDiscountingProvider discountingProvider)
        Calculates the present value sensitivity of the bond future trade.

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

        Parameters:
        trade - the trade
        discountingProvider - the discounting provider
        Returns:
        the present value curve sensitivity of the trade
      • presentValueSensitivityWithZSpread

        public PointSensitivities presentValueSensitivityWithZSpread​(ResolvedBondFutureTrade trade,
                                                                     LegalEntityDiscountingProvider discountingProvider,
                                                                     double zSpread,
                                                                     CompoundedRateType compoundedRateType,
                                                                     int periodPerYear)
        Calculates the present value sensitivity of the bond future trade with z-spread.

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

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

        Parameters:
        trade - the trade
        discountingProvider - the discounting provider
        zSpread - the z-spread
        compoundedRateType - the compounded rate type
        periodPerYear - the number of periods per year
        Returns:
        the present value curve sensitivity of the trade
      • parSpread

        public double parSpread​(ResolvedBondFutureTrade trade,
                                LegalEntityDiscountingProvider discountingProvider,
                                double lastSettlementPrice)
        Calculates the par spread of the bond future trade.

        The par spread is defined in the following way. When the reference price (or market quote) is increased by the par spread, the present value of the trade is zero.

        This method calculates based on the difference between the model price and the last settlement price, or the trade price if traded on the valuation date.

        Parameters:
        trade - the trade
        discountingProvider - the discounting provider
        lastSettlementPrice - the last settlement price used for margining, in decimal form
        Returns:
        the par spread
      • parSpreadWithZSpread

        public double parSpreadWithZSpread​(ResolvedBondFutureTrade trade,
                                           LegalEntityDiscountingProvider discountingProvider,
                                           double lastSettlementPrice,
                                           double zSpread,
                                           CompoundedRateType compoundedRateType,
                                           int periodPerYear)
        Calculates the par spread of the bond future trade with z-spread.

        The par spread is defined in the following way. When the reference price (or market quote) is increased by the par spread, the present value of the trade is zero.

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

        This method calculates based on the difference between the model price and the last settlement price, or the trade price if traded on the valuation date.

        Parameters:
        trade - the trade
        discountingProvider - the discounting provider
        lastSettlementPrice - the last settlement price used for margining, in decimal form
        zSpread - the z-spread
        compoundedRateType - the compounded rate type
        periodPerYear - the number of periods per year
        Returns:
        the par spread
      • parSpreadSensitivity

        public PointSensitivities parSpreadSensitivity​(ResolvedBondFutureTrade trade,
                                                       LegalEntityDiscountingProvider discountingProvider)
        Calculates the par spread sensitivity of the bond future trade.

        The par spread sensitivity of the trade is the sensitivity of the par spread to the underlying curves.

        Parameters:
        trade - the trade
        discountingProvider - the discounting provider
        Returns:
        the par spread curve sensitivity of the trade
      • parSpreadSensitivityWithZSpread

        public PointSensitivities parSpreadSensitivityWithZSpread​(ResolvedBondFutureTrade trade,
                                                                  LegalEntityDiscountingProvider discountingProvider,
                                                                  double zSpread,
                                                                  CompoundedRateType compoundedRateType,
                                                                  int periodPerYear)
        Calculates the par spread sensitivity of the bond future trade with z-spread.

        The par spread sensitivity of the trade is the sensitivity of the par spread to the underlying curves.

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

        Parameters:
        trade - the trade
        discountingProvider - the discounting provider
        zSpread - the z-spread
        compoundedRateType - the compounded rate type
        periodPerYear - the number of periods per year
        Returns:
        the par spread curve sensitivity of the trade
      • currencyExposure

        public MultiCurrencyAmount currencyExposure​(ResolvedBondFutureTrade trade,
                                                    LegalEntityDiscountingProvider discountingProvider,
                                                    double lastSettlementPrice)
        Calculates the currency exposure of the bond future trade.

        This method calculates based on the difference between the model price and the last settlement price, or the trade price if traded on the valuation date.

        Parameters:
        trade - the trade
        discountingProvider - the discounting provider
        lastSettlementPrice - the last settlement price used for margining, in decimal form
        Returns:
        the currency exposure of the bond future trade
      • currencyExposureWithZSpread

        public MultiCurrencyAmount currencyExposureWithZSpread​(ResolvedBondFutureTrade trade,
                                                               LegalEntityDiscountingProvider discountingProvider,
                                                               double lastSettlementPrice,
                                                               double zSpread,
                                                               CompoundedRateType compoundedRateType,
                                                               int periodPerYear)
        Calculates the currency exposure of the bond future trade with z-spread.

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

        This method calculates based on the difference between the model price and the last settlement price, or the trade price if traded on the valuation date.

        Parameters:
        trade - the trade
        discountingProvider - the discounting provider
        lastSettlementPrice - the last settlement price used for margining, in decimal form
        zSpread - the z-spread
        compoundedRateType - the compounded rate type
        periodPerYear - the number of periods per year
        Returns:
        the currency exposure of the bond future trade