public final class ImmutableFixedIborSwapConvention extends Object implements FixedIborSwapConvention, org.joda.beans.ImmutableBean, Serializable
This defines the market convention for a Fixed-Ibor single currency swap. This is often known as a vanilla swap. The convention is formed by combining two swap leg conventions in the same currency.
The convention is defined by four key dates.
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableFixedIborSwapConvention.Builder
The bean-builder for
ImmutableFixedIborSwapConvention. |
static class |
ImmutableFixedIborSwapConvention.Meta
The meta-bean for
ImmutableFixedIborSwapConvention. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableFixedIborSwapConvention.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
boolean |
equals(Object obj) |
FixedRateSwapLegConvention |
getFixedLeg()
Gets the market convention of the fixed leg.
|
IborRateSwapLegConvention |
getFloatingLeg()
Gets the market convention of the floating leg.
|
String |
getName()
Gets the convention name, such as 'USD-FIXED-6M-LIBOR-3M'.
|
DaysAdjustment |
getSpotDateOffset()
Gets the offset of the spot value date from the trade date.
|
int |
hashCode() |
static ImmutableFixedIborSwapConvention.Meta |
meta()
The meta-bean for
ImmutableFixedIborSwapConvention. |
ImmutableFixedIborSwapConvention.Meta |
metaBean() |
static ImmutableFixedIborSwapConvention |
of(String name,
FixedRateSwapLegConvention fixedLeg,
IborRateSwapLegConvention floatingLeg)
Obtains a convention based on the specified name and leg conventions.
|
static ImmutableFixedIborSwapConvention |
of(String name,
FixedRateSwapLegConvention fixedLeg,
IborRateSwapLegConvention floatingLeg,
DaysAdjustment spotDateOffset)
Obtains a convention based on the specified name and leg conventions.
|
ImmutableFixedIborSwapConvention.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 fixedRate)
Creates a trade based on this convention.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcalculateSpotDateFromTradeDate, createTrade, createTrade, extendedEnum, of, toTemplate, toTradepublic static ImmutableFixedIborSwapConvention of(String name, FixedRateSwapLegConvention fixedLeg, IborRateSwapLegConvention floatingLeg)
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.
name - the unique name of the conventionfixedLeg - the market convention for the fixed legfloatingLeg - the market convention for the floating legpublic static ImmutableFixedIborSwapConvention of(String name, FixedRateSwapLegConvention fixedLeg, IborRateSwapLegConvention floatingLeg, DaysAdjustment spotDateOffset)
The two leg conventions must be in the same currency.
name - the unique name of the conventionfixedLeg - the market convention for the fixed legfloatingLeg - the market convention for the floating 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 fixedRate)
FixedIborSwapConventionThis 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 floating rate is received from the counterparty, with the fixed rate being paid. If selling the swap, the floating rate is paid to the counterparty, with the fixed rate being received.
toTrade in interface FixedIborSwapConventiontoTrade in interface SingleCurrencySwapConventiontradeInfo - additional information about the tradestartDate - the start dateendDate - the end datebuySell - the buy/sell flagnotional - the notional amountfixedRate - the fixed rate, typically derived from the marketpublic static ImmutableFixedIborSwapConvention.Meta meta()
ImmutableFixedIborSwapConvention.public static ImmutableFixedIborSwapConvention.Builder builder()
public ImmutableFixedIborSwapConvention.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic String getName()
getName in interface NamedgetName in interface FixedFloatSwapConventiongetName in interface FixedIborSwapConventiongetName in interface SingleCurrencySwapConventionpublic FixedRateSwapLegConvention getFixedLeg()
getFixedLeg in interface FixedFloatSwapConventionpublic IborRateSwapLegConvention getFloatingLeg()
getFloatingLeg in interface FixedFloatSwapConventiongetFloatingLeg in interface FixedIborSwapConventionpublic 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 ImmutableFixedIborSwapConvention.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.