public interface XCcyOvernightOvernightSwapConvention extends TradeConvention, Named
This defines the market convention for a cross-currency overnight-overnight swap. The convention is formed by combining two swap leg conventions in different currencies.
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.
To manually create a convention, see ImmutableXCcyOvernightOvernightSwapConvention.
To register a specific convention, see XCcyOvernightOvernightSwapConvention.ini.
| Modifier and Type | Method and Description |
|---|---|
default LocalDate |
calculateSpotDateFromTradeDate(LocalDate tradeDate,
ReferenceData refData)
Calculates the spot date from the trade date.
|
default SwapTrade |
createTrade(LocalDate tradeDate,
Period periodToStart,
Tenor tenor,
BuySell buySell,
double notionalSpreadLeg,
double notionalFlatLeg,
double spread,
ReferenceData refData)
Creates a forward-starting trade based on this convention.
|
default SwapTrade |
createTrade(LocalDate tradeDate,
Tenor tenor,
BuySell buySell,
double notionalSpreadLeg,
double notionalFlatLeg,
double spread,
ReferenceData refData)
Creates a spot-starting trade based on this convention.
|
static ExtendedEnum<XCcyOvernightOvernightSwapConvention> |
extendedEnum()
Gets the extended enum helper.
|
default CurrencyPair |
getCurrencyPair()
Gets the currency pair of the convention.
|
OvernightRateSwapLegConvention |
getFlatLeg()
Gets the market convention of the floating leg that does not have the spread applied.
|
String |
getName()
Gets the name that uniquely identifies this convention.
|
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.
|
static XCcyOvernightOvernightSwapConvention |
of(String uniqueName)
Obtains an instance from the specified unique name.
|
default SwapTrade |
toTrade(LocalDate tradeDate,
LocalDate startDate,
LocalDate endDate,
BuySell buySell,
double notionalSpreadLeg,
double notionalFlatLeg,
double spread)
Creates a trade based on this convention.
|
SwapTrade |
toTrade(TradeInfo tradeInfo,
LocalDate startDate,
LocalDate endDate,
BuySell buySell,
double notionalSpreadLeg,
double notionalFlatLeg,
double spread)
Creates a trade based on this convention.
|
static XCcyOvernightOvernightSwapConvention of(String uniqueName)
uniqueName - the unique nameIllegalArgumentException - if the name is not knownstatic ExtendedEnum<XCcyOvernightOvernightSwapConvention> extendedEnum()
This helper allows instances of the convention to be looked up. It also provides the complete set of available instances.
OvernightRateSwapLegConvention getSpreadLeg()
The spread is the market price of the instrument. It is added to the observed interest rate.
OvernightRateSwapLegConvention getFlatLeg()
DaysAdjustment getSpotDateOffset()
The offset is applied to the trade date to find the start date. A typical value is "plus 2 business days".
default CurrencyPair getCurrencyPair()
default SwapTrade createTrade(LocalDate tradeDate, Tenor tenor, BuySell buySell, double notionalSpreadLeg, double notionalFlatLeg, double spread, ReferenceData refData)
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 notionals are 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.
tradeDate - the date of the tradetenor - the tenor of the swapbuySell - the buy/sell flagnotionalSpreadLeg - the notional amount for the spread legnotionalFlatLeg - the notional amount for the flat legspread - the spread, typically derived from the marketrefData - the reference data, used to resolve the trade datesReferenceDataNotFoundException - if an identifier cannot be resolved in the reference datadefault SwapTrade createTrade(LocalDate tradeDate, Period periodToStart, Tenor tenor, BuySell buySell, double notionalSpreadLeg, double notionalFlatLeg, double spread, ReferenceData refData)
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 rate of the flat leg is received, with the rate of the spread leg being paid. If selling the swap, the opposite occurs.
tradeDate - the date of the tradeperiodToStart - the period between the spot date and the start datetenor - the tenor of the swapbuySell - the buy/sell flagnotionalSpreadLeg - the notional amount for the spread legnotionalFlatLeg - the notional amount for the flat legspread - the spread, typically derived from the marketrefData - the reference data, used to resolve the trade datesReferenceDataNotFoundException - if an identifier cannot be resolved in the reference datadefault SwapTrade toTrade(LocalDate tradeDate, LocalDate startDate, LocalDate endDate, BuySell buySell, double notionalSpreadLeg, double notionalFlatLeg, double spread)
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.
tradeDate - the date of the tradestartDate - 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 marketSwapTrade toTrade(TradeInfo tradeInfo, LocalDate startDate, LocalDate endDate, BuySell buySell, double notionalSpreadLeg, double notionalFlatLeg, double spread)
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.
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 marketdefault LocalDate calculateSpotDateFromTradeDate(LocalDate tradeDate, ReferenceData refData)
tradeDate - the trade daterefData - the reference data, used to resolve the dateReferenceDataNotFoundException - if an identifier cannot be resolved in the reference dataString getName()
This name is used in serialization and can be parsed using of(String).
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.