Class InflationRateSwapLegConvention
- java.lang.Object
-
- com.opengamma.strata.product.swap.type.InflationRateSwapLegConvention
-
- All Implemented Interfaces:
SwapLegConvention,Serializable,org.joda.beans.Bean,org.joda.beans.ImmutableBean
public final class InflationRateSwapLegConvention extends Object implements SwapLegConvention, org.joda.beans.ImmutableBean, Serializable
A market convention for the floating leg of rate swap trades based on a price index.This defines the market convention for a floating leg based on the observed value of a Price index such as 'GB-HICP' or 'US-CPI-U'.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInflationRateSwapLegConvention.BuilderThe bean-builder forInflationRateSwapLegConvention.static classInflationRateSwapLegConvention.MetaThe meta-bean forInflationRateSwapLegConvention.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static InflationRateSwapLegConvention.Builderbuilder()Returns a builder used to create an instance of the bean.booleanequals(Object obj)CurrencygetCurrency()Gets the currency of the leg from the index.PriceIndexgetIndex()Gets the Price index.PriceIndexCalculationMethodgetIndexCalculationMethod()Gets reference price index calculation method.PeriodgetLag()Gets the positive period between the price index and the accrual date, typically a number of months.inthashCode()booleanisNotionalExchange()Gets the flag indicating whether to exchange the notional.static InflationRateSwapLegConvention.Metameta()The meta-bean forInflationRateSwapLegConvention.InflationRateSwapLegConvention.MetametaBean()static InflationRateSwapLegConventionof(PriceIndex index, Period lag, PriceIndexCalculationMethod priceIndexCalculationMethod, BusinessDayAdjustment businessDayAdjustment)Obtains a convention based on the specified index.InflationRateSwapLegConvention.BuildertoBuilder()Returns a builder that allows this bean to be mutated.RateCalculationSwapLegtoLeg(LocalDate startDate, LocalDate endDate, PayReceive payReceive, double notional)Creates a leg based on this convention.StringtoString()
-
-
-
Method Detail
-
of
public static InflationRateSwapLegConvention of(PriceIndex index, Period lag, PriceIndexCalculationMethod priceIndexCalculationMethod, BusinessDayAdjustment businessDayAdjustment)
Obtains a convention based on the specified index.The standard market convention for an Inflation rate leg is based on the index. Use the builder for unusual conventions.
- Parameters:
index- the index, the market convention values are extracted from the indexlag- the lag between the price index and the accrual date, typically a number of monthspriceIndexCalculationMethod- the price index calculation method, typically interpolated or monthlybusinessDayAdjustment- the business day- Returns:
- the convention
-
getCurrency
public Currency getCurrency()
Gets the currency of the leg from the index.- Returns:
- the currency
-
toLeg
public RateCalculationSwapLeg toLeg(LocalDate startDate, LocalDate endDate, PayReceive payReceive, double notional)
Creates a leg based on this convention.This returns a leg based on the specified date. The notional is unsigned, with pay/receive determining the direction of the leg. If the leg is 'Pay', the fixed rate is paid to the counterparty. If the leg is 'Receive', the fixed rate is received from the counterparty.
- Parameters:
startDate- the start dateendDate- the end datepayReceive- determines if the leg is to be paid or receivednotional- the business day adjustment to apply to accrual schedule dates- Returns:
- the leg
-
meta
public static InflationRateSwapLegConvention.Meta meta()
The meta-bean forInflationRateSwapLegConvention.- Returns:
- the meta-bean, not null
-
builder
public static InflationRateSwapLegConvention.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public InflationRateSwapLegConvention.Meta metaBean()
- Specified by:
metaBeanin interfaceorg.joda.beans.Bean
-
getIndex
public PriceIndex getIndex()
Gets the Price index.The floating rate to be paid is based on this price index It will be a well known price index such as 'GB-HICP'.
- Returns:
- the value of the property, not null
-
getLag
public Period getLag()
Gets the positive period between the price index and the accrual date, typically a number of months.A price index is typically published monthly and has a delay before publication. The lag is subtracted from the accrual start and end date to locate the month of the data to be observed.
For example, the September data may be published in October or November. A 3 month lag will cause an accrual date in December to be based on the observed data for September, which should be available by then.
- Returns:
- the value of the property, not null
-
getIndexCalculationMethod
public PriceIndexCalculationMethod getIndexCalculationMethod()
Gets reference price index calculation method.This specifies how the reference index calculation occurs.
This will default to 'Monthly' if not specified.
- Returns:
- the value of the property, not null
-
isNotionalExchange
public boolean isNotionalExchange()
Gets the flag indicating whether to exchange the notional.If 'true', the notional there is both an initial exchange and a final exchange of notional.
This will default to 'false' if not specified.
- Returns:
- the value of the property
-
toBuilder
public InflationRateSwapLegConvention.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-