public final class ImmutableFixedInflationSwapConvention extends Object implements FixedInflationSwapConvention, org.joda.beans.ImmutableBean, Serializable
This defines the market convention for a Fixed-Inflation single currency 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 |
ImmutableFixedInflationSwapConvention.Builder
The bean-builder for
ImmutableFixedInflationSwapConvention. |
static class |
ImmutableFixedInflationSwapConvention.Meta
The meta-bean for
ImmutableFixedInflationSwapConvention. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableFixedInflationSwapConvention.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.
|
InflationRateSwapLegConvention |
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 ImmutableFixedInflationSwapConvention.Meta |
meta()
The meta-bean for
ImmutableFixedInflationSwapConvention. |
ImmutableFixedInflationSwapConvention.Meta |
metaBean() |
static ImmutableFixedInflationSwapConvention |
of(String name,
FixedRateSwapLegConvention fixedLeg,
InflationRateSwapLegConvention floatingLeg,
DaysAdjustment spotDateOffset)
Obtains a convention based on the specified name and leg conventions.
|
ImmutableFixedInflationSwapConvention.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, waitcreateTrade, createTrade, extendedEnum, of, toTradecalculateSpotDateFromTradeDatepublic static ImmutableFixedInflationSwapConvention of(String name, FixedRateSwapLegConvention fixedLeg, InflationRateSwapLegConvention 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)
FixedInflationSwapConventionThis 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 FixedInflationSwapConventiontoTrade 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 ImmutableFixedInflationSwapConvention.Meta meta()
ImmutableFixedInflationSwapConvention.public static ImmutableFixedInflationSwapConvention.Builder builder()
public ImmutableFixedInflationSwapConvention.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic String getName()
getName in interface NamedgetName in interface FixedInflationSwapConventiongetName in interface SingleCurrencySwapConventionpublic FixedRateSwapLegConvention getFixedLeg()
getFixedLeg in interface FixedInflationSwapConventionpublic InflationRateSwapLegConvention getFloatingLeg()
getFloatingLeg in interface FixedInflationSwapConventionpublic 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 ImmutableFixedInflationSwapConvention.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.