public interface FloatingRateIndex extends Index, FloatingRate
See IborIndex
, OvernightIndex
and PriceIndex
for more details.
All implementations of this interface must be immutable and thread-safe.
Modifier and Type | Method and Description |
---|---|
Currency |
getCurrency()
Gets the currency of the index.
|
DayCount |
getDayCount()
Gets the day count convention of the index.
|
default DayCount |
getDefaultFixedLegDayCount()
Gets the default day count convention for the associated fixed leg.
|
FloatingRateName |
getFloatingRateName()
Gets the floating rate name for this index.
|
String |
getName()
Gets the name that uniquely identifies this index.
|
boolean |
isActive()
Gets whether the index is active.
|
static FloatingRateIndex |
of(String uniqueName)
Obtains an instance from the specified unique name.
|
static FloatingRateIndex |
parse(String indexStr)
Parses a string, handling different types of index.
|
static FloatingRateIndex |
parse(String indexStr,
Tenor defaultIborTenor)
Parses a string, handling different types of index, optionally specifying a tenor for Ibor.
|
static Optional<FloatingRateIndex> |
tryParse(String indexStr)
Parses a string, handling different types of index.
|
static Optional<FloatingRateIndex> |
tryParse(String indexStr,
Tenor defaultIborTenor)
Parses a string, handling different types of index, optionally specifying a tenor for Ibor.
|
static FloatingRateIndex parse(String indexStr)
This tries a number of ways to parse the input:
IfFloatingRateName
is used to match an Ibor index, then a tenor is needed
to return an index. The tenor from FloatingRateName.getDefaultTenor()
will be used.parse
in interface FloatingRate
indexStr
- the index string to parseIllegalArgumentException
- if the name is not knownstatic FloatingRateIndex parse(String indexStr, Tenor defaultIborTenor)
This tries a number of ways to parse the input:
IfFloatingRateName
is used to match an Ibor index, then a tenor is needed
to return an index. The tenor can optionally be supplied. If needed and missing,
the result of FloatingRateName.getDefaultTenor()
will be used.indexStr
- the index string to parsedefaultIborTenor
- the tenor to use for Ibor if matched as a FloatingRateName
, may be nullIllegalArgumentException
- if the name is not knownstatic Optional<FloatingRateIndex> tryParse(String indexStr)
This tries a number of ways to parse the input:
IfFloatingRateName
is used to match an Ibor index, then a tenor is needed
to return an index. The tenor from FloatingRateName.getDefaultTenor()
will be used.tryParse
in interface FloatingRate
indexStr
- the index string to parsestatic Optional<FloatingRateIndex> tryParse(String indexStr, Tenor defaultIborTenor)
This tries a number of ways to parse the input:
IfFloatingRateName
is used to match an Ibor index, then a tenor is needed
to return an index. The tenor can optionally be supplied. If needed and missing,
the result of FloatingRateName.getDefaultTenor()
will be used.indexStr
- the index string to parsedefaultIborTenor
- the tenor to use for Ibor if matched as a FloatingRateName
, may be nullstatic FloatingRateIndex of(String uniqueName)
This parses names from IborIndex
, OvernightIndex
and PriceIndex
.
of
in interface Index
uniqueName
- the unique nameIllegalArgumentException
- if the name is not knownString getName()
This name is used in serialization and can be parsed using of(String)
.
Currency getCurrency()
getCurrency
in interface FloatingRate
boolean isActive()
Over time some indices become inactive and are no longer produced. If this occurs, this method will return false.
DayCount getDayCount()
FloatingRateName getFloatingRateName()
For an Ibor index, the FloatingRateName
does not include the tenor.
It can be used to find the other tenors available for this index.
getFloatingRateName
in interface FloatingRate
default DayCount getDefaultFixedLegDayCount()
A rate index is often paid against a fixed leg, such as in a vanilla Swap. The day count convention of the fixed leg often differs from that of the index, and the default is value is available here.
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.