Class ImmutableFixedInflationSwapConvention

  • All Implemented Interfaces:
    Named, FixedInflationSwapConvention, SingleCurrencySwapConvention, TradeConvention,, Bean, ImmutableBean

    public final class ImmutableFixedInflationSwapConvention
    extends java.lang.Object
    implements FixedInflationSwapConvention, ImmutableBean,
    A market convention for Fixed-Inflation swap trades.

    This defines the market convention for a Fixed-Inflation single currency swap. The convention is formed by combining two swap leg conventions in the same currency.

    The convention is defined by four key dates.

    • Trade date, the date that the trade is agreed
    • Spot date, the base for date calculations, typically 2 business days after the trade date
    • Start date, the date on which the interest calculation starts, often the same as the spot date
    • End date, the date on which the interest calculation ends, typically a number of years after the start date
    See Also:
    Serialized Form
    • Method Detail

      • of

        public static ImmutableFixedInflationSwapConvention of​(java.lang.String name,
                                                               FixedRateSwapLegConvention fixedLeg,
                                                               InflationRateSwapLegConvention floatingLeg,
                                                               DaysAdjustment spotDateOffset)
        Obtains a convention based on the specified name and leg conventions.

        The two leg conventions must be in the same currency.

        name - the unique name of the convention
        fixedLeg - the market convention for the fixed leg
        floatingLeg - the market convention for the floating leg
        spotDateOffset - the offset of the spot value date from the trade date
        the convention
      • toTrade

        public SwapTrade toTrade​(TradeInfo tradeInfo,
                                 java.time.LocalDate startDate,
                                 java.time.LocalDate endDate,
                                 BuySell buySell,
                                 double notional,
                                 double fixedRate)
        Description copied from interface: FixedInflationSwapConvention
        Creates a trade based on this convention.

        This returns a trade based on the specified dates.

        The notional is unsigned, with buy/sell determining the direction of the trade. If buying the swap, the floating rate is received from the counterparty, with the fixed rate being paid. If selling the swap, the floating rate is paid to the counterparty, with the fixed rate being received.

        Specified by:
        toTrade in interface FixedInflationSwapConvention
        Specified by:
        toTrade in interface SingleCurrencySwapConvention
        tradeInfo - additional information about the trade
        startDate - the start date
        endDate - the end date
        buySell - the buy/sell flag
        notional - the notional amount
        fixedRate - the fixed rate, typically derived from the market
        the trade
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object
      • getSpotDateOffset

        public DaysAdjustment getSpotDateOffset()
        Gets the offset of the spot value date from the trade date.

        The offset is applied to the trade date to find the start date. A typical value is "plus 2 business days".

        Specified by:
        getSpotDateOffset in interface SingleCurrencySwapConvention
        the value of the property, not null
      • equals

        public boolean equals​(java.lang.Object obj)
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        hashCode in class java.lang.Object