Interface OvernightIndex

  • All Superinterfaces:
    FloatingRateIndex, Index, Named, RateIndex
    All Known Implementing Classes:
    ImmutableOvernightIndex

    public interface OvernightIndex
    extends RateIndex, Named
    An Overnight index, such as Sonia or Eonia.

    An index represented by this class relates to lending over one night. The rate typically refers to "Today/Tomorrow" but might refer to "Tomorrow/Next".

    The index is defined by four dates. The fixing date is the date on which the index is to be observed. The publication date is the date on which the fixed rate is actually published. The effective date is the date on which the implied deposit starts. The maturity date is the date on which the implied deposit ends.

    The most common implementations are provided in OvernightIndices.

    All implementations of this interface must be immutable and thread-safe.

    • Method Detail

      • of

        static OvernightIndex of​(java.lang.String uniqueName)
        Obtains an instance from the specified unique name.
        Parameters:
        uniqueName - the unique name
        Returns:
        the index
        Throws:
        java.lang.IllegalArgumentException - if the name is not known
      • extendedEnum

        static ExtendedEnum<OvernightIndex> 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
      • getPublicationDateOffset

        int getPublicationDateOffset()
        Gets the number of days to add to the fixing date to obtain the publication date.

        In most cases, the fixing rate is available on the fixing date. In a few cases, publication of the fixing rate is delayed until the following business day. This property is zero if publication is on the fixing date, or one if it is the next day.

        Returns:
        the publication date offset
      • getEffectiveDateOffset

        int getEffectiveDateOffset()
        Gets the number of days to add to the fixing date to obtain the effective date.

        In most cases, the settlement date and start of the implied deposit is on the fixing date. In a few cases, the settlement date is the following business day. This property is zero if settlement is on the fixing date, or one if it is the next day. Maturity is always one business day after the settlement date.

        Returns:
        the effective date offset
      • calculatePublicationFromFixing

        java.time.LocalDate calculatePublicationFromFixing​(java.time.LocalDate fixingDate,
                                                           ReferenceData refData)
        Calculates the publication date from the fixing date.

        The fixing date is the date on which the index is to be observed. The publication date is the date on which the fixed rate is actually published.

        No error is thrown if the input date is not a valid fixing date. Instead, the fixing date is moved to the next valid fixing date and then processed.

        Parameters:
        fixingDate - the fixing date
        refData - the reference data, used to resolve the holiday calendar
        Returns:
        the publication date
      • calculateEffectiveFromFixing

        java.time.LocalDate calculateEffectiveFromFixing​(java.time.LocalDate fixingDate,
                                                         ReferenceData refData)
        Calculates the effective date from the fixing date.

        The fixing date is the date on which the index is to be observed. The effective date is the date on which the implied deposit starts.

        No error is thrown if the input date is not a valid fixing date. Instead, the fixing date is moved to the next valid fixing date and then processed.

        Parameters:
        fixingDate - the fixing date
        refData - the reference data, used to resolve the holiday calendar
        Returns:
        the effective date
      • calculateMaturityFromFixing

        java.time.LocalDate calculateMaturityFromFixing​(java.time.LocalDate fixingDate,
                                                        ReferenceData refData)
        Calculates the maturity date from the fixing date.

        The fixing date is the date on which the index is to be observed. The maturity date is the date on which the implied deposit ends.

        No error is thrown if the input date is not a valid fixing date. Instead, the fixing date is moved to the next valid fixing date and then processed.

        Parameters:
        fixingDate - the fixing date
        refData - the reference data, used to resolve the holiday calendar
        Returns:
        the maturity date
      • calculateFixingFromEffective

        java.time.LocalDate calculateFixingFromEffective​(java.time.LocalDate effectiveDate,
                                                         ReferenceData refData)
        Calculates the fixing date from the effective date.

        The fixing date is the date on which the index is to be observed. The effective date is the date on which the implied deposit starts.

        No error is thrown if the input date is not a valid effective date. Instead, the effective date is moved to the next valid effective date and then processed.

        Parameters:
        effectiveDate - the effective date
        refData - the reference data, used to resolve the holiday calendar
        Returns:
        the fixing date
      • calculateMaturityFromEffective

        java.time.LocalDate calculateMaturityFromEffective​(java.time.LocalDate effectiveDate,
                                                           ReferenceData refData)
        Calculates the maturity date from the effective date.

        The effective date is the date on which the implied deposit starts. The maturity date is the date on which the implied deposit ends.

        No error is thrown if the input date is not a valid effective date. Instead, the effective date is moved to the next valid effective date and then processed.

        Parameters:
        effectiveDate - the effective date
        refData - the reference data, used to resolve the holiday calendar
        Returns:
        the maturity date
      • getName

        java.lang.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