Interface OvernightRateComputation

    • Method Detail

      • of

        static OvernightRateComputation of​(OvernightIndex index,
                                           java.time.LocalDate startDate,
                                           java.time.LocalDate endDate,
                                           int rateCutOffDays,
                                           OvernightAccrualMethod accrualMethod,
                                           ReferenceData referenceData)
        Obtains an instance.
        Parameters:
        index - the index
        startDate - the start date
        endDate - the end date
        rateCutOffDays - the rate cutoff days
        accrualMethod - the accrual method
        referenceData - the reference data
        Returns:
        the instance
      • 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

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

        java.time.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 java.time.LocalDate calculatePublicationFromFixing​(java.time.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 java.time.LocalDate calculateEffectiveFromFixing​(java.time.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 java.time.LocalDate calculateMaturityFromFixing​(java.time.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 java.time.LocalDate calculateFixingFromEffective​(java.time.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 java.time.LocalDate calculateMaturityFromEffective​(java.time.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​(java.time.LocalDate fixingDate)
        Creates an observation object for the specified fixing date.
        Parameters:
        fixingDate - the fixing date
        Returns:
        the index observation
      • collectIndices

        default void collectIndices​(com.google.common.collect.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