Class ImmutableIborFutureConvention

• java.lang.Object
• com.opengamma.strata.product.index.type.ImmutableIborFutureConvention
• All Implemented Interfaces:
Named, IborFutureConvention, TradeConvention, java.io.Serializable, Bean, ImmutableBean

public final class ImmutableIborFutureConvention
extends java.lang.Object
implements IborFutureConvention, ImmutableBean, java.io.Serializable
A market convention for Ibor Future trades.

This defines the market convention for a future against a particular index. In most cases, the index contains sufficient information to fully define the convention.

Serialized Form
• Nested Class Summary

Nested Classes
Modifier and Type Class Description
static class  ImmutableIborFutureConvention.Builder
The bean-builder for ImmutableIborFutureConvention.
static class  ImmutableIborFutureConvention.Meta
The meta-bean for ImmutableIborFutureConvention.
• Method Summary

All Methods
Modifier and Type Method Description
static ImmutableIborFutureConvention.Builder builder()
Returns a builder used to create an instance of the bean.
java.time.LocalDate calculateReferenceDateFromTradeDate​(java.time.LocalDate tradeDate, java.time.Period minimumPeriod, int sequenceNumber, ReferenceData refData)
Calculates the reference date from the trade date.
java.time.LocalDate calculateReferenceDateFromTradeDate​(java.time.LocalDate tradeDate, java.time.YearMonth yearMonth, ReferenceData refData)
Calculates the reference date from the trade date.
IborFutureTrade createTrade​(java.time.LocalDate tradeDate, SecurityId securityId, java.time.Period minimumPeriod, int sequenceNumber, double quantity, double notional, double price, ReferenceData refData)
Creates a trade based on this convention.
IborFutureTrade createTrade​(java.time.LocalDate tradeDate, SecurityId securityId, java.time.YearMonth yearMonth, double quantity, double notional, double price, ReferenceData refData)
Creates a trade based on this convention.
boolean equals​(java.lang.Object obj)
BusinessDayAdjustment getBusinessDayAdjustment()
DateSequence getDateSequence()
Gets the sequence of dates that the future is based on.
IborIndex getIndex()
Gets the Ibor index.
java.lang.String getName()
Gets the convention name, such as 'USD-LIBOR-3M-Quarterly-IMM'.
int hashCode()
static ImmutableIborFutureConvention.Meta meta()
The meta-bean for ImmutableIborFutureConvention.
ImmutableIborFutureConvention.Meta metaBean()
static ImmutableIborFutureConvention of​(IborIndex index, DateSequence dateSequence)
Creates a convention based on the specified index and the sequence of dates.
ImmutableIborFutureConvention.Builder toBuilder()
Returns a builder that allows this bean to be mutated.
java.lang.String toString()
• Methods inherited from class java.lang.Object

clone, finalize, getClass, notify, notifyAll, wait, wait, wait
• Methods inherited from interface org.joda.beans.Bean

property, propertyNames
• Method Detail

• of

public static ImmutableIborFutureConvention of​(IborIndex index,
DateSequence dateSequence)
Creates a convention based on the specified index and the sequence of dates.

The standard market convention is based on the index. The business day adjustment is set to be 'Following' using the effective date calendar from the index. The convention name will default to the name of the index suffixed by the name of the date sequence.

Parameters:
index - the index, the calendar for the adjustment is extracted from the index
dateSequence - the sequence of dates
Returns:
the convention

public IborFutureTrade createTrade​(java.time.LocalDate tradeDate,
SecurityId securityId,
java.time.Period minimumPeriod,
int sequenceNumber,
double quantity,
double notional,
double price,
ReferenceData refData)
Description copied from interface: IborFutureConvention
Creates a trade based on this convention.

This returns a trade based on the specified minimum period and sequence number.

Specified by:
createTrade in interface IborFutureConvention
Parameters:
tradeDate - the trade date
securityId - the identifier of the security
minimumPeriod - minimum period between the value date and the first future
sequenceNumber - the 1-based sequence number of the futures
quantity - the number of contracts traded, positive if buying, negative if selling
notional - the notional amount of one future contract
price - the trade price of the future
refData - the reference data, used to resolve the trade dates
Returns:

public IborFutureTrade createTrade​(java.time.LocalDate tradeDate,
SecurityId securityId,
java.time.YearMonth yearMonth,
double quantity,
double notional,
double price,
ReferenceData refData)
Description copied from interface: IborFutureConvention
Creates a trade based on this convention.

This returns a trade based on the specified year-month.

Specified by:
createTrade in interface IborFutureConvention
Parameters:
tradeDate - the trade date
securityId - the identifier of the security
yearMonth - the year-month that the future is defined to be for
quantity - the number of contracts traded, positive if buying, negative if selling
notional - the notional amount of one future contract
price - the trade price of the future
refData - the reference data, used to resolve the trade dates
Returns:

public java.time.LocalDate calculateReferenceDateFromTradeDate​(java.time.LocalDate tradeDate,
java.time.Period minimumPeriod,
int sequenceNumber,
ReferenceData refData)
Description copied from interface: IborFutureConvention
Calculates the reference date from the trade date.

This determines the date from the specified minimum period and sequence number.

Specified by:
calculateReferenceDateFromTradeDate in interface IborFutureConvention
Parameters:
tradeDate - the trade date
minimumPeriod - minimum period between the trade date and the first future
sequenceNumber - the 1-based sequence number of the futures
refData - the reference data, used to resolve the date
Returns:
the future reference date

public java.time.LocalDate calculateReferenceDateFromTradeDate​(java.time.LocalDate tradeDate,
java.time.YearMonth yearMonth,
ReferenceData refData)
Description copied from interface: IborFutureConvention
Calculates the reference date from the trade date.

This determines the date from the specified year-month.

Specified by:
calculateReferenceDateFromTradeDate in interface IborFutureConvention
Parameters:
tradeDate - the trade date
yearMonth - the year-month that the future is defined to be for
refData - the reference data, used to resolve the date
Returns:
the future reference date
• toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
• meta

public static ImmutableIborFutureConvention.Meta meta()
The meta-bean for ImmutableIborFutureConvention.
Returns:
the meta-bean, not null
• builder

public static ImmutableIborFutureConvention.Builder builder()
Returns a builder used to create an instance of the bean.
Returns:
the builder, not null
• metaBean

public ImmutableIborFutureConvention.Meta metaBean()
Specified by:
metaBean in interface Bean
• getIndex

public IborIndex getIndex()
Gets the Ibor index.

The floating rate to be paid is based on this index It will be a well known market index such as 'GBP-LIBOR-3M'.

Specified by:
getIndex in interface IborFutureConvention
Returns:
the value of the property, not null
• getName

public java.lang.String getName()
Gets the convention name, such as 'USD-LIBOR-3M-Quarterly-IMM'.

This will default to the name of the index suffixed by the name of the date sequence if not specified.

Specified by:
getName in interface IborFutureConvention
Specified by:
getName in interface Named
Returns:
the value of the property, not null
• getDateSequence

public DateSequence getDateSequence()
Gets the sequence of dates that the future is based on.

This is used to calculate the reference date of the future that is the start date of the underlying synthetic deposit.

Returns:
the value of the property, not null

public BusinessDayAdjustment getBusinessDayAdjustment()

The reference date, which is often the third Wednesday of the month, will be adjusted as defined here.

Returns:
the value of the property, not null
• toBuilder

public ImmutableIborFutureConvention.Builder toBuilder()
Returns a builder that allows this bean to be mutated.
Returns:
the mutable builder, not null
• equals

public boolean equals​(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
• hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object