Class ImmutableXCcyIborIborSwapConvention
- java.lang.Object
-
- com.opengamma.strata.product.swap.type.ImmutableXCcyIborIborSwapConvention
-
- All Implemented Interfaces:
Named,XCcyIborIborSwapConvention,TradeConvention,Serializable,org.joda.beans.Bean,org.joda.beans.ImmutableBean
public final class ImmutableXCcyIborIborSwapConvention extends Object implements XCcyIborIborSwapConvention, org.joda.beans.ImmutableBean, Serializable
A market convention for cross-currency Ibor-Ibor swap trades.This defines the market convention for a Ibor-Ibor cross-currency swap without reset. 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".
For example, a 'EUR/USD' basis swap has 'EUR-EURIBOR-3M' as the spread leg and 'USD-LIBOR-3M' as the flat leg.
The convention is defined by four key dates.
- Trade date, the date that the trade is agreed
- Spot date, the base for date calculations, typically 2 business days after the trade date
- Start date, the date on which the interest calculation starts, often the same as the spot date
- End date, the date on which the interest calculation ends, typically a number of years after the start date
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableXCcyIborIborSwapConvention.BuilderThe bean-builder forImmutableXCcyIborIborSwapConvention.static classImmutableXCcyIborIborSwapConvention.MetaThe meta-bean forImmutableXCcyIborIborSwapConvention.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableXCcyIborIborSwapConvention.Builderbuilder()Returns a builder used to create an instance of the bean.booleanequals(Object obj)IborRateSwapLegConventiongetFlatLeg()Gets the market convention of the floating leg that does not have the spread applied.StringgetName()Gets the convention name, such as 'EUR-EURIBOR-3M-USD-LIBOR-3M'.DaysAdjustmentgetSpotDateOffset()Gets the offset of the spot value date from the trade date.IborRateSwapLegConventiongetSpreadLeg()Gets the market convention of the floating leg that has the spread applied.inthashCode()static ImmutableXCcyIborIborSwapConvention.Metameta()The meta-bean forImmutableXCcyIborIborSwapConvention.ImmutableXCcyIborIborSwapConvention.MetametaBean()static ImmutableXCcyIborIborSwapConventionof(String name, IborRateSwapLegConvention spreadLeg, IborRateSwapLegConvention flatLeg)Obtains a convention based on the specified name and leg conventions.static ImmutableXCcyIborIborSwapConventionof(String name, IborRateSwapLegConvention spreadLeg, IborRateSwapLegConvention flatLeg, DaysAdjustment spotDateOffset)Obtains a convention based on the specified name and leg conventions.ImmutableXCcyIborIborSwapConvention.BuildertoBuilder()Returns a builder that allows this bean to be mutated.StringtoString()SwapTradetoTrade(TradeInfo tradeInfo, LocalDate startDate, LocalDate endDate, BuySell buySell, double notionalSpreadLeg, double notionalFlatLeg, double spread)Creates a trade based on this convention.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.opengamma.strata.product.swap.type.XCcyIborIborSwapConvention
calculateSpotDateFromTradeDate, createTrade, createTrade, getCurrencyPair, toTrade
-
-
-
-
Method Detail
-
of
public static ImmutableXCcyIborIborSwapConvention of(String name, IborRateSwapLegConvention spreadLeg, IborRateSwapLegConvention flatLeg)
Obtains a convention based on the specified name and leg conventions.The two leg conventions must be in different currencies. The spot date offset is set to be the effective date offset of the index of the spread leg.
- Parameters:
name- the unique name of the conventionspreadLeg- the market convention for the leg that the spread is added toflatLeg- the market convention for the other leg, known as the flat leg- Returns:
- the convention
-
of
public static ImmutableXCcyIborIborSwapConvention of(String name, IborRateSwapLegConvention spreadLeg, IborRateSwapLegConvention flatLeg, DaysAdjustment spotDateOffset)
Obtains a convention based on the specified name and leg conventions.The two leg conventions must be in different currencies.
- Parameters:
name- the unique name of the conventionspreadLeg- the market convention for the leg that the spread is added toflatLeg- the market convention for the other leg, known as the flat legspotDateOffset- the offset of the spot value date from the trade date- Returns:
- the convention
-
toTrade
public SwapTrade toTrade(TradeInfo tradeInfo, LocalDate startDate, LocalDate endDate, BuySell buySell, double notionalSpreadLeg, double notionalFlatLeg, double spread)
Description copied from interface:XCcyIborIborSwapConventionCreates 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.
- Specified by:
toTradein interfaceXCcyIborIborSwapConvention- Parameters:
tradeInfo- additional information about the trade.startDate- the start dateendDate- the end datebuySell- the buy/sell flagnotionalSpreadLeg- the notional amount for the spread legnotionalFlatLeg- the notional amount for the flat legspread- the spread, typically derived from the market- Returns:
- the trade
-
meta
public static ImmutableXCcyIborIborSwapConvention.Meta meta()
The meta-bean forImmutableXCcyIborIborSwapConvention.- Returns:
- the meta-bean, not null
-
builder
public static ImmutableXCcyIborIborSwapConvention.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public ImmutableXCcyIborIborSwapConvention.Meta metaBean()
- Specified by:
metaBeanin interfaceorg.joda.beans.Bean
-
getName
public String getName()
Gets the convention name, such as 'EUR-EURIBOR-3M-USD-LIBOR-3M'.- Specified by:
getNamein interfaceNamed- Specified by:
getNamein interfaceXCcyIborIborSwapConvention- Returns:
- the value of the property, not null
-
getSpreadLeg
public 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.
- Specified by:
getSpreadLegin interfaceXCcyIborIborSwapConvention- Returns:
- the value of the property, not null
-
getFlatLeg
public IborRateSwapLegConvention getFlatLeg()
Gets the market convention of the floating leg that does not have the spread applied.- Specified by:
getFlatLegin interfaceXCcyIborIborSwapConvention- Returns:
- the value of the property, not null
-
getSpotDateOffset
public 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".
- Specified by:
getSpotDateOffsetin interfaceXCcyIborIborSwapConvention- Returns:
- the value of the property, not null
-
toBuilder
public ImmutableXCcyIborIborSwapConvention.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-