Class IborIndexObservation
- java.lang.Object
-
- com.opengamma.strata.basics.index.IborIndexObservation
-
- All Implemented Interfaces:
IndexObservation
,Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class IborIndexObservation extends Object implements IndexObservation, org.joda.beans.ImmutableBean, Serializable
Defines the observation of a rate of interest from a single Ibor index.An interest rate determined directly from an Ibor index. For example, a rate determined from 'GBP-LIBOR-3M' on a single fixing date.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IborIndexObservation.Meta
The meta-bean forIborIndexObservation
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Currency
getCurrency()
Gets the currency of the Ibor index.LocalDate
getEffectiveDate()
Gets the effective date of the investment implied by the fixing date.LocalDate
getFixingDate()
Gets the date of the index fixing.IborIndex
getIndex()
Gets the Ibor index.LocalDate
getMaturityDate()
Gets the maturity date of the investment implied by the fixing date.double
getYearFraction()
Gets the year fraction of the investment implied by the fixing date.int
hashCode()
static IborIndexObservation.Meta
meta()
The meta-bean forIborIndexObservation
.IborIndexObservation.Meta
metaBean()
static IborIndexObservation
of(IborIndex index, LocalDate fixingDate, ReferenceData refData)
Creates an instance from an index and fixing date.String
toString()
-
-
-
Method Detail
-
of
public static IborIndexObservation of(IborIndex index, LocalDate fixingDate, ReferenceData refData)
Creates an instance from an index and fixing date.The reference data is used to find the maturity date from the fixing date.
- Parameters:
index
- the indexfixingDate
- the fixing daterefData
- the reference data to use when resolving holiday calendars- Returns:
- the rate observation
-
getCurrency
public Currency getCurrency()
Gets the currency of the Ibor index.- Returns:
- the currency of the index
-
meta
public static IborIndexObservation.Meta meta()
The meta-bean forIborIndexObservation
.- Returns:
- the meta-bean, not null
-
metaBean
public IborIndexObservation.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getIndex
public IborIndex getIndex()
Gets the Ibor index.The rate to be paid is based on this index. It will be a well known market index such as 'GBP-LIBOR-3M'.
- Specified by:
getIndex
in interfaceIndexObservation
- Returns:
- the value of the property, not null
-
getFixingDate
public LocalDate getFixingDate()
Gets the date of the index fixing.This is an adjusted date with any business day rule applied. Valid business days are defined by
RateIndex.getFixingCalendar()
.- Returns:
- the value of the property, not null
-
getEffectiveDate
public LocalDate getEffectiveDate()
Gets the effective date of the investment implied by the fixing date.This is an adjusted date with any business day rule applied. This must be equal to
IborIndex.calculateEffectiveFromFixing(LocalDate, ReferenceData)
.- Returns:
- the value of the property, not null
-
getMaturityDate
public LocalDate getMaturityDate()
Gets the maturity date of the investment implied by the fixing date.This is an adjusted date with any business day rule applied. This must be equal to
IborIndex.calculateMaturityFromEffective(LocalDate, ReferenceData)
.- Returns:
- the value of the property, not null
-
getYearFraction
public double getYearFraction()
Gets the year fraction of the investment implied by the fixing date.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.
- Returns:
- the value of the property, not null
-
-