Interface OvernightRateComputation

    • Method Detail

      • getIndex

        OvernightIndex getIndex()
        Obtains the Overnight index.

        The rate to be paid is based on this index. It will be a well known market index such as 'GBP-SONIA'.

        Returns:
        the overnight index
      • getFixingCalendar

        HolidayCalendar getFixingCalendar()
        Obtains the resolved calendar that the index uses.
        Returns:
        the fixing calendar
      • getStartDate

        LocalDate getStartDate()
        Obtains the fixing date associated with the start date of the accrual period.

        This is also the first fixing date. The overnight rate is observed from this date onwards.

        In general, the fixing dates and accrual dates are the same for an overnight index. However, in the case of a Tomorrow/Next index, the fixing period is one business day before the accrual period.

        Returns:
        the start date
      • getEndDate

        LocalDate getEndDate()
        Obtains the fixing date associated with the end date of the accrual period.

        The overnight rate is observed until this date.

        In general, the fixing dates and accrual dates are the same for an overnight index. However, in the case of a Tomorrow/Next index, the fixing period is one business day before the accrual period.

        Returns:
        the end date
      • calculatePublicationFromFixing

        default LocalDate calculatePublicationFromFixing​(LocalDate fixingDate)
        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
        Returns:
        the publication date
      • calculateEffectiveFromFixing

        default LocalDate calculateEffectiveFromFixing​(LocalDate fixingDate)
        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
        Returns:
        the effective date
      • calculateMaturityFromFixing

        default LocalDate calculateMaturityFromFixing​(LocalDate fixingDate)
        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
        Returns:
        the maturity date
      • calculateFixingFromEffective

        default LocalDate calculateFixingFromEffective​(LocalDate effectiveDate)
        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
        Returns:
        the fixing date
      • calculateMaturityFromEffective

        default LocalDate calculateMaturityFromEffective​(LocalDate effectiveDate)
        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
        Returns:
        the maturity date
      • observeOn

        default OvernightIndexObservation observeOn​(LocalDate fixingDate)
        Creates an observation object for the specified fixing date.
        Parameters:
        fixingDate - the fixing date
        Returns:
        the index observation
      • collectIndices

        default void collectIndices​(ImmutableSet.Builder<Index> builder)
        Description copied from interface: RateComputation
        Collects all the indices referred to by this computation.

        A computation will typically refer to one index, such as 'GBP-LIBOR-3M'. Each index that is referred to must be added to the specified builder.

        Specified by:
        collectIndices in interface RateComputation
        Parameters:
        builder - the builder to use