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 classIborIndexObservation.MetaThe meta-bean forIborIndexObservation.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)CurrencygetCurrency()Gets the currency of the Ibor index.LocalDategetEffectiveDate()Gets the effective date of the investment implied by the fixing date.LocalDategetFixingDate()Gets the date of the index fixing.IborIndexgetIndex()Gets the Ibor index.LocalDategetMaturityDate()Gets the maturity date of the investment implied by the fixing date.doublegetYearFraction()Gets the year fraction of the investment implied by the fixing date.inthashCode()static IborIndexObservation.Metameta()The meta-bean forIborIndexObservation.IborIndexObservation.MetametaBean()static IborIndexObservationof(IborIndex index, LocalDate fixingDate, ReferenceData refData)Creates an instance from an index and fixing date.StringtoString()
-
-
-
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:
metaBeanin 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:
getIndexin 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
-
-