Interface SwapIndex

  • All Superinterfaces:
    Index, Named
    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 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
      • getName

        String getName()
        Gets the name that uniquely identifies this index.

        This name is used in serialization and can be parsed using of(String).

        Specified by:
        getName in interface Index
        Specified by:
        getName in interface Named
        Returns:
        the unique name