Class IborInterpolatedRateComputation

  • All Implemented Interfaces:
    RateComputation,, org.joda.beans.Bean, org.joda.beans.ImmutableBean

    public final class IborInterpolatedRateComputation
    extends java.lang.Object
    implements RateComputation, org.joda.beans.ImmutableBean,
    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
    • Method Detail

      • of

        public static IborInterpolatedRateComputation of​(IborIndex index1,
                                                         IborIndex index2,
                                                         java.time.LocalDate fixingDate,
                                                         ReferenceData refData)
        Creates an instance from two indices and fixing date.

        The indices may be passed in any order.

        index1 - the first index
        index2 - the second index
        fixingDate - the fixing date
        refData - the reference data to use when resolving holiday calendars
        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.

        shortObservation - the short underlying index observation
        longObservation - the long underlying index observation
        the rate computation
        java.lang.IllegalArgumentException - if the indices are not short, then long
      • getFixingDate

        public java.time.LocalDate getFixingDate()
        Gets the fixing date.
        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 interface RateComputation
        builder - the builder to use
      • 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'.

        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'.

        the value of the property, not null
      • equals

        public boolean equals​(java.lang.Object obj)
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object