Interface FixedIborSwapConvention
-
- All Superinterfaces:
FixedFloatSwapConvention
,Named
,SingleCurrencySwapConvention
,TradeConvention
- All Known Implementing Classes:
ImmutableFixedIborSwapConvention
public interface FixedIborSwapConvention extends FixedFloatSwapConvention, Named
A market convention for Fixed-Ibor swap trades.This defines the market convention for a Fixed-Ibor single currency swap. This is often known as a vanilla swap. The convention is formed by combining two swap leg conventions in the same currency.
To manually create a convention, see
ImmutableFixedIborSwapConvention
. To register a specific convention, seeFixedIborSwapConvention.ini
.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default LocalDate
calculateSpotDateFromTradeDate(LocalDate tradeDate, ReferenceData refData)
Calculates the spot date from the trade date.default SwapTrade
createTrade(LocalDate tradeDate, Tenor tenor, BuySell buySell, double notional, double fixedRate, 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 fixedRate, ReferenceData refData)
Creates a forward-starting trade based on this convention.static ExtendedEnum<FixedIborSwapConvention>
extendedEnum()
Gets the extended enum helper.IborRateSwapLegConvention
getFloatingLeg()
Gets the market convention of the floating leg.String
getName()
Gets the name that uniquely identifies this convention.static FixedIborSwapConvention
of(String uniqueName)
Obtains an instance from the specified unique name.default FixedIborSwapTemplate
toTemplate(Tenor tenor)
Obtains a template based on the specified tenor.SwapTrade
toTrade(TradeInfo tradeInfo, LocalDate startDate, LocalDate endDate, BuySell buySell, double notional, double fixedRate)
Creates a trade based on this convention.default SwapTrade
toTrade(LocalDate tradeDate, LocalDate startDate, LocalDate endDate, BuySell buySell, double notional, double fixedRate)
Creates a trade based on this convention.-
Methods inherited from interface com.opengamma.strata.product.swap.type.FixedFloatSwapConvention
getFixedLeg
-
Methods inherited from interface com.opengamma.strata.product.swap.type.SingleCurrencySwapConvention
getSpotDateOffset
-
-
-
-
Method Detail
-
of
static FixedIborSwapConvention 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<FixedIborSwapConvention> 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
-
getFloatingLeg
IborRateSwapLegConvention getFloatingLeg()
Gets the market convention of the floating leg.- Specified by:
getFloatingLeg
in interfaceFixedFloatSwapConvention
- Returns:
- the floating leg convention
-
createTrade
default SwapTrade createTrade(LocalDate tradeDate, Tenor tenor, BuySell buySell, double notional, double fixedRate, 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 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:
createTrade
in interfaceSingleCurrencySwapConvention
- Parameters:
tradeDate
- the date of the tradetenor
- the tenor of the swapbuySell
- the buy/sell flagnotional
- the notional amountfixedRate
- the fixed rate, typically derived from the marketrefData
- 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 notional, double fixedRate, 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 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:
createTrade
in interfaceSingleCurrencySwapConvention
- Parameters:
tradeDate
- the date of the tradeperiodToStart
- the period between the spot date and the start datetenor
- the tenor of the swapbuySell
- the buy/sell flagnotional
- the notional amountfixedRate
- the fixed rate, typically derived from the marketrefData
- 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 notional, double fixedRate)
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 interfaceSingleCurrencySwapConvention
- Parameters:
tradeDate
- the date of the tradestartDate
- the start dateendDate
- the end datebuySell
- the buy/sell flagnotional
- the notional amountfixedRate
- the fixed rate, typically derived from the market- Returns:
- the trade
-
toTrade
SwapTrade toTrade(TradeInfo tradeInfo, LocalDate startDate, LocalDate endDate, BuySell buySell, double notional, double fixedRate)
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 interfaceSingleCurrencySwapConvention
- Parameters:
tradeInfo
- additional information about the tradestartDate
- the start dateendDate
- the end datebuySell
- the buy/sell flagnotional
- the notional amountfixedRate
- the fixed rate, typically derived from the market- Returns:
- the trade
-
calculateSpotDateFromTradeDate
default LocalDate calculateSpotDateFromTradeDate(LocalDate tradeDate, ReferenceData refData)
Calculates the spot date from the trade date.- Specified by:
calculateSpotDateFromTradeDate
in interfaceSingleCurrencySwapConvention
- Parameters:
tradeDate
- the trade daterefData
- the reference data, used to resolve the date- Returns:
- the spot date
- Throws:
ReferenceDataNotFoundException
- if an identifier cannot be resolved in the reference data
-
toTemplate
default FixedIborSwapTemplate toTemplate(Tenor tenor)
Obtains a template based on the specified tenor.The swap will start on the spot date.
- Specified by:
toTemplate
in interfaceFixedFloatSwapConvention
- Parameters:
tenor
- the tenor of the swap- Returns:
- the template
-
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 interfaceFixedFloatSwapConvention
- Specified by:
getName
in interfaceNamed
- Specified by:
getName
in interfaceSingleCurrencySwapConvention
- Returns:
- the unique name
-
-