Class ImmutableIborFutureContractSpec
- java.lang.Object
-
- com.opengamma.strata.product.index.type.ImmutableIborFutureContractSpec
-
- All Implemented Interfaces:
Named
,IborFutureContractSpec
,Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class ImmutableIborFutureContractSpec extends Object implements IborFutureContractSpec, org.joda.beans.ImmutableBean, Serializable
A contract specification for exchange traded Ibor Futures.The contract specification defines how the future is traded. A specific future is created by specifying the year-month.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableIborFutureContractSpec.Builder
The bean-builder forImmutableIborFutureContractSpec
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableIborFutureContractSpec.Builder
builder()
Returns a builder used to create an instance of the bean.LocalDate
calculateReferenceDate(LocalDate tradeDate, SequenceDate sequenceDate, ReferenceData refData)
Calculates the reference date from the trade date.IborFuturePosition
createPosition(SecurityId securityId, YearMonth expiry, double quantity, ReferenceData refData)
Creates a position based on this convention.IborFutureTrade
createTrade(LocalDate tradeDate, SecurityId securityId, SequenceDate sequenceDate, double quantity, double price, ReferenceData refData)
Creates a trade based on this convention.boolean
equals(Object obj)
BusinessDayAdjustment
getBusinessDayAdjustment()
Gets the business day adjustment to apply to the reference date.DateSequence
getDateSequence()
Gets the sequence of dates that the future is based on.IborIndex
getIndex()
Gets the Ibor index.String
getName()
Gets the name, such as 'USD-LIBOR-3M-IMM-CME'.double
getNotional()
Gets the notional deposit that the contract models.int
hashCode()
static org.joda.beans.TypedMetaBean<ImmutableIborFutureContractSpec>
meta()
The meta-bean forImmutableIborFutureContractSpec
.org.joda.beans.TypedMetaBean<ImmutableIborFutureContractSpec>
metaBean()
ImmutableIborFutureContractSpec.Builder
toBuilder()
Returns a builder that allows this bean to be mutated.String
toString()
-
-
-
Method Detail
-
createTrade
public IborFutureTrade createTrade(LocalDate tradeDate, SecurityId securityId, SequenceDate sequenceDate, double quantity, double price, ReferenceData refData)
Description copied from interface:IborFutureContractSpec
Creates a trade based on this convention.This returns a trade based on the instructions in the
SequenceDate
. The sequence date points at the expiry of the future, which is how they are referred to in the market.- Specified by:
createTrade
in interfaceIborFutureContractSpec
- Parameters:
tradeDate
- the trade datesecurityId
- the identifier of the securitysequenceDate
- the date to be used from the sequence identifying the expiry of the futurequantity
- the number of contracts traded, positive if buying, negative if sellingprice
- the trade price of the futurerefData
- the reference data, used to resolve the trade dates- Returns:
- the trade
-
calculateReferenceDate
public LocalDate calculateReferenceDate(LocalDate tradeDate, SequenceDate sequenceDate, ReferenceData refData)
Description copied from interface:IborFutureContractSpec
Calculates the reference date from the trade date.This determines the date from the
SequenceDate
.- Specified by:
calculateReferenceDate
in interfaceIborFutureContractSpec
- Parameters:
tradeDate
- the trade datesequenceDate
- the date to be used from the sequencerefData
- the reference data, used to resolve the date- Returns:
- the future reference date
-
createPosition
public IborFuturePosition createPosition(SecurityId securityId, YearMonth expiry, double quantity, ReferenceData refData)
Description copied from interface:IborFutureContractSpec
Creates a position based on this convention.- Specified by:
createPosition
in interfaceIborFutureContractSpec
- Parameters:
securityId
- the identifier of the securityexpiry
- the expiry year monthquantity
- the number of contracts traded, positive if buying, negative if sellingrefData
- the reference data, used to resolve the trade dates- Returns:
- the position
-
meta
public static org.joda.beans.TypedMetaBean<ImmutableIborFutureContractSpec> meta()
The meta-bean forImmutableIborFutureContractSpec
.- Returns:
- the meta-bean, not null
-
builder
public static ImmutableIborFutureContractSpec.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public org.joda.beans.TypedMetaBean<ImmutableIborFutureContractSpec> metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getName
public String getName()
Gets the name, such as 'USD-LIBOR-3M-IMM-CME'.- Specified by:
getName
in interfaceIborFutureContractSpec
- Specified by:
getName
in interfaceNamed
- Returns:
- the value of the property, not blank
-
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 interfaceIborFutureContractSpec
- 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
-
getBusinessDayAdjustment
public BusinessDayAdjustment getBusinessDayAdjustment()
Gets the business day adjustment to apply to the reference date.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
-
getNotional
public double getNotional()
Gets the notional deposit that the contract models.This is the full notional of the deposit, such as 1 million dollars. The notional expressed here must be positive. The currency of the notional is specified by the index.
- Specified by:
getNotional
in interfaceIborFutureContractSpec
- Returns:
- the value of the property
-
toBuilder
public ImmutableIborFutureContractSpec.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-