- 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 implementingDayCountConvention.- Version:
- 1.0
- Author:
- Christian Fries
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DayCountConvention_NONE()Create a day count convention with a constant year fraction of 1.0 for all periods.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetDaycount(LocalDate startDate, LocalDate endDate)Return the number of days between startDate and endDate given the specific daycount convention.doublegetDaycountFraction(LocalDate startDate, LocalDate endDate)Return the daycount fraction corresponding to the period from startDate to endDate given the specific daycount convention.
-
-
-
Method Detail
-
getDaycount
public double getDaycount(LocalDate startDate, LocalDate endDate)
Description copied from interface:DayCountConventionReturn the number of days between startDate and endDate given the specific daycount convention.- Specified by:
getDaycountin interfaceDayCountConvention- Parameters:
startDate- The start date given as aLocalDate.endDate- The end date given as aLocalDate.- Returns:
- The number of days within the given period.
-
getDaycountFraction
public double getDaycountFraction(LocalDate startDate, LocalDate endDate)
Description copied from interface:DayCountConventionReturn the daycount fraction corresponding to the period from startDate to endDate given the specific daycount convention.- Specified by:
getDaycountFractionin interfaceDayCountConvention- Parameters:
startDate- The start date given as aLocalDate.endDate- The end date given as aLocalDate.- Returns:
- The daycount fraction corresponding to the given period.
-
-