public final class ImmutableXCcyOvernightOvernightSwapConvention extends Object implements XCcyOvernightOvernightSwapConvention, org.joda.beans.ImmutableBean, Serializable
This defines the market convention for a overnight-overnight 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-ESTR' as the spread leg and 'USD-SOFR' as the flat leg.
The convention is defined by four key dates.
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableXCcyOvernightOvernightSwapConvention.Builder
The bean-builder for
ImmutableXCcyOvernightOvernightSwapConvention. |
static class |
ImmutableXCcyOvernightOvernightSwapConvention.Meta
The meta-bean for
ImmutableXCcyOvernightOvernightSwapConvention. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableXCcyOvernightOvernightSwapConvention.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
boolean |
equals(Object obj) |
OvernightRateSwapLegConvention |
getFlatLeg()
Gets the market convention of the floating leg that does not have the spread applied.
|
String |
getName()
Gets the convention name, such as 'EUR-EURIBOR-3M-USD-LIBOR-3M'.
|
DaysAdjustment |
getSpotDateOffset()
Gets the offset of the spot value date from the trade date.
|
OvernightRateSwapLegConvention |
getSpreadLeg()
Gets the market convention of the floating leg that has the spread applied.
|
int |
hashCode() |
static ImmutableXCcyOvernightOvernightSwapConvention.Meta |
meta()
The meta-bean for
ImmutableXCcyOvernightOvernightSwapConvention. |
ImmutableXCcyOvernightOvernightSwapConvention.Meta |
metaBean() |
static ImmutableXCcyOvernightOvernightSwapConvention |
of(String name,
OvernightRateSwapLegConvention spreadLeg,
OvernightRateSwapLegConvention flatLeg,
DaysAdjustment spotDateOffset)
Obtains a convention based on the specified name and leg conventions.
|
ImmutableXCcyOvernightOvernightSwapConvention.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 notionalSpreadLeg,
double notionalFlatLeg,
double spread)
Creates a trade based on this convention.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcalculateSpotDateFromTradeDate, createTrade, createTrade, extendedEnum, getCurrencyPair, of, toTradepublic static ImmutableXCcyOvernightOvernightSwapConvention of(String name, OvernightRateSwapLegConvention spreadLeg, OvernightRateSwapLegConvention flatLeg, DaysAdjustment spotDateOffset)
The two leg conventions must be in different currencies.
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 notionalSpreadLeg, double notionalFlatLeg, double spread)
XCcyOvernightOvernightSwapConventionThis 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.
toTrade in interface XCcyOvernightOvernightSwapConventiontradeInfo - 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 marketpublic static ImmutableXCcyOvernightOvernightSwapConvention.Meta meta()
ImmutableXCcyOvernightOvernightSwapConvention.public static ImmutableXCcyOvernightOvernightSwapConvention.Builder builder()
public ImmutableXCcyOvernightOvernightSwapConvention.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic String getName()
getName in interface NamedgetName in interface XCcyOvernightOvernightSwapConventionpublic OvernightRateSwapLegConvention getSpreadLeg()
The spread is the market price of the instrument. It is added to the observed interest rate.
getSpreadLeg in interface XCcyOvernightOvernightSwapConventionpublic OvernightRateSwapLegConvention getFlatLeg()
getFlatLeg in interface XCcyOvernightOvernightSwapConventionpublic 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 XCcyOvernightOvernightSwapConventionpublic ImmutableXCcyOvernightOvernightSwapConvention.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.