Class ImmutableFloatingRateName

    • Method Detail

      • of

        public static ImmutableFloatingRateName of​(String externalName,
                                                   String indexName,
                                                   FloatingRateType type)
        Obtains an instance from the specified external name, index name and type.
        Parameters:
        externalName - the unique name
        indexName - the name of the index
        type - the type - Ibor, Overnight or Price
        Returns:
        the name
        Throws:
        IllegalArgumentException - if the name is not known
      • of

        public static ImmutableFloatingRateName of​(String externalName,
                                                   String indexName,
                                                   FloatingRateType type,
                                                   int fixingDateOffsetDays)
        Obtains an instance from the specified external name, index name and type.
        Parameters:
        externalName - the unique name
        indexName - the name of the index
        type - the type - Ibor, Overnight or Price
        fixingDateOffsetDays - the fixing date offset, in days, negative to use the standard
        Returns:
        the name
        Throws:
        IllegalArgumentException - if the name is not known
      • getTenors

        public Set<Tenor> getTenors()
        Description copied from interface: FloatingRateName
        Gets the active tenors that are applicable for this floating rate.

        Overnight and Price indices will return an empty set.

        Specified by:
        getTenors in interface FloatingRateName
        Returns:
        the available tenors
      • normalized

        public FloatingRateName normalized()
        Description copied from interface: FloatingRateName
        Gets the normalized form of the floating rate name.

        The normalized for is the name that Strata uses for the index. For example, the normalized form of 'GBP-LIBOR-BBA' is 'GBP-LIBOR', and the normalized form of 'EUR-EURIBOR-Reuters' is 'EUR-EURIBOR'. Note that for Ibor indices, the tenor is not present.

        Specified by:
        normalized in interface FloatingRateName
        Returns:
        the normalized name
      • toIborIndex

        public IborIndex toIborIndex​(Tenor tenor)
        Description copied from interface: FloatingRateName
        Checks and returns an Ibor index.

        If this name represents an Ibor index, then this method returns the matching IborIndex. If not, an exception is thrown.

        Specified by:
        toIborIndex in interface FloatingRateName
        Parameters:
        tenor - the tenor of the index
        Returns:
        the index
      • toIborIndexFixingOffset

        public DaysAdjustment toIborIndexFixingOffset()
        Description copied from interface: FloatingRateName
        Checks and returns the fixing offset associated with the Ibor index.

        If this name represents an Ibor index, then this method returns the associated fixing offset. If not, an exception is thrown.

        This method exists primarily to handle DKK CIBOR, where there are two floating rate names but only one underlying index. The CIBOR index itself has a convention where the fixing date is 2 days before the reset date and the effective date is 2 days after the fixing date, matching the name "DKK-CIBOR2-DKNA13". The alternative name, "DKK-CIBOR-DKNA13", has the fixing date equal to the reset date, but with the effective date two days later.

        Specified by:
        toIborIndexFixingOffset in interface FloatingRateName
        Returns:
        the fixing offset applicable to the index
      • 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
      • getExternalName

        public String getExternalName()
        Gets the external name, typically from FpML, such as 'GBP-LIBOR-BBA'.
        Returns:
        the value of the property, not empty
      • getIndexName

        public String getIndexName()
        Gets the root of the name of the index, such as 'GBP-LIBOR', to which the tenor is appended. This name matches that used by IborIndex or OvernightIndex. Typically, multiple FloatingRateName names map to one Ibor or Overnight index.
        Returns:
        the value of the property, not empty
      • getFixingDateOffsetDays

        public OptionalInt getFixingDateOffsetDays()
        Gets the fixing date offset, in days, optional. This is used when a floating rate name implies a non-standard fixing date offset. This is only used for Ibor Indices, and currently only for DKK CIBOR.
        Returns:
        the optional value of the property, not null