Class DiscountingBillTradePricer


  • public class DiscountingBillTradePricer
    extends Object
    Pricer for bill trades.

    This function provides the ability to price a ResolvedBillTrade.

    • Method Detail

      • presentValue

        public CurrencyAmount presentValue​(ResolvedBillTrade trade,
                                           LegalEntityDiscountingProvider provider)
        Calculates the present value of a bill trade.

        If the settlement details are provided, the present value is the sum of the underlying product's present value multiplied by the quantity and the present value of the settlement payment if still due at the valuation date. If not it is the underlying product's present value multiplied by the quantity.

        Parameters:
        trade - the trade
        provider - the discounting provider
        Returns:
        the present value
      • presentValueWithZSpread

        public CurrencyAmount presentValueWithZSpread​(ResolvedBillTrade trade,
                                                      LegalEntityDiscountingProvider provider,
                                                      double zSpread,
                                                      CompoundedRateType compoundedRateType,
                                                      int periodsPerYear)
        Calculates the present value of a bill trade with z-spread.

        If the settlement details are provided, the present value is the sum of the underlying product's present value multiplied by the quantity and the present value of the settlement payment if still due at the valuation date. If not it is the underlying product's present value multiplied by the quantity.

        The z-spread is a parallel shift applied to continuously compounded rates or periodic compounded rates of the issuer discounting curve. The z-spread is applied only on the legal entity curve, not on the repo curve used for the settlement amount.

        Parameters:
        trade - the trade
        provider - the discounting provider
        zSpread - the z-spread
        compoundedRateType - the compounded rate type
        periodsPerYear - the number of periods per year
        Returns:
        the present value
      • presentValueSensitivity

        public PointSensitivities presentValueSensitivity​(ResolvedBillTrade trade,
                                                          LegalEntityDiscountingProvider provider)
        Calculates the present value sensitivity of a bill trade.

        If the settlement details are provided, the sensitivity is the sum of the underlying product's sensitivity multiplied by the quantity and the sensitivity of the settlement payment if still due at the valuation date. If not it is the underlying product's sensitivity multiplied by the quantity.

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

        public PointSensitivities presentValueSensitivityWithZSpread​(ResolvedBillTrade trade,
                                                                     LegalEntityDiscountingProvider provider,
                                                                     double zSpread,
                                                                     CompoundedRateType compoundedRateType,
                                                                     int periodsPerYear)
        Calculates the present value sensitivity of a bill trade with z-spread.

        If the settlement details are provided, the sensitivity is the sum of the underlying product's sensitivity multiplied by the quantity and the sensitivity of the settlement payment if still due at the valuation date. If not it is the underlying product's sensitivity multiplied by the quantity.

        The z-spread is a parallel shift applied to continuously compounded rates or periodic compounded rates of the issuer discounting curve. The z-spread is applied only on the legal entity curve, not on the repo curve used for the settlement amount.

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

        public MultiCurrencyAmount currencyExposureWithZSpread​(ResolvedBillTrade trade,
                                                               LegalEntityDiscountingProvider provider,
                                                               double zSpread,
                                                               CompoundedRateType compoundedRateType,
                                                               int periodsPerYear)
        Calculates the currency exposure of a bill trade with z-spread.
        Parameters:
        trade - the trade
        provider - the discounting provider
        zSpread - the z-spread
        compoundedRateType - the compounded rate type
        periodsPerYear - the number of periods per year
        Returns:
        the currency exposure
      • currentCash

        public CurrencyAmount currentCash​(ResolvedBillTrade trade,
                                          LocalDate valuationDate)
        Calculates the current cash of a bill trade.
        Parameters:
        trade - the trade
        valuationDate - the valuation date
        Returns:
        the current cash amount