Class ImmutableIborIndex

  • All Implemented Interfaces:
    FloatingRate, FloatingRateIndex, IborIndex, Index, RateIndex, Named, Serializable, org.joda.beans.Bean, org.joda.beans.ImmutableBean

    public final class ImmutableIborIndex
    extends Object
    implements IborIndex, org.joda.beans.ImmutableBean, Serializable
    An Ibor index implementation based on an immutable set of rules.

    A standard immutable implementation of IborIndex that defines the currency and the rules for converting from fixing to effective and maturity.

    In most cases, applications should refer to indices by name, using IborIndex.of(String). The named index will typically be resolved to an instance of this class. As such, it is recommended to use the IborIndex interface in application code rather than directly referring to this class.

    See Also:
    Serialized Form
    • Method Detail

      • getTenor

        public Tenor getTenor()
        Description copied from interface: RateIndex
        Gets the tenor of the index.
        Specified by:
        getTenor in interface RateIndex
        Returns:
        the tenor
      • calculateFixingDateTime

        public ZonedDateTime calculateFixingDateTime​(LocalDate fixingDate)
        Description copied from interface: IborIndex
        Converts the fixing date-time from the fixing date.

        The fixing date is the date on which the index is to be observed. The fixing date-time is the specific date and time of the observation.

        No error is thrown if the input date is not a valid fixing date.

        Specified by:
        calculateFixingDateTime in interface IborIndex
        Parameters:
        fixingDate - the fixing date
        Returns:
        the fixing date-time
      • calculateEffectiveFromFixing

        public LocalDate calculateEffectiveFromFixing​(LocalDate fixingDate,
                                                      ReferenceData refData)
        Description copied from interface: IborIndex
        Calculates the effective date from the fixing date.

        The fixing date is the date on which the index is to be observed. The effective date is the date on which the implied deposit starts.

        No error is thrown if the input date is not a valid fixing date. Instead, the fixing date is moved to the next valid fixing date and then processed.

        Specified by:
        calculateEffectiveFromFixing in interface IborIndex
        Parameters:
        fixingDate - the fixing date
        refData - the reference data, used to resolve the holiday calendar
        Returns:
        the effective date
      • calculateMaturityFromFixing

        public LocalDate calculateMaturityFromFixing​(LocalDate fixingDate,
                                                     ReferenceData refData)
        Description copied from interface: IborIndex
        Calculates the maturity date from the fixing date.

        The fixing date is the date on which the index is to be observed. The maturity date is the date on which the implied deposit ends.

        No error is thrown if the input date is not a valid fixing date. Instead, the fixing date is moved to the next valid fixing date and then processed.

        Specified by:
        calculateMaturityFromFixing in interface IborIndex
        Parameters:
        fixingDate - the fixing date
        refData - the reference data, used to resolve the holiday calendar
        Returns:
        the maturity date
      • calculateFixingFromEffective

        public LocalDate calculateFixingFromEffective​(LocalDate effectiveDate,
                                                      ReferenceData refData)
        Description copied from interface: IborIndex
        Calculates the fixing date from the effective date.

        The fixing date is the date on which the index is to be observed. The effective date is the date on which the implied deposit starts.

        No error is thrown if the input date is not a valid effective date. Instead, the effective date is moved to the next valid effective date and then processed.

        Specified by:
        calculateFixingFromEffective in interface IborIndex
        Parameters:
        effectiveDate - the effective date
        refData - the reference data, used to resolve the holiday calendar
        Returns:
        the fixing date
      • calculateMaturityFromEffective

        public LocalDate calculateMaturityFromEffective​(LocalDate effectiveDate,
                                                        ReferenceData refData)
        Description copied from interface: IborIndex
        Calculates the maturity date from the effective date.

        The effective date is the date on which the implied deposit starts. The maturity date is the date on which the implied deposit ends.

        No error is thrown if the input date is not a valid effective date. Instead, the effective date is moved to the next valid effective date and then processed.

        Specified by:
        calculateMaturityFromEffective in interface IborIndex
        Parameters:
        effectiveDate - the effective date
        refData - the reference data, used to resolve the holiday calendar
        Returns:
        the maturity date
      • resolve

        public Function<LocalDate,​IborIndexObservation> resolve​(ReferenceData refData)
        Description copied from interface: IborIndex
        Resolves this index using the specified reference data, returning a function.

        This returns a Function that converts fixing dates to observations. It binds the holiday calendar, looked up from the reference data, into the result. As such, there is no need to pass the reference data in again.

        This method is intended for use when looping to create multiple instances of IborIndexObservation. Implementations of the method are intended to optimize, avoiding repeated calls to resolve the holiday calendar

        Specified by:
        resolve in interface IborIndex
        Parameters:
        refData - the reference data, used to resolve the holiday calendar
        Returns:
        a function that converts fixing date to observation
      • hashCode

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

        public String toString()
        Returns the name of the index.
        Overrides:
        toString in class Object
        Returns:
        the name of the index
      • meta

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

        public static ImmutableIborIndex.Builder builder()
        Returns a builder used to create an instance of the bean.
        Returns:
        the builder, not null
      • isActive

        public boolean isActive()
        Gets whether the index is active, defaulted to true.

        Over time some indices become inactive and are no longer produced. If this occurs, this flag will be set to false.

        Specified by:
        isActive in interface FloatingRateIndex
        Returns:
        the value of the property
      • getFixingCalendar

        public HolidayCalendarId getFixingCalendar()
        Gets the calendar that determines which dates are fixing dates.

        The fixing date is when the rate is determined.

        Specified by:
        getFixingCalendar in interface RateIndex
        Returns:
        the value of the property, not null
      • getFixingTime

        public LocalTime getFixingTime()
        Gets the fixing time.

        The rate is fixed at the fixing time of the fixing date.

        Returns:
        the value of the property, not null
      • getFixingZone

        public ZoneId getFixingZone()
        Gets the fixing time-zone.

        The time-zone of the fixing time.

        Returns:
        the value of the property, not null
      • getFixingDateOffset

        public DaysAdjustment getFixingDateOffset()
        Gets the adjustment applied to the effective date to obtain the fixing date.

        The fixing date is the date on which the index is to be observed. In most cases, the fixing date is 0 or 2 days before the effective date. This data structure allows the complex rules of some indices to be represented.

        Specified by:
        getFixingDateOffset in interface IborIndex
        Returns:
        the value of the property, not null
      • getEffectiveDateOffset

        public DaysAdjustment getEffectiveDateOffset()
        Gets the adjustment applied to the fixing date to obtain the effective date.

        The effective date is the start date of the indexed deposit. In most cases, the effective date is 0 or 2 days after the fixing date. This data structure allows the complex rules of some indices to be represented.

        Specified by:
        getEffectiveDateOffset in interface IborIndex
        Returns:
        the value of the property, not null
      • getMaturityDateOffset

        public TenorAdjustment getMaturityDateOffset()
        Gets the adjustment applied to the effective date to obtain the maturity date.

        The maturity date is the end date of the indexed deposit and is relative to the effective date. This data structure allows the complex rules of some indices to be represented.

        Specified by:
        getMaturityDateOffset in interface IborIndex
        Returns:
        the value of the property, not null
      • getDayCount

        public DayCount getDayCount()
        Gets the day count convention.
        Specified by:
        getDayCount in interface FloatingRateIndex
        Returns:
        the value of the property, not null
      • getDefaultFixedLegDayCount

        public DayCount getDefaultFixedLegDayCount()
        Gets the default day count convention for the associated fixed leg.

        A rate index is often paid against a fixed leg, such as in a vanilla Swap. The day count convention of the fixed leg often differs from that of the index, and the default is value is available here.

        Specified by:
        getDefaultFixedLegDayCount in interface FloatingRateIndex
        Returns:
        the value of the property, not null
      • toBuilder

        public ImmutableIborIndex.Builder toBuilder()
        Returns a builder that allows this bean to be mutated.
        Returns:
        the mutable builder, not null