Interface IborFutureContractSpec
-
- All Superinterfaces:
Named
- All Known Implementing Classes:
ImmutableIborFutureContractSpec
public interface IborFutureContractSpec extends Named
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.
For commonly traded contract specifications, see
IborFutureContractSpecs
. To manually create a contract specification, seeImmutableIborFutureContractSpec
. To register a specific contract specification, seeOvernightIborContractSpec.ini
.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.static ExtendedEnum<IborFutureContractSpec>
extendedEnum()
Gets the extended enum helper.IborIndex
getIndex()
Gets the Ibor index.String
getName()
Gets the name that uniquely identifies this convention.double
getNotional()
Gets the notional.static IborFutureContractSpec
of(String uniqueName)
Obtains an instance from the specified unique name.
-
-
-
Method Detail
-
of
static IborFutureContractSpec of(String uniqueName)
Obtains an instance from the specified unique name.- Parameters:
uniqueName
- the unique name- Returns:
- the convention
- Throws:
IllegalArgumentException
- if the name is not known
-
extendedEnum
static ExtendedEnum<IborFutureContractSpec> extendedEnum()
Gets the extended enum helper.This helper allows instances of the convention to be looked up. It also provides the complete set of available instances.
- Returns:
- the extended enum helper
-
getIndex
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'.
- Returns:
- the index
-
getNotional
double getNotional()
Gets the notional.The notional is a positive number in the index currency.
- Returns:
- the notional
-
createTrade
IborFutureTrade createTrade(LocalDate tradeDate, SecurityId securityId, SequenceDate sequenceDate, double quantity, double price, ReferenceData refData)
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.- 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
- Throws:
ReferenceDataNotFoundException
- if an identifier cannot be resolved in the reference data
-
createPosition
IborFuturePosition createPosition(SecurityId securityId, YearMonth expiry, double quantity, ReferenceData refData)
Creates a position based on this convention.- 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
- Throws:
ReferenceDataNotFoundException
- if an identifier cannot be resolved in the reference data
-
calculateReferenceDate
LocalDate calculateReferenceDate(LocalDate tradeDate, SequenceDate sequenceDate, ReferenceData refData)
Calculates the reference date from the trade date.This determines the date from the
SequenceDate
.- 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
-
getName
String getName()
Gets the name that uniquely identifies this convention.This name is used in serialization and can be parsed using
of(String)
.
-
-