java.lang.Object
net.finmath.time.daycount.DayCountConvention_NONE
- All Implemented Interfaces:
Serializable
,DayCountConvention
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:
- Serialized Form
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a day count convention with a constant year fraction of 1.0 for all periods. -
Method Summary
Modifier and TypeMethodDescriptiondouble
getDaycount(LocalDate startDate, LocalDate endDate)
Return the number of days between startDate and endDate given the specific daycount convention.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.
-
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
Description copied from interface:DayCountConvention
Return the number of days between startDate and endDate given the specific daycount convention.- Specified by:
getDaycount
in 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
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 interfaceDayCountConvention
- Parameters:
startDate
- The start date given as aLocalDate
.endDate
- The end date given as aLocalDate
.- Returns:
- The daycount year fraction corresponding to the given period.
-