Interface XCcyIborIborSwapConvention

  • All Superinterfaces:
    Named, TradeConvention
    All Known Implementing Classes:
    ImmutableXCcyIborIborSwapConvention

    public interface XCcyIborIborSwapConvention
    extends TradeConvention, Named
    A market convention for cross-currency Ibor-Ibor swap trades without FX reset.

    This defines the market convention for a cross-currency Ibor-Ibor swap. The convention is formed by combining two swap leg conventions in different currencies.

    The market price is for the difference (spread) between the values of the two legs. This convention has two legs, the "spread leg" and the "flat leg". The spread will be added to the "spread leg".

    For example, a 'EUR/USD' basis swap has 'EUR-EURIBOR-3M' as the spread leg and 'USD-LIBOR-3M' as the flat leg.

    To manually create a convention, see ImmutableXCcyIborIborSwapConvention. To register a specific convention, see XCcyIborIborSwapConvention.ini.

    • Method Detail

      • extendedEnum

        static ExtendedEnum<XCcyIborIborSwapConvention> extendedEnum()
        Gets the extended enum helper.

        This helper allows instances of the convention to be looked up. It also provides the complete set of available instances.

        Returns:
        the extended enum helper
      • getSpreadLeg

        IborRateSwapLegConvention getSpreadLeg()
        Gets the market convention of the floating leg that has the spread applied.

        The spread is the market price of the instrument. It is added to the observed interest rate.

        Returns:
        the spread leg convention
      • getFlatLeg

        IborRateSwapLegConvention getFlatLeg()
        Gets the market convention of the floating leg that does not have the spread applied.
        Returns:
        the flat leg convention
      • getSpotDateOffset

        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".

        Returns:
        the spot date offset, not null
      • getCurrencyPair

        default CurrencyPair getCurrencyPair()
        Gets the currency pair of the convention.
        Returns:
        the currency pair
      • createTrade

        default SwapTrade createTrade​(LocalDate tradeDate,
                                      Tenor tenor,
                                      BuySell buySell,
                                      double notionalSpreadLeg,
                                      double notionalFlatLeg,
                                      double spread,
                                      ReferenceData refData)
        Creates a spot-starting trade based on this convention.

        This returns a trade based on the specified tenor. For example, a tenor of 5 years creates a swap starting on the spot date and maturing 5 years later.

        The notionals are unsigned, with buy/sell determining the direction of the trade. If buying the swap, the rate of the flat leg is received, with the rate of the spread leg being paid. If selling the swap, the opposite occurs.

        Parameters:
        tradeDate - the date of the trade
        tenor - the tenor of the swap
        buySell - the buy/sell flag
        notionalSpreadLeg - the notional amount for the spread leg
        notionalFlatLeg - the notional amount for the flat leg
        spread - the spread, 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
      • createTrade

        default SwapTrade createTrade​(LocalDate tradeDate,
                                      Period periodToStart,
                                      Tenor tenor,
                                      BuySell buySell,
                                      double notionalSpreadLeg,
                                      double notionalFlatLeg,
                                      double spread,
                                      ReferenceData refData)
        Creates a forward-starting trade based on this convention.

        This returns a trade based on the specified period and tenor. For example, a period of 3 months and a tenor of 5 years creates a swap starting three months after the spot date and maturing 5 years later.

        The notional is unsigned, with buy/sell determining the direction of the trade. If buying the swap, the rate of the flat leg is received, with the rate of the spread leg being paid. If selling the swap, the opposite occurs.

        Parameters:
        tradeDate - the date of the trade
        periodToStart - the period between the spot date and the start date
        tenor - the tenor of the swap
        buySell - the buy/sell flag
        notionalSpreadLeg - the notional amount for the spread leg
        notionalFlatLeg - the notional amount for the flat leg
        spread - the spread, 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
      • toTrade

        default SwapTrade toTrade​(LocalDate tradeDate,
                                  LocalDate startDate,
                                  LocalDate endDate,
                                  BuySell buySell,
                                  double notionalSpreadLeg,
                                  double notionalFlatLeg,
                                  double spread)
        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 rate of the flat leg is received, with the rate of the spread leg being paid. If selling the swap, the opposite occurs.

        Parameters:
        tradeDate - the date of the trade
        startDate - the start date
        endDate - the end date
        buySell - the buy/sell flag
        notionalSpreadLeg - the notional amount for the spread leg
        notionalFlatLeg - the notional amount for the flat leg
        spread - the spread, typically derived from the market
        Returns:
        the trade
      • toTrade

        SwapTrade toTrade​(TradeInfo tradeInfo,
                          LocalDate startDate,
                          LocalDate endDate,
                          BuySell buySell,
                          double notionalSpreadLeg,
                          double notionalFlatLeg,
                          double spread)
        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 rate of the flat leg is received, with the rate of the spread leg being paid. If selling the swap, the opposite occurs.

        Parameters:
        tradeInfo - additional information about the trade.
        startDate - the start date
        endDate - the end date
        buySell - the buy/sell flag
        notionalSpreadLeg - the notional amount for the spread leg
        notionalFlatLeg - the notional amount for the flat leg
        spread - the spread, typically derived from the market
        Returns:
        the trade
      • calculateSpotDateFromTradeDate

        default LocalDate calculateSpotDateFromTradeDate​(LocalDate tradeDate,
                                                         ReferenceData refData)
        Calculates the spot date from the trade date.
        Parameters:
        tradeDate - the trade date
        refData - the reference data, used to resolve the date
        Returns:
        the spot date
        Throws:
        ReferenceDataNotFoundException - if an identifier cannot be resolved in the reference data
      • getName

        String getName()
        Gets the name that uniquely identifies this convention.

        This name is used in serialization and can be parsed using of(String).

        Specified by:
        getName in interface Named
        Returns:
        the unique name