## Interface OvernightIborSwapConvention

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

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

This defines the market convention for a Overnight-Ibor single currency swap. In USD, this is often known as an Fed Fund Swap. The convention is formed by combining two swap leg conventions in the same currency.

To manually create a convention, see ImmutableOvernightIborSwapConvention. To register a specific convention, see OvernightIborSwapConvention.ini.

• ### Method Summary

All Methods
Modifier and Type Method Description
default SwapTrade createTrade​(LocalDate tradeDate, Tenor tenor, BuySell buySell, double notional, double spread, ReferenceData refData)
Creates a spot-starting trade based on this convention.
default SwapTrade createTrade​(LocalDate tradeDate, Period periodToStart, Tenor tenor, BuySell buySell, double notional, double spread, ReferenceData refData)
Creates a forward-starting trade based on this convention.
static ExtendedEnum<OvernightIborSwapConvention> extendedEnum()
Gets the extended enum helper.
IborRateSwapLegConvention getIborLeg()
Gets the market convention of the Ibor leg.
String getName()
Gets the name that uniquely identifies this convention.
OvernightRateSwapLegConvention getOvernightLeg()
Gets the market convention of the overnight leg.
static OvernightIborSwapConvention of​(String uniqueName)
Obtains an instance from the specified unique name.
SwapTrade toTrade​(TradeInfo tradeInfo, LocalDate startDate, LocalDate endDate, BuySell buySell, double notional, double spread)
Creates a trade based on this convention.
default SwapTrade toTrade​(LocalDate tradeDate, LocalDate startDate, 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 OvernightIborSwapConvention of​(String uniqueName)
Obtains an instance from the specified unique name.
Parameters:
uniqueName - the unique name
Returns:
the convention
Throws:
IllegalArgumentException - if the name is not known
• #### extendedEnum

static ExtendedEnum<OvernightIborSwapConvention> 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
• #### getOvernightLeg

OvernightRateSwapLegConvention getOvernightLeg()
Gets the market convention of the overnight leg.
Returns:
the overnight leg convention
• #### getIborLeg

IborRateSwapLegConvention getIborLeg()
Gets the market convention of the Ibor leg.
Returns:
the Ibor leg convention

default SwapTrade createTrade​(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 Ibor rate is received from the counterparty, with the overnight and spread being paid. If selling the swap, the Ibor rate is paid to the counterparty, with the overnight and spread being received.

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 of added the overnight rates, 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​(LocalDate tradeDate,
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 Ibor rate is received from the counterparty, with the overnight and spread being paid. If selling the swap, the Ibor rate is paid to the counterparty, with the overnight and spread being received.

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 of added the overnight rates, 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​(LocalDate tradeDate,
LocalDate startDate,
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 Ibor rate is received from the counterparty, with the overnight and spread being paid. If selling the swap, the Ibor rate is paid to the counterparty, with the overnight and spread being received.

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 of added the overnight rates, typically derived from the market
Returns:

SwapTrade toTrade​(TradeInfo tradeInfo,
LocalDate startDate,
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 Ibor rate is received from the counterparty, with the overnight and spread being paid. If selling the swap, the Ibor rate is paid to the counterparty, with the overnight and spread being received.

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 of added the overnight rates, typically derived from the market
Returns:
String getName()
This name is used in serialization and can be parsed using of(String).
getName in interface Named
getName in interface SingleCurrencySwapConvention