public final class OvernightFutureTemplate extends Object implements TradeTemplate, org.joda.beans.ImmutableBean, Serializable
| Modifier and Type | Method and Description |
|---|---|
LocalDate |
calculateLastFixingDateFromTradeDate(LocalDate tradeDate,
ReferenceData refData)
Calculates the last fixing date of the trade.
|
LocalDate |
calculateReferenceDateFromTradeDate(LocalDate tradeDate,
ReferenceData refData)
Calculates the reference date of the trade.
|
OvernightFutureTrade |
createTrade(LocalDate tradeDate,
SecurityId securityId,
double quantity,
double price,
ReferenceData refData)
Creates a trade based on this template.
|
boolean |
equals(Object obj) |
OvernightFutureContractSpec |
getContractSpec()
Gets the underlying contract specification.
|
OvernightIndex |
getIndex()
Gets the underlying index.
|
SequenceDate |
getSequenceDate()
Gets the instructions that define which future is desired.
|
int |
hashCode() |
static org.joda.beans.TypedMetaBean<OvernightFutureTemplate> |
meta()
The meta-bean for
OvernightFutureTemplate. |
org.joda.beans.TypedMetaBean<OvernightFutureTemplate> |
metaBean() |
static OvernightFutureTemplate |
of(SequenceDate sequenceDate,
OvernightFutureContractSpec contractSpec)
Obtains a template based on the specified contract specification and sequence date.
|
String |
toString() |
public static OvernightFutureTemplate of(SequenceDate sequenceDate, OvernightFutureContractSpec 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 specificationpublic OvernightIndex getIndex()
public OvernightFutureTrade 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 datapublic LocalDate calculateReferenceDateFromTradeDate(LocalDate tradeDate, ReferenceData refData)
tradeDate - the date of the traderefData - the reference data, used to resolve the datepublic LocalDate calculateLastFixingDateFromTradeDate(LocalDate tradeDate, ReferenceData refData)
tradeDate - the date of the traderefData - the reference data, used to resolve the datepublic static org.joda.beans.TypedMetaBean<OvernightFutureTemplate> meta()
OvernightFutureTemplate.public org.joda.beans.TypedMetaBean<OvernightFutureTemplate> metaBean()
metaBean in interface org.joda.beans.Beanpublic SequenceDate getSequenceDate()
public OvernightFutureContractSpec getContractSpec()
This specifies the contract of the Overnight 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.