Class CashFlowEquivalentCalculator


  • public final class CashFlowEquivalentCalculator
    extends Object
    Computes cash flow equivalent of products.

    Reference: Henrard, M. The Irony in the derivatives discounting Part II: the crisis. Wilmott Journal, 2010, 2, 301-316.

    • Method Detail

      • cashFlowEquivalentSwap

        public static ResolvedSwapLeg cashFlowEquivalentSwap​(ResolvedSwap swap,
                                                             RatesProvider ratesProvider)
        Computes cash flow equivalent of swap.

        The swap should be a fix-for-Ibor swap without compounding, and its swap legs should not involve PaymentEvent.

        The return type is ResolvedSwapLeg in which individual payments are represented in terms of NotionalExchange.

        Parameters:
        swap - the swap product
        ratesProvider - the rates provider
        Returns:
        the cash flow equivalent
      • cashFlowEquivalentIborLeg

        public static ResolvedSwapLeg cashFlowEquivalentIborLeg​(ResolvedSwapLeg iborLeg,
                                                                RatesProvider ratesProvider)
        Computes cash flow equivalent of Ibor leg.

        The return type is ResolvedSwapLeg in which individual payments are represented in terms of NotionalExchange.

        Parameters:
        iborLeg - the Ibor leg
        ratesProvider - the rates provider
        Returns:
        the cash flow equivalent
      • cashFlowEquivalentFixedLeg

        public static ResolvedSwapLeg cashFlowEquivalentFixedLeg​(ResolvedSwapLeg fixedLeg,
                                                                 RatesProvider ratesProvider)
        Computes cash flow equivalent of fixed leg.

        The return type is ResolvedSwapLeg in which individual payments are represented in terms of NotionalExchange.

        Parameters:
        fixedLeg - the fixed leg
        ratesProvider - the rates provider
        Returns:
        the cash flow equivalent
      • cashFlowEquivalentAndSensitivitySwap

        public static ImmutableMap<Payment,​PointSensitivityBuilder> cashFlowEquivalentAndSensitivitySwap​(ResolvedSwap swap,
                                                                                                               RatesProvider ratesProvider)
        Computes cash flow equivalent and sensitivity of swap.

        The swap should be a fix-for-Ibor swap without compounding, and its swap legs should not involve PaymentEvent.

        The return type is a map of NotionalExchange and PointSensitivityBuilder.

        Parameters:
        swap - the swap product
        ratesProvider - the rates provider
        Returns:
        the cash flow equivalent and sensitivity
      • cashFlowEquivalentAndSensitivityIborLeg

        public static ImmutableMap<Payment,​PointSensitivityBuilder> cashFlowEquivalentAndSensitivityIborLeg​(ResolvedSwapLeg iborLeg,
                                                                                                                  RatesProvider ratesProvider)
        Computes cash flow equivalent and sensitivity of Ibor leg.

        The return type is a map of NotionalExchange and PointSensitivityBuilder.

        Parameters:
        iborLeg - the Ibor leg
        ratesProvider - the rates provider
        Returns:
        the cash flow equivalent and sensitivity
      • cashFlowEquivalentAndSensitivityFixedLeg

        public static ImmutableMap<Payment,​PointSensitivityBuilder> cashFlowEquivalentAndSensitivityFixedLeg​(ResolvedSwapLeg fixedLeg,
                                                                                                                   RatesProvider ratesProvider)
        Computes cash flow equivalent and sensitivity of fixed leg.

        The return type is a map of NotionalExchange and PointSensitivityBuilder.

        Parameters:
        fixedLeg - the fixed leg
        ratesProvider - the rates provider
        Returns:
        the cash flow equivalent and sensitivity