public class DayCountConvention_30E_360_ISDA extends Object implements DayCountConventionInterface
(endDateYear - startDateYear) * 360.0 + (endDateMonth - startDateMonth) * 30.0 + (Math.min(endDateDay,30) - Math.min(startDateDay, 30.0));
where for endDateDay is the to 30, if endDate is not the termination date and the last day of February.
The constructor offers a boolean to decide if endDate is treated as a termination date or not.
A termination date is the endDate of the last period in a schedule.| Constructor and Description |
|---|
DayCountConvention_30E_360_ISDA()
Create a 30E/360 ISDA daycount convention using
isTreatEndDateAsTerminationDate = false. |
DayCountConvention_30E_360_ISDA(boolean isTreatEndDateAsTerminationDate)
Create a 30E/360 ISDA daycount convention.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getDaycount(java.time.LocalDate startDate,
java.time.LocalDate endDate)
Return the number of days between startDate and endDate given the
specific daycount convention.
|
double |
getDaycountFraction(java.time.LocalDate startDate,
java.time.LocalDate endDate)
Return the daycount fraction corresponding to the period from startDate to endDate given the
specific daycount convention.
|
public DayCountConvention_30E_360_ISDA(boolean isTreatEndDateAsTerminationDate)
isTreatEndDateAsTerminationDate - If true, the end date is treated as a termination date and that case the last day of february is not treated as 30.public DayCountConvention_30E_360_ISDA()
isTreatEndDateAsTerminationDate = false.public double getDaycount(java.time.LocalDate startDate,
java.time.LocalDate endDate)
DayCountConventionInterfacegetDaycount in interface DayCountConventionInterfacestartDate - The start date given as a LocalDate.endDate - The end date given as a LocalDate.public double getDaycountFraction(java.time.LocalDate startDate,
java.time.LocalDate endDate)
DayCountConventionInterfacegetDaycountFraction in interface DayCountConventionInterfacestartDate - The start date given as a LocalDate.endDate - The end date given as a LocalDate.Copyright © 2017. All rights reserved.