Class DayCountConvention_NONE

java.lang.Object
net.finmath.time.daycount.DayCountConvention_NONE
All Implemented Interfaces:
Serializable, DayCountConvention

public class DayCountConvention_NONE extends Object implements DayCountConvention, Serializable
This is a special day count convention, where the day count between two dates is always 0.0 and the year fraction for an interval is always 1.0. The latter property is probably the relevant property: you may use this day count convention if a coupon period pays the coupon without applying a year fraction of the accrual period, but the implementation requires an object implementing DayCountConvention.
Version:
1.0
Author:
Christian Fries
See Also:
  • Constructor Details

    • DayCountConvention_NONE

      public DayCountConvention_NONE()
      Create a day count convention with a constant year fraction of 1.0 for all periods.
  • 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.
    • getDaycountFraction

      public double getDaycountFraction(LocalDate startDate, LocalDate endDate)
      Description copied from interface: DayCountConvention
      Return the daycount fraction (year fraction) corresponding to the period from startDate to endDate given the specific daycount convention.
      Specified by:
      getDaycountFraction in interface DayCountConvention
      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.