Class ImmutableOvernightIborSwapConvention
- java.lang.Object
-
- com.opengamma.strata.product.swap.type.ImmutableOvernightIborSwapConvention
-
- All Implemented Interfaces:
Named
,OvernightIborSwapConvention
,SingleCurrencySwapConvention
,TradeConvention
,Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class ImmutableOvernightIborSwapConvention extends Object implements OvernightIborSwapConvention, org.joda.beans.ImmutableBean, Serializable
A market convention for Fixed-Overnight swap trades.This defines the market convention for a Fixed-Overnight single currency swap. This is often known as an OIS swap, although Fed Fund swaps are also covered. The convention is formed by combining two swap leg conventions in the same currency.
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 class
ImmutableOvernightIborSwapConvention.Builder
The bean-builder forImmutableOvernightIborSwapConvention
.static class
ImmutableOvernightIborSwapConvention.Meta
The meta-bean forImmutableOvernightIborSwapConvention
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableOvernightIborSwapConvention.Builder
builder()
Returns a builder used to create an instance of the bean.boolean
equals(Object obj)
IborRateSwapLegConvention
getIborLeg()
Gets the market convention of the floating leg.String
getName()
Gets the convention name, such as 'USD-FED-FUND-AA-LIBOR-3M'.OvernightRateSwapLegConvention
getOvernightLeg()
Gets the market convention of the floating leg.DaysAdjustment
getSpotDateOffset()
Gets the offset of the spot value date from the trade date.int
hashCode()
static ImmutableOvernightIborSwapConvention.Meta
meta()
The meta-bean forImmutableOvernightIborSwapConvention
.ImmutableOvernightIborSwapConvention.Meta
metaBean()
static ImmutableOvernightIborSwapConvention
of(String name, OvernightRateSwapLegConvention overnightLeg, IborRateSwapLegConvention iborLeg)
Obtains a convention based on the specified name and leg conventions.static ImmutableOvernightIborSwapConvention
of(String name, OvernightRateSwapLegConvention overnightLeg, IborRateSwapLegConvention iborLeg, DaysAdjustment spotDateOffset)
Obtains a convention based on the specified name and leg conventions.ImmutableOvernightIborSwapConvention.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.-
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.OvernightIborSwapConvention
createTrade, createTrade, toTrade
-
Methods inherited from interface com.opengamma.strata.product.swap.type.SingleCurrencySwapConvention
calculateSpotDateFromTradeDate
-
-
-
-
Method Detail
-
of
public static ImmutableOvernightIborSwapConvention of(String name, OvernightRateSwapLegConvention overnightLeg, IborRateSwapLegConvention iborLeg)
Obtains a convention based on the specified name and leg conventions.The two leg conventions must be in the same currency. The spot date offset is set to be the effective date offset of the Ibor index.
- Parameters:
name
- the unique name of the conventionovernightLeg
- the market convention for the overnight legiborLeg
- the market convention for the ibor leg- Returns:
- the convention
-
of
public static ImmutableOvernightIborSwapConvention of(String name, OvernightRateSwapLegConvention overnightLeg, IborRateSwapLegConvention iborLeg, DaysAdjustment spotDateOffset)
Obtains a convention based on the specified name and leg conventions.The two leg conventions must be in the same currency.
- Parameters:
name
- the unique name of the conventionovernightLeg
- the market convention for the overnight legiborLeg
- the market convention for the ibor 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 notional, double spread)
Description copied from interface:OvernightIborSwapConvention
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 interfaceOvernightIborSwapConvention
- Specified by:
toTrade
in interfaceSingleCurrencySwapConvention
- Parameters:
tradeInfo
- additional information about the tradestartDate
- the start dateendDate
- the end datebuySell
- the buy/sell flagnotional
- the notional amountspread
- the spread of added the overnight rates, typically derived from the market- Returns:
- the trade
-
meta
public static ImmutableOvernightIborSwapConvention.Meta meta()
The meta-bean forImmutableOvernightIborSwapConvention
.- Returns:
- the meta-bean, not null
-
builder
public static ImmutableOvernightIborSwapConvention.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public ImmutableOvernightIborSwapConvention.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getName
public String getName()
Gets the convention name, such as 'USD-FED-FUND-AA-LIBOR-3M'.- Specified by:
getName
in interfaceNamed
- Specified by:
getName
in interfaceOvernightIborSwapConvention
- Specified by:
getName
in interfaceSingleCurrencySwapConvention
- Returns:
- the value of the property, not null
-
getOvernightLeg
public OvernightRateSwapLegConvention getOvernightLeg()
Gets the market convention of the floating leg.- Specified by:
getOvernightLeg
in interfaceOvernightIborSwapConvention
- Returns:
- the value of the property, not null
-
getIborLeg
public IborRateSwapLegConvention getIborLeg()
Gets the market convention of the floating leg.- Specified by:
getIborLeg
in interfaceOvernightIborSwapConvention
- 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:
getSpotDateOffset
in interfaceSingleCurrencySwapConvention
- Returns:
- the value of the property, not null
-
toBuilder
public ImmutableOvernightIborSwapConvention.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-