Class IborInterpolatedRateComputation
- java.lang.Object
-
- com.opengamma.strata.product.rate.IborInterpolatedRateComputation
-
- All Implemented Interfaces:
RateComputation
,Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class IborInterpolatedRateComputation extends Object implements RateComputation, org.joda.beans.ImmutableBean, Serializable
Defines the computation of a rate of interest interpolated from two Ibor indices.An interest rate determined from two Ibor indices by linear interpolation. Both indices are observed on the same fixing date and they must have the same currency. For example, linear interpolation between 'GBP-LIBOR-1M' and 'GBP-LIBOR-3M'.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IborInterpolatedRateComputation.Meta
The meta-bean forIborInterpolatedRateComputation
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
collectIndices(ImmutableSet.Builder<Index> builder)
Collects all the indices referred to by this computation.boolean
equals(Object obj)
LocalDate
getFixingDate()
Gets the fixing date.IborIndexObservation
getLongObservation()
Gets the longer Ibor index observation.IborIndexObservation
getShortObservation()
Gets the shorter Ibor index observation.int
hashCode()
static IborInterpolatedRateComputation.Meta
meta()
The meta-bean forIborInterpolatedRateComputation
.IborInterpolatedRateComputation.Meta
metaBean()
static IborInterpolatedRateComputation
of(IborIndexObservation shortObservation, IborIndexObservation longObservation)
Creates an instance from the two underlying index observations.static IborInterpolatedRateComputation
of(IborIndex index1, IborIndex index2, LocalDate fixingDate, ReferenceData refData)
Creates an instance from two indices and fixing date.String
toString()
-
-
-
Method Detail
-
of
public static IborInterpolatedRateComputation of(IborIndex index1, IborIndex index2, LocalDate fixingDate, ReferenceData refData)
Creates an instance from two indices and fixing date.The indices may be passed in any order.
- Parameters:
index1
- the first indexindex2
- the second indexfixingDate
- the fixing daterefData
- the reference data to use when resolving holiday calendars- Returns:
- the interpolated rate computation
-
of
public static IborInterpolatedRateComputation of(IborIndexObservation shortObservation, IborIndexObservation longObservation)
Creates an instance from the two underlying index observations.The two observations must be for two different indexes in the same currency on the same fixing date. The index with the shorter tenor must be passed as the first argument.
- Parameters:
shortObservation
- the short underlying index observationlongObservation
- the long underlying index observation- Returns:
- the rate computation
- Throws:
IllegalArgumentException
- if the indices are not short, then long
-
getFixingDate
public LocalDate getFixingDate()
Gets the fixing date.- Returns:
- the fixing date
-
collectIndices
public void collectIndices(ImmutableSet.Builder<Index> builder)
Description copied from interface:RateComputation
Collects 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:
collectIndices
in interfaceRateComputation
- Parameters:
builder
- the builder to use
-
meta
public static IborInterpolatedRateComputation.Meta meta()
The meta-bean forIborInterpolatedRateComputation
.- Returns:
- the meta-bean, not null
-
metaBean
public IborInterpolatedRateComputation.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getShortObservation
public IborIndexObservation getShortObservation()
Gets the shorter Ibor index observation.The rate to be paid is based on this index It will be a well known market index such as 'GBP-LIBOR-1M'.
- Returns:
- the value of the property, not null
-
getLongObservation
public IborIndexObservation getLongObservation()
Gets the longer Ibor index observation.The rate to be paid is based on this index It will be a well known market index such as 'GBP-LIBOR-3M'.
- Returns:
- the value of the property, not null
-
-