Class DayCountConvention_ACT

java.lang.Object
net.finmath.time.daycount.DayCountConvention_ACT
All Implemented Interfaces:
DayCountConvention
Direct Known Subclasses:
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

public abstract class DayCountConvention_ACT extends Object implements DayCountConvention
Base class which calculates the day count by calculating the actual number of days between startDate and endDate. A fractional day is rounded to the approximately nearest day.
Version:
1.0
Author:
Christian Fries
  • Constructor Details

    • DayCountConvention_ACT

      public DayCountConvention_ACT()
      Create an ACT day count convention.
  • Method Details

    • getDaycount

      public double getDaycount(LocalDate startDate, LocalDate endDate)
      Description copied from interface: DayCountConvention
      Return the number of days between startDate and endDate given the specific daycount convention.
      Specified by:
      getDaycount in interface DayCountConvention
      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.
    • daysBetween

      public static double daysBetween(LocalDate startDate, LocalDate endDate)
      Returns the number of days, between two dates. A fractional day is rounded to the approximately nearest day. The formula implemented is (endDate.toEpochDay() - startDate.toEpochDay());
      Parameters:
      startDate - The start date of the interval.
      endDate - The end date of the interval.
      Returns:
      Number of days between startDate and endDate.