Class IborRateComputation

  • All Implemented Interfaces:
    RateComputation, java.io.Serializable, Bean, ImmutableBean

    public final class IborRateComputation
    extends java.lang.Object
    implements RateComputation, ImmutableBean, java.io.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
    • Method Detail

      • of

        public static IborRateComputation of​(IborIndex index,
                                             java.time.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 index
        fixingDate - the fixing date
        refData - 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 java.time.LocalDate getFixingDate()
        Gets the fixing date.
        Returns:
        the fixing date
      • getEffectiveDate

        public java.time.LocalDate getEffectiveDate()
        Gets the effective date.
        Returns:
        the effective date
      • getMaturityDate

        public java.time.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​(com.google.common.collect.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
        Parameters:
        builder - the builder to use
      • meta

        public static IborRateComputation.Meta meta()
        The meta-bean for IborRateComputation.
        Returns:
        the meta-bean, not null
      • getObservation

        public IborIndexObservation getObservation()
        Gets the underlying index observation.
        Returns:
        the value of the property, not null
      • equals

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

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

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