public final class IborFutureTemplate extends Object implements TradeTemplate, org.joda.beans.ImmutableBean, Serializable
| Modifier and Type | Method and Description |
|---|---|
LocalDate |
calculateReferenceDateFromTradeDate(LocalDate tradeDate,
ReferenceData refData)
Calculates the reference date of the trade.
|
IborFutureTrade |
createTrade(LocalDate tradeDate,
SecurityId securityId,
double quantity,
double notional,
double price,
ReferenceData refData)
|
IborFutureTrade |
createTrade(LocalDate tradeDate,
SecurityId securityId,
double quantity,
double price,
ReferenceData refData)
Creates a trade based on this template.
|
boolean |
equals(Object obj) |
IborFutureContractSpec |
getContractSpec()
Gets the underlying contract specification.
|
IborFutureConvention |
getConvention()
Deprecated.
|
IborIndex |
getIndex()
Gets the underlying index.
|
SequenceDate |
getSequenceDate()
Gets the instructions that define which future is desired.
|
int |
hashCode() |
static org.joda.beans.TypedMetaBean<IborFutureTemplate> |
meta()
The meta-bean for
IborFutureTemplate. |
org.joda.beans.TypedMetaBean<IborFutureTemplate> |
metaBean() |
static IborFutureTemplate |
of(Period minimumPeriod,
int sequenceNumber,
IborFutureConvention convention)
Deprecated.
|
static IborFutureTemplate |
of(SequenceDate sequenceDate,
IborFutureContractSpec contractSpec)
Obtains a template based on the specified contract specification and sequence date.
|
static IborFutureTemplate |
of(YearMonth yearMonth,
IborFutureConvention convention)
Deprecated.
|
String |
toString() |
public static IborFutureTemplate of(SequenceDate sequenceDate, IborFutureContractSpec contractSpec)
The specific future is defined by two date-related inputs - the sequence date and the date sequence embedded in the contract specification.
sequenceDate - the instructions that define which future is desiredcontractSpec - the contract specification@Deprecated public static IborFutureTemplate of(Period minimumPeriod, int sequenceNumber, IborFutureConvention convention)
of(SequenceDate, IborFutureContractSpec)The specific future is defined by two date-related inputs, the minimum period and the 1-based future number. For example, the 2nd future of the series where the 1st future is at least 1 week after the value date would be represented by a minimum period of 1 week and future number 2.
minimumPeriod - the minimum period between the base date and the first futuresequenceNumber - the 1-based index of the future after the minimum period, must be 1 or greaterconvention - the future convention@Deprecated public static IborFutureTemplate of(YearMonth yearMonth, IborFutureConvention convention)
of(SequenceDate, IborFutureContractSpec)The future is selected from a sequence of futures based on a year-month. In most cases, the date of the future will be in the same month as the specified month, but this is not guaranteed.
yearMonth - the year-month to use to select the futureconvention - the future conventionpublic IborIndex getIndex()
@Deprecated public IborFutureConvention getConvention()
getContractSpec()public IborFutureTrade createTrade(LocalDate tradeDate, SecurityId securityId, double quantity, double price, ReferenceData refData)
This returns a trade based on the specified date.
tradeDate - the date of the tradesecurityId - the identifier of the securityquantity - the number of contracts traded, positive if buying, negative if sellingprice - the trade pricerefData - the reference data, used to resolve the trade datesReferenceDataNotFoundException - if an identifier cannot be resolved in the reference data@Deprecated public IborFutureTrade createTrade(LocalDate tradeDate, SecurityId securityId, double quantity, double notional, double price, ReferenceData refData)
This returns a trade based on the specified date. The notional is unsigned, with the quantity determining the direction of the trade.
tradeDate - the date of the tradesecurityId - the identifier of the securityquantity - the number of contracts traded, positive if buying, negative if sellingnotional - the notional amount of one future contractprice - the trade pricerefData - the reference data, used to resolve the trade datesReferenceDataNotFoundException - if an identifier cannot be resolved in the reference datapublic LocalDate calculateReferenceDateFromTradeDate(LocalDate tradeDate, ReferenceData refData)
tradeDate - the date of the traderefData - the reference data, used to resolve the datepublic static org.joda.beans.TypedMetaBean<IborFutureTemplate> meta()
IborFutureTemplate.public org.joda.beans.TypedMetaBean<IborFutureTemplate> metaBean()
metaBean in interface org.joda.beans.Beanpublic SequenceDate getSequenceDate()
public IborFutureContractSpec getContractSpec()
This specifies the contract of the Ibor Futures to be created.
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.