## Interface IborIborSwapConvention

• All Superinterfaces:
Named, SingleCurrencySwapConvention, TradeConvention
All Known Implementing Classes:
ImmutableIborIborSwapConvention

public interface IborIborSwapConvention
extends SingleCurrencySwapConvention, Named
A market convention for Ibor-Ibor swap trades.

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

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", which is typically the leg with the shorter underlying tenor. The payment frequency is typically determined by the longer underlying tenor, with compounding applied.

For example, a 'USD 3s1s' basis swap has 'USD-LIBOR-1M' as the spread leg and 'USD-LIBOR-3M' as the flat leg. Payment is every 3 months, with the one month leg compounded.

To manually create a convention, see ImmutableIborIborSwapConvention. To register a specific convention, see IborIborSwapConvention.ini.

• ### Method Summary

All Methods
Modifier and Type Method Description
default SwapTrade createTrade​(java.time.LocalDate tradeDate, Tenor tenor, BuySell buySell, double notional, double spread, ReferenceData refData)
Creates a spot-starting trade based on this convention.
default SwapTrade createTrade​(java.time.LocalDate tradeDate, java.time.Period periodToStart, Tenor tenor, BuySell buySell, double notional, double spread, ReferenceData refData)
Creates a forward-starting trade based on this convention.
static ExtendedEnum<IborIborSwapConvention> extendedEnum()
Gets the extended enum helper.
IborRateSwapLegConvention getFlatLeg()
Gets the market convention of the floating leg that does not have the spread applied.
java.lang.String getName()
Gets the name that uniquely identifies this convention.
IborRateSwapLegConvention getSpreadLeg()
Gets the market convention of the floating leg that has the spread applied.
static IborIborSwapConvention of​(java.lang.String uniqueName)
Obtains an instance from the specified unique name.
SwapTrade toTrade​(TradeInfo tradeInfo, java.time.LocalDate startDate, java.time.LocalDate endDate, BuySell buySell, double notional, double spread)
Creates a trade based on this convention.
default SwapTrade toTrade​(java.time.LocalDate tradeDate, java.time.LocalDate startDate, java.time.LocalDate endDate, BuySell buySell, double notional, double spread)
Creates a trade based on this convention.
• ### Methods inherited from interface com.opengamma.strata.product.swap.type.SingleCurrencySwapConvention

calculateSpotDateFromTradeDate, getSpotDateOffset
• ### Method Detail

• #### of

static IborIborSwapConvention of​(java.lang.String uniqueName)
Obtains an instance from the specified unique name.
Parameters:
uniqueName - the unique name
Returns:
the convention
Throws:
java.lang.IllegalArgumentException - if the name is not known
• #### extendedEnum

static ExtendedEnum<IborIborSwapConvention> 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

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:
• #### getFlatLeg

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

default SwapTrade createTrade​(java.time.LocalDate tradeDate,
Tenor tenor,
double notional,
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 notional is unsigned, with buy/sell determining the direction of the trade. If buying the swap, the rate of the flat leg is received from the counterparty, with the rate of the spread leg being paid. If selling the swap, the opposite occurs.

Specified by:
createTrade in interface SingleCurrencySwapConvention
Parameters:
tradeDate - the date of the trade
tenor - the tenor of the swap
buySell - the buy/sell flag
notional - the notional amount
spread - the spread, typically derived from the market
refData - the reference data, used to resolve the trade dates
Returns:
Throws:
ReferenceDataNotFoundException - if an identifier cannot be resolved in the reference data

default SwapTrade createTrade​(java.time.LocalDate tradeDate,
java.time.Period periodToStart,
Tenor tenor,
double notional,
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 from the counterparty, with the rate of the spread leg being paid. If selling the swap, the opposite occurs.

Specified by:
createTrade in interface SingleCurrencySwapConvention
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
notional - the notional amount
spread - the spread, typically derived from the market
refData - the reference data, used to resolve the trade dates
Returns:
Throws:
ReferenceDataNotFoundException - if an identifier cannot be resolved in the reference data

default SwapTrade toTrade​(java.time.LocalDate tradeDate,
java.time.LocalDate startDate,
java.time.LocalDate endDate,
double notional,
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 from the counterparty, with the rate of the spread leg being paid. If selling the swap, the opposite occurs.

Specified by:
toTrade in interface SingleCurrencySwapConvention
Parameters:
tradeDate - the date of the trade
startDate - the start date
endDate - the end date
buySell - the buy/sell flag
notional - the notional amount
spread - the spread, typically derived from the market
Returns:

SwapTrade toTrade​(TradeInfo tradeInfo,
java.time.LocalDate startDate,
java.time.LocalDate endDate,
double notional,
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 from the counterparty, with the rate of the spread leg being paid. If selling the swap, the opposite occurs.

Specified by:
toTrade in interface SingleCurrencySwapConvention
Parameters:
tradeInfo - additional information about the trade
startDate - the start date
endDate - the end date
buySell - the buy/sell flag
notional - the notional amount
spread - the spread, typically derived from the market
Returns:
java.lang.String getName()
This name is used in serialization and can be parsed using of(String).
getName in interface Named
getName in interface SingleCurrencySwapConvention