public interface FloatingRateName extends FloatingRate, Named
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.
| Modifier and Type | Method and 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.
|
String |
getName()
Gets the name that uniquely identifies this floating rate, such as 'GBP-LIBOR'.
|
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(String uniqueName)
Obtains an instance from the specified unique name.
|
static FloatingRateName |
parse(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()
Converts to an
OvernightIndex. |
PriceIndex |
toPriceIndex()
Converts to an
PriceIndex. |
static Optional<FloatingRateName> |
tryParse(String str)
Tries to parse a string, with extended handling of indices.
|
getFloatingRateNamestatic FloatingRateName of(String uniqueName)
uniqueName - the unique nameIllegalArgumentException - if the name is not knownstatic ExtendedEnum<FloatingRateName> extendedEnum()
This helper allows instances of the floating rate to be looked up. It also provides the complete set of available instances.
static FloatingRateName parse(String str)
This tries a number of ways to parse the input:
Note that if anIborIndex is parsed, the tenor will be lost.parse in interface FloatingRatestr - the string to parseIllegalArgumentException - if the name is not knownstatic Optional<FloatingRateName> tryParse(String str)
This tries a number of ways to parse the input:
Note that if anIborIndex is parsed, the tenor will be lost.tryParse in interface FloatingRatestr - the string to parsestatic FloatingRateName defaultIborIndex(Currency currency)
currency - the currency to find the default forIllegalArgumentException - if there is no default for the currencystatic FloatingRateName defaultOvernightIndex(Currency currency)
currency - the currency to find the default forIllegalArgumentException - if there is no default for the currencyString getName()
This name is used in serialization and can be parsed using of(String).
FloatingRateType getType()
default Currency getCurrency()
getCurrency in interface FloatingRateIllegalArgumentException - if unable to return an index, which should
only happen if the system is not configured correctlySet<Tenor> getTenors()
Overnight and Price indices will return an empty set.
default Tenor getDefaultTenor()
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.
FloatingRateName normalized()
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.
default FloatingRateIndex toFloatingRateIndex()
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.
IllegalArgumentException - if unable to return an index, which should
only happen if the system is not configured correctlydefault FloatingRateIndex toFloatingRateIndex(Tenor iborTenor)
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.
iborTenor - the tenor to use if this rate is IborIllegalArgumentException - if unable to return an index, which should
only happen if the system is not configured correctlyIborIndex toIborIndex(Tenor tenor)
If this name represents an Ibor index, then this method returns the matching IborIndex.
If not, an exception is thrown.
tenor - the tenor of the indexIllegalStateException - if the type is not an Ibor index typedefault DaysAdjustment toIborIndexFixingOffset()
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.
IllegalStateException - if the type is not an Ibor index typeOvernightIndex toOvernightIndex()
OvernightIndex.
If this name represents an Overnight index, then this method returns the matching OvernightIndex.
If not, an exception is thrown.
IllegalStateException - if the type is not an Overnight index typePriceIndex toPriceIndex()
PriceIndex.
If this name represents a price index, then this method returns the matching PriceIndex.
If not, an exception is thrown.
IllegalStateException - if the type is not a price index typeCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.