public final class ImmutableOvernightFutureContractSpec extends Object implements OvernightFutureContractSpec, org.joda.beans.ImmutableBean, Serializable
The contract specification defines how the future is traded. A specific future is created by specifying the year-month.
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableOvernightFutureContractSpec.Builder
The bean-builder for
ImmutableOvernightFutureContractSpec. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableOvernightFutureContractSpec.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
LocalDate |
calculateLastFixingDate(LocalDate referenceDate,
ReferenceData refData)
Calculates the last fixing date from the trade date.
|
LocalDate |
calculateReferenceDate(LocalDate tradeDate,
SequenceDate sequenceDate,
ReferenceData refData)
Calculates the reference date from the trade date.
|
OvernightFuturePosition |
createPosition(SecurityId securityId,
YearMonth expiry,
double quantity,
ReferenceData refData)
Creates a position based on this convention.
|
OvernightFutureTrade |
createTrade(LocalDate tradeDate,
SecurityId securityId,
SequenceDate sequenceDate,
double quantity,
double price,
ReferenceData refData)
Creates a trade based on this convention.
|
boolean |
equals(Object obj) |
OvernightAccrualMethod |
getAccrualMethod()
Gets the method of accruing Overnight interest.
|
DateSequence |
getDateSequence()
Gets the sequence of dates that the future is based on.
|
DaysAdjustment |
getEndDateAdjustment()
Gets the days adjustment to apply to get the end date.
|
OvernightIndex |
getIndex()
Gets the Overnight index.
|
DaysAdjustment |
getLastTradeDateAdjustment()
Gets the days adjustment to apply to get the last trade date.
|
String |
getName()
Gets the name, such as 'GBP-SONIA-3M-IMM-ICE'.
|
double |
getNotional()
Gets the notional deposit that the contract models.
|
BusinessDayAdjustment |
getStartDateAdjustment()
Gets the business day adjustment to apply to get the start date.
|
int |
hashCode() |
static org.joda.beans.TypedMetaBean<ImmutableOvernightFutureContractSpec> |
meta()
The meta-bean for
ImmutableOvernightFutureContractSpec. |
org.joda.beans.TypedMetaBean<ImmutableOvernightFutureContractSpec> |
metaBean() |
ImmutableOvernightFutureContractSpec.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitextendedEnum, ofpublic OvernightFutureTrade createTrade(LocalDate tradeDate, SecurityId securityId, SequenceDate sequenceDate, double quantity, double price, ReferenceData refData)
OvernightFutureContractSpec
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.
createTrade in interface OvernightFutureContractSpectradeDate - 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 datespublic OvernightFuturePosition createPosition(SecurityId securityId, YearMonth expiry, double quantity, ReferenceData refData)
OvernightFutureContractSpeccreatePosition in interface OvernightFutureContractSpecsecurityId - 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 datespublic LocalDate calculateReferenceDate(LocalDate tradeDate, SequenceDate sequenceDate, ReferenceData refData)
OvernightFutureContractSpec
This determines the date from the SequenceDate.
calculateReferenceDate in interface OvernightFutureContractSpectradeDate - the trade datesequenceDate - the date to be used from the sequencerefData - the reference data, used to resolve the datepublic LocalDate calculateLastFixingDate(LocalDate referenceDate, ReferenceData refData)
OvernightFutureContractSpeccalculateLastFixingDate in interface OvernightFutureContractSpecreferenceDate - the reference date of the contract, also known as the start daterefData - the reference data, used to resolve the datepublic static org.joda.beans.TypedMetaBean<ImmutableOvernightFutureContractSpec> meta()
ImmutableOvernightFutureContractSpec.public static ImmutableOvernightFutureContractSpec.Builder builder()
public org.joda.beans.TypedMetaBean<ImmutableOvernightFutureContractSpec> metaBean()
metaBean in interface org.joda.beans.Beanpublic String getName()
getName in interface NamedgetName in interface OvernightFutureContractSpecpublic OvernightIndex getIndex()
The floating rate to be paid is based on this index It will be a well known market index such as 'GBP-SONIA'.
getIndex in interface OvernightFutureContractSpecpublic DateSequence getDateSequence()
This is used to calculate the reference date of the future that is the start date of the underlying synthetic deposit.
public OvernightAccrualMethod getAccrualMethod()
public BusinessDayAdjustment getStartDateAdjustment()
The start date is obtained by applying this adjustment to the reference date from the date sequence. The reference date is often the third Wednesday of the month or the start of the month. This defaults to accepting the date from the sequence without applying a holiday calendar.
public DaysAdjustment getEndDateAdjustment()
The end date is obtained by applying this adjustment to the next date in sequence from the start date. This defaults to minus one without applying a holiday calendar.
public DaysAdjustment getLastTradeDateAdjustment()
The last trade date is obtained by applying this adjustment to the next date in sequence from the start date. This defaults to the previous business day in the fixing calendar (minus one calendar day and preceding).
public double getNotional()
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.
getNotional in interface OvernightFutureContractSpecpublic ImmutableOvernightFutureContractSpec.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.