## Interface FloatingRateName

• All Superinterfaces:
Named
All Known Implementing Classes:
ImmutableFloatingRateName

public interface FloatingRateName
extends 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 Summary

All Methods
Modifier and Type Method Description
static FloatingRateName defaultIborIndex​(Currency currency)
Gets the default Ibor index for a currency.
static FloatingRateName defaultOvernightIndex​(Currency currency)
Gets the default Overnight index for a currency.
static ExtendedEnum<FloatingRateName> extendedEnum()
Gets the extended enum helper.
default Currency getCurrency()
Gets the currency of the floating rate.
default Tenor getDefaultTenor()
Gets a default tenor applicable for this floating rate.
java.lang.String getName()
Gets the name that uniquely identifies this floating rate.
java.util.Set<Tenor> getTenors()
Gets the active tenors that are applicable for this floating rate.
FloatingRateType getType()
Gets the type of the index - Ibor, Overnight or Price.
FloatingRateName normalized()
Gets the normalized form of the floating rate name.
static FloatingRateName of​(java.lang.String uniqueName)
Obtains an instance from the specified unique name.
static FloatingRateName parse​(java.lang.String str)
Parses a string, with extended handling of indices.
default FloatingRateIndex toFloatingRateIndex()
Returns a floating rate index.
default FloatingRateIndex toFloatingRateIndex​(Tenor iborTenor)
Returns a floating rate index.
IborIndex toIborIndex​(Tenor tenor)
Checks and returns an Ibor index.
default DaysAdjustment toIborIndexFixingOffset()
Checks and returns the fixing offset associated with the Ibor index.
OvernightIndex toOvernightIndex()
PriceIndex toPriceIndex()
Converts to an PriceIndex.
static java.util.Optional<FloatingRateName> tryParse​(java.lang.String str)
Tries to parse a string, with extended handling of indices.
• ### Method Detail

• #### of

static FloatingRateName of​(java.lang.String uniqueName)
Obtains an instance from the specified unique name.
Parameters:
uniqueName - the unique name
Returns:
the floating rate
Throws:
java.lang.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
• #### parse

static FloatingRateName parse​(java.lang.String str)
Parses a string, with extended handling of indices.

This tries a number of ways to parse the input:

Note that if an IborIndex is parsed, the tenor will be lost.
Parameters:
str - the string to parse
Returns:
the floating rate
Throws:
java.lang.IllegalArgumentException - if the name is not known
• #### tryParse

static java.util.Optional<FloatingRateName> tryParse​(java.lang.String str)
Tries to parse a string, with extended handling of indices.

This tries a number of ways to parse the input:

Note that if an IborIndex is parsed, the tenor will be lost.
Parameters:
str - the string to parse
Returns:
• #### 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:
java.lang.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:
java.lang.IllegalArgumentException - if there is no default for the currency
• #### getName

java.lang.String getName()
Gets the name that uniquely identifies this floating rate.

This name is used in serialization and can be parsed using of(String). It will be the external name, typically from FpML, such as 'GBP-LIBOR-BBA'.

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.
Returns:
the currency
Throws:
java.lang.IllegalArgumentException - if unable to return an index, which should only happen if the system is not configured correctly
• #### getTenors

java.util.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.IllegalStateException - if the type is not an Ibor index type
• #### toOvernightIndex

OvernightIndex toOvernightIndex()
Converts to an OvernightIndex.

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

Returns:
the index
Throws:
java.lang.IllegalStateException - if the type is not an Overnight 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:
java.lang.IllegalStateException - if the type is not a price index type