Interface FloatingRateName

  • All Superinterfaces:
    FloatingRate, Named
    All Known Implementing Classes:
    ImmutableFloatingRateName

    public interface FloatingRateName
    extends FloatingRate, Named
    A floating rate index name, such as Libor, Euribor or US Fed Fund.

    An index represented by this class relates to some form of floating rate. This can include IborIndex and OvernightIndex values.

    This class is designed to match the FpML/ISDA floating rate index concept. The FpML concept provides a single key for floating rates of a variety of types, mixing Ibor, Overnight, Price and Swap indices. It also sometimes includes a source, such as 'Bloomberg' or 'Reuters'. This class matches the single concept and provided a bridge the more specific index implementations used for pricing.

    The most common implementations are provided in FloatingRateNames.

    The set of supported values, and their mapping to IborIndex, PriceIndex and OvernightIndex, is defined in the FloatingRateName.ini config file.

    • Method Detail

      • of

        static FloatingRateName of​(String uniqueName)
        Obtains an instance from the specified unique name.
        Parameters:
        uniqueName - the unique name
        Returns:
        the floating rate
        Throws:
        IllegalArgumentException - if the name is not known
      • extendedEnum

        static ExtendedEnum<FloatingRateName> extendedEnum()
        Gets the extended enum helper.

        This helper allows instances of the floating rate to be looked up. It also provides the complete set of available instances.

        Returns:
        the extended enum helper
      • defaultIborIndex

        static FloatingRateName defaultIborIndex​(Currency currency)
        Gets the default Ibor index for a currency.
        Parameters:
        currency - the currency to find the default for
        Returns:
        the floating rate
        Throws:
        IllegalArgumentException - if there is no default for the currency
      • defaultOvernightIndex

        static FloatingRateName defaultOvernightIndex​(Currency currency)
        Gets the default Overnight index for a currency.
        Parameters:
        currency - the currency to find the default for
        Returns:
        the floating rate
        Throws:
        IllegalArgumentException - if there is no default for the currency
      • getName

        String getName()
        Gets the name that uniquely identifies this floating rate, such as 'GBP-LIBOR'.

        This name is used in serialization and can be parsed using of(String).

        Specified by:
        getName in interface Named
        Returns:
        the external name
      • getType

        FloatingRateType getType()
        Gets the type of the index - Ibor, Overnight or Price.
        Returns:
        index type - Ibor, Overnight or Price
      • getCurrency

        default Currency getCurrency()
        Gets the currency of the floating rate.
        Specified by:
        getCurrency in interface FloatingRate
        Returns:
        the currency
        Throws:
        IllegalArgumentException - if unable to return an index, which should only happen if the system is not configured correctly
      • getTenors

        Set<Tenor> getTenors()
        Gets the active tenors that are applicable for this floating rate.

        Overnight and Price indices will return an empty set.

        Returns:
        the available tenors
      • getDefaultTenor

        default Tenor getDefaultTenor()
        Gets a default tenor applicable for this floating rate.

        This is useful for providing a basic default where errors need to be avoided. The value returned is not intended to be based on market conventions.

        Ibor floating rates will return 3M, or 13W if that is not available, otherwise the first entry from the set of tenors. Overnight floating rates will return 1D. All other floating rates will return return 1Y.

        Returns:
        the default tenor
      • normalized

        FloatingRateName normalized()
        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.

        Returns:
        the normalized name
      • toFloatingRateIndex

        default FloatingRateIndex toFloatingRateIndex()
        Returns a floating rate index.

        Returns a FloatingRateIndex for this rate name. Only Ibor, Overnight and Price indices are handled. If the rate name is an Ibor rate, the default tenor is used.

        Returns:
        the index
        Throws:
        IllegalArgumentException - if unable to return an index, which should only happen if the system is not configured correctly
      • toFloatingRateIndex

        default FloatingRateIndex toFloatingRateIndex​(Tenor iborTenor)
        Returns a floating rate index.

        Returns a FloatingRateIndex for this rate name. Only Ibor, Overnight and Price indices are handled. If the rate name is an Ibor rate, the specified tenor is used.

        Parameters:
        iborTenor - the tenor to use if this rate is Ibor
        Returns:
        the index
        Throws:
        IllegalArgumentException - if unable to return an index, which should only happen if the system is not configured correctly
      • toIborIndex

        IborIndex toIborIndex​(Tenor tenor)
        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.

        Parameters:
        tenor - the tenor of the index
        Returns:
        the index
        Throws:
        IllegalStateException - if the type is not an Ibor index type
      • toIborIndexFixingOffset

        default DaysAdjustment toIborIndexFixingOffset()
        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.

        Returns:
        the fixing offset applicable to the index
        Throws:
        IllegalStateException - if the type is not an Ibor index type
      • toPriceIndex

        PriceIndex toPriceIndex()
        Converts to an PriceIndex.

        If this name represents a price index, then this method returns the matching PriceIndex. If not, an exception is thrown.

        Returns:
        the index
        Throws:
        IllegalStateException - if the type is not a price index type