Interface DayCountConvention

All Known Implementing Classes:
DayCountConvention_30E_360, DayCountConvention_30E_360_ISDA, DayCountConvention_30U_360, DayCountConvention_ACT, DayCountConvention_ACT_360, DayCountConvention_ACT_365, DayCountConvention_ACT_365A, DayCountConvention_ACT_365L, DayCountConvention_ACT_ACT_AFB, DayCountConvention_ACT_ACT_ICMA, DayCountConvention_ACT_ACT_ISDA, DayCountConvention_ACT_ACT_YEARFRAC, DayCountConvention_NL_365, DayCountConvention_NONE, DayCountConvention_UNKNOWN

public interface DayCountConvention
Interface for various day count conventions. Classes implementing this interface have to implement the methods getDaycount(LocalDate, LocalDate) and getDaycountFraction(LocalDate, LocalDate). Classes implementing these methods then provide day counting and day count fractions for a given interval.
Version:
1.0
Author:
Christian Fries
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    getDaycount(LocalDate startDate, LocalDate endDate)
    Return the number of days between startDate and endDate given the specific daycount convention.
    double
    Return the daycount fraction (year fraction) corresponding to the period from startDate to endDate given the specific daycount convention.
  • Method Details

    • getDaycount

      double getDaycount(LocalDate startDate, LocalDate endDate)
      Return the number of days between startDate and endDate given the specific daycount convention.
      Parameters:
      startDate - The start date given as a LocalDate.
      endDate - The end date given as a LocalDate.
      Returns:
      The number of days within the given period.
    • getDaycountFraction

      double getDaycountFraction(LocalDate startDate, LocalDate endDate)
      Return the daycount fraction (year fraction) corresponding to the period from startDate to endDate given the specific daycount convention.
      Parameters:
      startDate - The start date given as a LocalDate.
      endDate - The end date given as a LocalDate.
      Returns:
      The daycount year fraction corresponding to the given period.