Class FixedInflationSwapTemplate

  • All Implemented Interfaces:
    TradeTemplate, java.io.Serializable, Bean, ImmutableBean

    public final class FixedInflationSwapTemplate
    extends java.lang.Object
    implements TradeTemplate, ImmutableBean, java.io.Serializable
    An template for creating inflation swap trades.

    This defines almost all the data necessary to create a Inflation single currency SwapTrade. The trade date, end date, lag, notional and fixed rate are required to complete the template and create the trade. As such, it is often possible to get a market price for a trade based on the template. The market price is typically quoted as a bid/ask on the fixed rate.

    See Also:
    Serialized Form
    • Method Detail

      • createTrade

        public SwapTrade createTrade​(java.time.LocalDate tradeDate,
                                     BuySell buySell,
                                     double notional,
                                     double fixedRate,
                                     ReferenceData refData)
        Creates a trade based on this template.

        This returns a trade based on the specified trade date.

        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.

        Parameters:
        tradeDate - the date of the trade
        buySell - the buy/sell flag
        notional - the notional amount, in the payment currency of the template
        fixedRate - the fixed rate, typically derived from the market
        refData - the reference data, used to resolve the trade dates
        Returns:
        the trade
        Throws:
        ReferenceDataNotFoundException - if an identifier cannot be resolved in the reference data
      • getTenor

        public Tenor getTenor()
        Gets the tenor of the swap.

        This is the period from the first accrual date to the last accrual date.

        Returns:
        the value of the property, not null
      • getConvention

        public FixedInflationSwapConvention getConvention()
        Gets the market convention of the swap.
        Returns:
        the value of the property, not null
      • equals

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

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object