Class DiscountingFraTradePricer


  • public class DiscountingFraTradePricer
    extends java.lang.Object
    Pricer for for forward rate agreement (FRA) trades.

    This provides the ability to price ResolvedFraTrade. The trade is priced by pricing the underlying product using a forward curve for the index.

    • Constructor Detail

    • Method Detail

      • getProductPricer

        public DiscountingFraProductPricer getProductPricer()
        Gets the underlying product pricer.
        Returns:
        the product pricer
      • presentValue

        public CurrencyAmount presentValue​(ResolvedFraTrade trade,
                                           RatesProvider provider)
        Calculates the present value of the FRA trade.

        The present value of the trade is the value on the valuation date. This is the discounted forecast value.

        Parameters:
        trade - the trade
        provider - the rates provider
        Returns:
        the present value of the trade
      • explainPresentValue

        public ExplainMap explainPresentValue​(ResolvedFraTrade trade,
                                              RatesProvider provider)
        Explains the present value of the FRA product.

        This returns explanatory information about the calculation.

        Parameters:
        trade - the trade
        provider - the rates provider
        Returns:
        the explanatory information
      • presentValueSensitivity

        public PointSensitivities presentValueSensitivity​(ResolvedFraTrade trade,
                                                          RatesProvider provider)
        Calculates the present value sensitivity of the FRA trade.

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

        Parameters:
        trade - the trade
        provider - the rates provider
        Returns:
        the point sensitivity of the present value
      • forecastValue

        public CurrencyAmount forecastValue​(ResolvedFraTrade trade,
                                            RatesProvider provider)
        Calculates the forecast value of the FRA trade.

        The forecast value of the trade is the value on the valuation date without present value discounting.

        Parameters:
        trade - the trade
        provider - the rates provider
        Returns:
        the forecast value of the trade
      • forecastValueSensitivity

        public PointSensitivities forecastValueSensitivity​(ResolvedFraTrade trade,
                                                           RatesProvider provider)
        Calculates the forecast value sensitivity of the FRA trade.

        The forecast value sensitivity of the product is the sensitivity of the forecast value to the underlying curves.

        Parameters:
        trade - the trade
        provider - the rates provider
        Returns:
        the point sensitivity of the forecast value
      • parRate

        public double parRate​(ResolvedFraTrade trade,
                              RatesProvider provider)
        Calculates the par rate of the FRA trade.

        The par rate is the rate for which the FRA present value is 0.

        Parameters:
        trade - the trade
        provider - the rates provider
        Returns:
        the par rate
      • parRateSensitivity

        public PointSensitivities parRateSensitivity​(ResolvedFraTrade trade,
                                                     RatesProvider provider)
        Calculates the par rate curve sensitivity of the FRA trade.

        The par rate curve sensitivity of the product is the sensitivity of the par rate to the underlying curves.

        Parameters:
        trade - the trade
        provider - the rates provider
        Returns:
        the par rate sensitivity
      • parSpread

        public double parSpread​(ResolvedFraTrade trade,
                                RatesProvider provider)
        Calculates the par spread of the FRA trade.

        This is spread to be added to the fixed rate to have a present value of 0.

        Parameters:
        trade - the trade
        provider - the rates provider
        Returns:
        the par spread
      • parSpreadSensitivity

        public PointSensitivities parSpreadSensitivity​(ResolvedFraTrade trade,
                                                       RatesProvider provider)
        Calculates the par spread curve sensitivity of the FRA trade.

        The par spread curve sensitivity of the product is the sensitivity of the par spread to the underlying curves.

        Parameters:
        trade - the trade
        provider - the rates provider
        Returns:
        the par spread sensitivity
      • currencyExposure

        public MultiCurrencyAmount currencyExposure​(ResolvedFraTrade trade,
                                                    RatesProvider provider)
        Calculates the currency exposure of the FRA trade.
        Parameters:
        trade - the trade
        provider - the rates provider
        Returns:
        the currency exposure
      • currentCash

        public CurrencyAmount currentCash​(ResolvedFraTrade trade,
                                          RatesProvider provider)
        Calculates the current cash of the FRA trade.
        Parameters:
        trade - the trade
        provider - the rates provider
        Returns:
        the current cash