Class FixedInflationSwapTemplate
- java.lang.Object
-
- com.opengamma.strata.product.swap.type.FixedInflationSwapTemplate
-
- All Implemented Interfaces:
TradeTemplate,Serializable,org.joda.beans.Bean,org.joda.beans.ImmutableBean
public final class FixedInflationSwapTemplate extends Object implements TradeTemplate, org.joda.beans.ImmutableBean, Serializable
An template for creating inflation swap trades.This defines almost all the data necessary to create a Inflation single currency
SwapTrade. The trade date, end date, lag, notional and fixed rate are required to complete the template and create the trade. As such, it is often possible to get a market price for a trade based on the template. The market price is typically quoted as a bid/ask on the fixed rate.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFixedInflationSwapTemplate.BuilderThe bean-builder forFixedInflationSwapTemplate.static classFixedInflationSwapTemplate.MetaThe meta-bean forFixedInflationSwapTemplate.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FixedInflationSwapTemplate.Builderbuilder()Returns a builder used to create an instance of the bean.SwapTradecreateTrade(LocalDate tradeDate, BuySell buySell, double notional, double fixedRate, ReferenceData refData)Creates a trade based on this template.booleanequals(Object obj)FixedInflationSwapConventiongetConvention()Gets the market convention of the swap.TenorgetTenor()Gets the tenor of the swap.inthashCode()static FixedInflationSwapTemplate.Metameta()The meta-bean forFixedInflationSwapTemplate.FixedInflationSwapTemplate.MetametaBean()static FixedInflationSwapTemplateof(Tenor tenor, FixedInflationSwapConvention convention)Creates a template based on the specified tenor and convention.FixedInflationSwapTemplate.BuildertoBuilder()Returns a builder that allows this bean to be mutated.StringtoString()
-
-
-
Method Detail
-
of
public static FixedInflationSwapTemplate of(Tenor tenor, FixedInflationSwapConvention convention)
Creates a template based on the specified tenor and convention.- Parameters:
tenor- the tenor of the swapconvention- the market convention- Returns:
- the template
-
createTrade
public SwapTrade createTrade(LocalDate tradeDate, BuySell buySell, double notional, double fixedRate, ReferenceData refData)
Creates a trade based on this template.This returns a trade based on the specified trade date.
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.
- Parameters:
tradeDate- the date of the tradebuySell- the buy/sell flagnotional- the notional amount, in the payment currency of the templatefixedRate- the fixed rate, typically derived from the marketrefData- the reference data, used to resolve the trade dates- Returns:
- the trade
- Throws:
ReferenceDataNotFoundException- if an identifier cannot be resolved in the reference data
-
meta
public static FixedInflationSwapTemplate.Meta meta()
The meta-bean forFixedInflationSwapTemplate.- Returns:
- the meta-bean, not null
-
builder
public static FixedInflationSwapTemplate.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public FixedInflationSwapTemplate.Meta metaBean()
- Specified by:
metaBeanin interfaceorg.joda.beans.Bean
-
getTenor
public Tenor getTenor()
Gets the tenor of the swap.This is the period from the first accrual date to the last accrual date.
- Returns:
- the value of the property, not null
-
getConvention
public FixedInflationSwapConvention getConvention()
Gets the market convention of the swap.- Returns:
- the value of the property, not null
-
toBuilder
public FixedInflationSwapTemplate.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-