public final class ImmutableIborIborSwapConvention extends Object implements IborIborSwapConvention, org.joda.beans.ImmutableBean, Serializable
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.
The convention is defined by four key dates.
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableIborIborSwapConvention.Builder
The bean-builder for
ImmutableIborIborSwapConvention. |
static class |
ImmutableIborIborSwapConvention.Meta
The meta-bean for
ImmutableIborIborSwapConvention. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableIborIborSwapConvention.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
boolean |
equals(Object obj) |
IborRateSwapLegConvention |
getFlatLeg()
Gets the market convention of the floating leg that does not have the spread applied.
|
String |
getName()
Gets the convention name, such as 'USD-LIBOR-3M-LIBOR-6M'.
|
DaysAdjustment |
getSpotDateOffset()
Gets the offset of the spot value date from the trade date.
|
IborRateSwapLegConvention |
getSpreadLeg()
Gets the market convention of the floating leg that has the spread applied.
|
int |
hashCode() |
static ImmutableIborIborSwapConvention.Meta |
meta()
The meta-bean for
ImmutableIborIborSwapConvention. |
ImmutableIborIborSwapConvention.Meta |
metaBean() |
static ImmutableIborIborSwapConvention |
of(String name,
IborRateSwapLegConvention spreadLeg,
IborRateSwapLegConvention flatLeg)
Obtains a convention based on the specified name and leg conventions.
|
static ImmutableIborIborSwapConvention |
of(String name,
IborRateSwapLegConvention spreadLeg,
IborRateSwapLegConvention flatLeg,
DaysAdjustment spotDateOffset)
Obtains a convention based on the specified name and leg conventions.
|
ImmutableIborIborSwapConvention.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
SwapTrade |
toTrade(TradeInfo tradeInfo,
LocalDate startDate,
LocalDate endDate,
BuySell buySell,
double notional,
double spread)
Creates a trade based on this convention.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcreateTrade, createTrade, extendedEnum, of, toTradecalculateSpotDateFromTradeDatepublic static ImmutableIborIborSwapConvention of(String name, IborRateSwapLegConvention spreadLeg, IborRateSwapLegConvention flatLeg)
The two leg conventions must be in the same currency. The spot date offset is set to be the effective date offset of the index of the spread leg.
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 legpublic static ImmutableIborIborSwapConvention of(String name, IborRateSwapLegConvention spreadLeg, IborRateSwapLegConvention flatLeg, DaysAdjustment spotDateOffset)
The two leg conventions must be in the same currency.
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 datepublic SwapTrade toTrade(TradeInfo tradeInfo, LocalDate startDate, LocalDate endDate, BuySell buySell, double notional, double spread)
IborIborSwapConventionThis 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.
toTrade in interface IborIborSwapConventiontoTrade in interface SingleCurrencySwapConventiontradeInfo - additional information about the tradestartDate - the start dateendDate - the end datebuySell - the buy/sell flagnotional - the notional amountspread - the spread, typically derived from the marketpublic static ImmutableIborIborSwapConvention.Meta meta()
ImmutableIborIborSwapConvention.public static ImmutableIborIborSwapConvention.Builder builder()
public ImmutableIborIborSwapConvention.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic String getName()
getName in interface NamedgetName in interface IborIborSwapConventiongetName in interface SingleCurrencySwapConventionpublic IborRateSwapLegConvention getSpreadLeg()
The spread is the market price of the instrument. It is added to the observed interest rate.
getSpreadLeg in interface IborIborSwapConventionpublic IborRateSwapLegConvention getFlatLeg()
getFlatLeg in interface IborIborSwapConventionpublic DaysAdjustment getSpotDateOffset()
The offset is applied to the trade date to find the start date. A typical value is "plus 2 business days".
getSpotDateOffset in interface SingleCurrencySwapConventionpublic ImmutableIborIborSwapConvention.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.