public final class ImmutableFloatingRateName extends Object implements FloatingRateName, ImmutableBean, Serializable
This is the standard immutable implementation of FloatingRateName
.
Modifier and Type | Class and Description |
---|---|
static class |
ImmutableFloatingRateName.Meta
The meta-bean for
ImmutableFloatingRateName . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getExternalName()
Gets the external name, typically from FpML, such as 'GBP-LIBOR-BBA'.
|
OptionalInt |
getFixingDateOffsetDays()
Gets the fixing date offset, in days, optional.
|
String |
getIndexName()
Gets the root of the name of the index, such as 'GBP-LIBOR', to which the tenor is appended.
|
String |
getName()
Gets the name that uniquely identifies this index.
|
Set<Tenor> |
getTenors()
Gets the active tenors that are applicable for this floating rate.
|
FloatingRateType |
getType()
Gets the type of the index.
|
int |
hashCode() |
static ImmutableFloatingRateName.Meta |
meta()
The meta-bean for
ImmutableFloatingRateName . |
ImmutableFloatingRateName.Meta |
metaBean() |
FloatingRateName |
normalized()
Gets the normalized form of the floating rate name.
|
static ImmutableFloatingRateName |
of(String externalName,
String indexName,
FloatingRateType type)
Obtains an instance from the specified external name, index name and type.
|
static ImmutableFloatingRateName |
of(String externalName,
String indexName,
FloatingRateType type,
int fixingDateOffsetDays)
Obtains an instance from the specified external name, index name and type.
|
<R> Property<R> |
property(String propertyName) |
Set<String> |
propertyNames() |
IborIndex |
toIborIndex(Tenor tenor)
Checks and returns an Ibor index.
|
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 . |
String |
toString()
Returns the name of the index.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
defaultIborIndex, defaultOvernightIndex, extendedEnum, of
public static ImmutableFloatingRateName of(String externalName, String indexName, FloatingRateType type)
externalName
- the unique nameindexName
- the name of the indextype
- the type - Ibor, Overnight or PriceIllegalArgumentException
- if the name is not knownpublic static ImmutableFloatingRateName of(String externalName, String indexName, FloatingRateType type, int fixingDateOffsetDays)
externalName
- the unique nameindexName
- the name of the indextype
- the type - Ibor, Overnight or PricefixingDateOffsetDays
- the fixing date offset, in days, negative to use the standardIllegalArgumentException
- if the name is not knownpublic String getName()
FloatingRateName
This name is used in serialization and can be parsed using FloatingRateName.of(String)
.
It will be the external name, typically from FpML, such as 'GBP-LIBOR-BBA'.
getName
in interface FloatingRateName
getName
in interface Named
public Set<Tenor> getTenors()
FloatingRateName
Overnight and Price indices will return an empty set.
getTenors
in interface FloatingRateName
public FloatingRateName normalized()
FloatingRateName
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.
normalized
in interface FloatingRateName
public IborIndex toIborIndex(Tenor tenor)
FloatingRateName
If this name represents an Ibor index, then this method returns the matching IborIndex
.
If not, an exception is thrown.
toIborIndex
in interface FloatingRateName
tenor
- the tenor of the indexpublic DaysAdjustment toIborIndexFixingOffset()
FloatingRateName
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.
toIborIndexFixingOffset
in interface FloatingRateName
public OvernightIndex toOvernightIndex()
FloatingRateName
OvernightIndex
.
If this name represents an Overnight index, then this method returns the matching OvernightIndex
.
If not, an exception is thrown.
toOvernightIndex
in interface FloatingRateName
public PriceIndex toPriceIndex()
FloatingRateName
PriceIndex
.
If this name represents a price index, then this method returns the matching PriceIndex
.
If not, an exception is thrown.
toPriceIndex
in interface FloatingRateName
public String toString()
public static ImmutableFloatingRateName.Meta meta()
ImmutableFloatingRateName
.public ImmutableFloatingRateName.Meta metaBean()
public Set<String> propertyNames()
propertyNames
in interface Bean
public String getExternalName()
public String getIndexName()
IborIndex
or OvernightIndex
.
Typically, multiple FloatingRateName
names map to one Ibor or Overnight index.public FloatingRateType getType()
getType
in interface FloatingRateName
public OptionalInt getFixingDateOffsetDays()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.