Class IborRateComputation
- java.lang.Object
-
- com.opengamma.strata.product.rate.IborRateComputation
-
- All Implemented Interfaces:
RateComputation,Serializable,org.joda.beans.Bean,org.joda.beans.ImmutableBean
public final class IborRateComputation extends Object implements RateComputation, org.joda.beans.ImmutableBean, Serializable
Defines the computation 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 classIborRateComputation.MetaThe meta-bean forIborRateComputation.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcollectIndices(ImmutableSet.Builder<Index> builder)Collects all the indices referred to by this computation.booleanequals(Object obj)CurrencygetCurrency()Gets the currency of the Ibor index.LocalDategetEffectiveDate()Gets the effective date.LocalDategetFixingDate()Gets the fixing date.IborIndexgetIndex()Gets the Ibor index.LocalDategetMaturityDate()Gets the maturity date.IborIndexObservationgetObservation()Gets the underlying index observation.doublegetYearFraction()Gets the year fraction.inthashCode()static IborRateComputation.Metameta()The meta-bean forIborRateComputation.IborRateComputation.MetametaBean()static IborRateComputationof(IborIndexObservation underlyingObservation)Creates an instance from the underlying index observation.static IborRateComputationof(IborIndex index, LocalDate fixingDate, ReferenceData refData)Creates an instance from an index and fixing date.StringtoString()
-
-
-
Method Detail
-
of
public static IborRateComputation 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 computation
-
of
public static IborRateComputation of(IborIndexObservation underlyingObservation)
Creates an instance from the underlying index observation.- Parameters:
underlyingObservation- the underlying index observation- Returns:
- the rate computation
-
getIndex
public IborIndex getIndex()
Gets the Ibor index.- Returns:
- the index
-
getCurrency
public Currency getCurrency()
Gets the currency of the Ibor index.- Returns:
- the currency of the index
-
getFixingDate
public LocalDate getFixingDate()
Gets the fixing date.- Returns:
- the fixing date
-
getEffectiveDate
public LocalDate getEffectiveDate()
Gets the effective date.- Returns:
- the effective date
-
getMaturityDate
public LocalDate getMaturityDate()
Gets the maturity date.- Returns:
- the maturity date
-
getYearFraction
public double getYearFraction()
Gets the year fraction.- Returns:
- the year fraction
-
collectIndices
public void collectIndices(ImmutableSet.Builder<Index> builder)
Description copied from interface:RateComputationCollects all the indices referred to by this computation.A computation will typically refer to one index, such as 'GBP-LIBOR-3M'. Each index that is referred to must be added to the specified builder.
- Specified by:
collectIndicesin interfaceRateComputation- Parameters:
builder- the builder to use
-
meta
public static IborRateComputation.Meta meta()
The meta-bean forIborRateComputation.- Returns:
- the meta-bean, not null
-
metaBean
public IborRateComputation.Meta metaBean()
- Specified by:
metaBeanin interfaceorg.joda.beans.Bean
-
getObservation
public IborIndexObservation getObservation()
Gets the underlying index observation.- Returns:
- the value of the property, not null
-
-