public final class OvernightIndexObservation extends Object implements IndexObservation, org.joda.beans.ImmutableBean, Serializable
Observing an Overnight index requires knowledge of the index, fixing date, publication date, effective date and maturity date.
| Modifier and Type | Class and Description |
|---|---|
static class |
OvernightIndexObservation.Builder
The bean-builder for
OvernightIndexObservation. |
static class |
OvernightIndexObservation.Meta
The meta-bean for
OvernightIndexObservation. |
| Modifier and Type | Method and Description |
|---|---|
static OvernightIndexObservation.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
boolean |
equals(Object obj)
Compares this observation to another based on the index and fixing date.
|
Currency |
getCurrency()
Gets the currency of the Overnight index.
|
LocalDate |
getEffectiveDate()
Gets the effective date of the investment implied by the fixing date.
|
LocalDate |
getFixingDate()
Gets the date of the index fixing.
|
OvernightIndex |
getIndex()
Gets the Overnight index.
|
LocalDate |
getMaturityDate()
Gets the maturity date of the investment implied by the fixing date.
|
LocalDate |
getPublicationDate()
Gets the date that the rate implied by the fixing date is published.
|
double |
getYearFraction()
Gets the year fraction of the investment implied by the fixing date.
|
int |
hashCode()
Returns a hash code based on the index and fixing date.
|
static OvernightIndexObservation.Meta |
meta()
The meta-bean for
OvernightIndexObservation. |
OvernightIndexObservation.Meta |
metaBean() |
static OvernightIndexObservation |
of(OvernightIndex index,
LocalDate fixingDate,
ReferenceData refData)
Creates an
IborRateObservation from an index and fixing date. |
OvernightIndexObservation.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
public static OvernightIndexObservation of(OvernightIndex index, LocalDate fixingDate, ReferenceData refData)
IborRateObservation from an index and fixing date.
The reference data is used to find the maturity date from the fixing date.
index - the indexfixingDate - the fixing daterefData - the reference data to use when resolving holiday calendarspublic Currency getCurrency()
public boolean equals(Object obj)
The publication, effective and maturity dates are ignored.
public int hashCode()
The maturity date is ignored.
public static OvernightIndexObservation.Meta meta()
OvernightIndexObservation.public static OvernightIndexObservation.Builder builder()
public OvernightIndexObservation.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic OvernightIndex getIndex()
The rate will be queried from this index.
getIndex in interface IndexObservationpublic LocalDate getFixingDate()
This is an adjusted date with any business day rule applied.
Valid business days are defined by RateIndex.getFixingCalendar().
public LocalDate getPublicationDate()
This is an adjusted date with any business day rule applied.
This must be equal to OvernightIndex.calculatePublicationFromFixing(LocalDate, ReferenceData).
public LocalDate getEffectiveDate()
This is an adjusted date with any business day rule applied.
This must be equal to OvernightIndex.calculateEffectiveFromFixing(LocalDate, ReferenceData).
public LocalDate getMaturityDate()
This is an adjusted date with any business day rule applied.
This must be equal to OvernightIndex.calculateMaturityFromEffective(LocalDate, ReferenceData).
public double getYearFraction()
This is calculated using the day count of the index. It represents the fraction of the year between the effective date and the maturity date. Typically the value will be close to 1 for one year and close to 0.5 for six months.
public OvernightIndexObservation.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.