Interface SwapIndex
-
- All Known Implementing Classes:
ImmutableSwapIndex
public interface SwapIndex extends Index, Named
A swap index.Swap rates for different currencies are published by several providers. The indices can be related to IBOR-linked swaps or Overnight-linked swaps. Ref: https://quant.opengamma.io/Interest-Rate-Instruments-and-Market-Conventions.pdf
The most common implementations are provided in
SwapIndices
.All implementations of this interface must be immutable and thread-safe.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default ZonedDateTime
calculateFixingDateTime(LocalDate fixingDate)
Calculates the fixing date-time from the fixing date.static ExtendedEnum<SwapIndex>
extendedEnum()
Gets the extended enum helper.LocalTime
getFixingTime()
Gets the fixing time of the index.ZoneId
getFixingZone()
Gets the time-zone of the fixing time.String
getName()
Gets the name that uniquely identifies this index.FixedFloatSwapTemplate
getTemplate()
Gets the template for creating Fixed-Float swap.boolean
isActive()
Gets whether the index is active.static SwapIndex
of(String uniqueName)
Obtains an instance from the specified unique name.
-
-
-
Method Detail
-
of
static SwapIndex of(String uniqueName)
Obtains an instance from the specified unique name.- Parameters:
uniqueName
- the unique name- Returns:
- the index
- Throws:
IllegalArgumentException
- if the name is not known
-
extendedEnum
static ExtendedEnum<SwapIndex> extendedEnum()
Gets the extended enum helper.This helper allows instances of the index to be looked up. It also provides the complete set of available instances.
- Returns:
- the extended enum helper
-
isActive
boolean isActive()
Gets whether the index is active.Over time some indices become inactive and are no longer produced. If this occurs, this method will return false.
- Returns:
- true if the index is active, false if inactive
-
getFixingTime
LocalTime getFixingTime()
Gets the fixing time of the index.The fixing time is related to the fixing date and time-zone.
- Returns:
- the fixing time
-
getFixingZone
ZoneId getFixingZone()
Gets the time-zone of the fixing time.The fixing time-zone is related to the fixing date and time.
- Returns:
- the time-zone of the fixing time
-
getTemplate
FixedFloatSwapTemplate getTemplate()
Gets the template for creating Fixed-Float swap.- Returns:
- the template
-
calculateFixingDateTime
default ZonedDateTime calculateFixingDateTime(LocalDate fixingDate)
Calculates the fixing date-time from the fixing date.The fixing date is the date on which the index is to be observed. The result combines the date with the time and zone stored in the index.
No error is thrown if the input date is not a valid fixing date.
- Parameters:
fixingDate
- the fixing date- Returns:
- the fixing date-time
-
-