public final class FxIndexObservation extends Object implements IndexObservation, org.joda.beans.ImmutableBean, Serializable
Observing an FX index requires knowledge of the index, fixing date and maturity date.
| Modifier and Type | Class and Description |
|---|---|
static class |
FxIndexObservation.Meta
The meta-bean for
FxIndexObservation. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Compares this observation to another based on the index and fixing date.
|
CurrencyPair |
getCurrencyPair()
Gets the currency pair of the FX index.
|
LocalDate |
getFixingDate()
Gets the date of the index fixing.
|
FxIndex |
getIndex()
Gets the FX index.
|
LocalDate |
getMaturityDate()
Gets the date of the transfer implied by the fixing date.
|
int |
hashCode()
Returns a hash code based on the index and fixing date.
|
static FxIndexObservation.Meta |
meta()
The meta-bean for
FxIndexObservation. |
FxIndexObservation.Meta |
metaBean() |
static FxIndexObservation |
of(FxIndex index,
LocalDate fixingDate,
ReferenceData refData)
Creates an instance from an index and fixing date.
|
String |
toString() |
public static FxIndexObservation of(FxIndex index, LocalDate fixingDate, ReferenceData refData)
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 CurrencyPair getCurrencyPair()
public boolean equals(Object obj)
The maturity date is ignored.
public int hashCode()
The maturity date is ignored.
public static FxIndexObservation.Meta meta()
FxIndexObservation.public FxIndexObservation.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic FxIndex 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 FxIndex.getFixingCalendar().
public LocalDate getMaturityDate()
This is an adjusted date with any business day rule applied.
This must be equal to FxIndex.calculateMaturityFromFixing(LocalDate, ReferenceData).
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.