Class OvernightAveragedDailyRateComputation

  • All Implemented Interfaces:
    OvernightRateComputation, RateComputation, java.io.Serializable, Bean, ImmutableBean

    public final class OvernightAveragedDailyRateComputation
    extends java.lang.Object
    implements OvernightRateComputation, ImmutableBean, java.io.Serializable
    Defines the computation of an averaged daily rate for a single Overnight index.

    An interest rate determined directly from an Overnight index by averaging the value of each day's rate over the period strictly between the start date and end date.

    The start date and end date can be non-business days. The average is taken on calendar days between the start and end dates.

    If a day in the period is not a business day on the fixing calendar of the Overnight index, the overnight rate fixed on the previous business day is used.

    For example, a rate determined averaging values from 'USD-FED-FUND'.

    See Also:
    Serialized Form
    • Method Detail

      • of

        public static OvernightAveragedDailyRateComputation of​(OvernightIndex index,
                                                               java.time.LocalDate startDate,
                                                               java.time.LocalDate endDate,
                                                               ReferenceData refData)
        Creates an instance from an index and accrual period dates

        The dates represent the accrual period.

        Parameters:
        index - the index
        startDate - the first date of the accrual period
        endDate - the last date of the accrual period
        refData - the reference data to use when resolving holiday calendars
        Returns:
        the rate computation
      • getIndex

        public OvernightIndex getIndex()
        Gets 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'.

        Specified by:
        getIndex in interface OvernightRateComputation
        Returns:
        the value of the property, not null
      • getStartDate

        public java.time.LocalDate getStartDate()
        Gets the start date of the accrual period.

        This is not necessarily a valid business day. In this case, the first fixing date is the previous business day of the start date on fixingCalendar.

        Specified by:
        getStartDate in interface OvernightRateComputation
        Returns:
        the value of the property, not null
      • getEndDate

        public java.time.LocalDate getEndDate()
        Gets the end date of the accrual period.

        This is not necessarily a valid business day. In this case, the last fixing date is the previous business day of the end date on fixingCalendar.

        Specified by:
        getEndDate in interface OvernightRateComputation
        Returns:
        the value of the property, not null
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object