Class DiscountingDsfTradePricer


  • public class DiscountingDsfTradePricer
    extends java.lang.Object
    Pricer implementation for Deliverable Swap Futures (DSFs).

    This function provides the ability to price a ResolvedDsfTrade.

    Price

    The price of a DSF is based on the present value (NPV) of the underlying swap on the delivery date. For example, a price of 100.182 represents a present value of $100,182.00, if the notional is $100,000. This price can also be viewed as a percentage present value - (100 + percentPv), or 0.182% in this example.

    Strata uses decimal prices for DSFs in the trade model, pricers and market data. The decimal price is based on the decimal multiplier equivalent to the implied percentage. Thus the market price of 100.182 is represented in Strata by 1.00182.

    • Constructor Detail

      • DiscountingDsfTradePricer

        public DiscountingDsfTradePricer​(DiscountingDsfProductPricer productPricer)
        Creates an instance.
        Parameters:
        productPricer - the pricer for Dsf
    • Method Detail

      • price

        public double price​(ResolvedDsfTrade trade,
                            RatesProvider ratesProvider)
        Calculates the price of the underlying deliverable swap futures product.

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

        Parameters:
        trade - the trade
        ratesProvider - the rates provider
        Returns:
        the price of the trade, in decimal form
      • priceSensitivity

        public PointSensitivities priceSensitivity​(ResolvedDsfTrade trade,
                                                   RatesProvider ratesProvider)
        Calculates the price sensitivity of the deliverable swap futures product.

        The price sensitivity of the product is the sensitivity of the price to the underlying curves.

        Parameters:
        trade - the trade
        ratesProvider - the rates provider
        Returns:
        the price curve sensitivity of the trade
      • presentValue

        public CurrencyAmount presentValue​(ResolvedDsfTrade trade,
                                           RatesProvider ratesProvider,
                                           double lastSettlementPrice)
        Calculates the present value of the deliverable swap futures trade.

        The present value of the product is the value on the valuation date. The current price is calculated using the discounting model.

        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
        ratesProvider - the rates provider
        lastSettlementPrice - the last settlement price used for margining, in decimal form
        Returns:
        the present value
      • presentValueSensitivity

        public PointSensitivities presentValueSensitivity​(ResolvedDsfTrade trade,
                                                          RatesProvider ratesProvider)
        Calculates the present value sensitivity of the deliverable swap futures trade.

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

        Parameters:
        trade - the trade
        ratesProvider - the rates provider
        Returns:
        the present value curve sensitivity of the trade
      • currencyExposure

        public MultiCurrencyAmount currencyExposure​(ResolvedDsfTrade trade,
                                                    RatesProvider ratesProvider,
                                                    double lastSettlementPrice)
        Calculates the currency exposure of the deliverable swap futures trade.

        Since the deliverable swap futures is based on a single currency, the trade is exposed to only this currency. The current price is calculated using the discounting model.

        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
        ratesProvider - the rates provider
        lastSettlementPrice - the last settlement price used for margining, in decimal form
        Returns:
        the currency exposure of the trade