public class DayCountConvention_30E_360 extends Object implements DayCountConvention, Serializable
(endDateYear - startDateYear) * 360.0 + (endDateMonth - startDateMonth) * 30.0 + (Math.min(endDateDay, 30.0) - Math.min(startDateDay, 30.0))
This day count convention is sometime called Eurobond basis or 30/360 ISMA.
For 30E/360 we have that:
getDaycount corresponds to the implementation of the "European method" of Excel function DAYS360, i.e., DAYS360(startDate,endDate,TRUE).
getDaycountFraction corresponds to the implementation of the "30E/360 method" of Excel function YEARFRAC, i.e., YEARFRAC(startDate,endDate,4).
| Constructor and Description |
|---|
DayCountConvention_30E_360()
Create a 30E/360 daycount convention.
|
DayCountConvention_30E_360(boolean is30Eplus360)
Create a 30E/360 or 30E+/360 day count convention.
|
| Modifier and Type | Method and Description |
|---|---|
double |
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 corresponding to the period from startDate to endDate given the
specific daycount convention.
|
public DayCountConvention_30E_360(boolean is30Eplus360)
is30Eplus360 - If true, then 30E+/360 is constructed, otherwise 30E/360 is constructed.public DayCountConvention_30E_360()
public double getDaycount(LocalDate startDate, LocalDate endDate)
DayCountConventiongetDaycount in interface DayCountConventionstartDate - The start date given as a LocalDate.endDate - The end date given as a LocalDate.public double getDaycountFraction(LocalDate startDate, LocalDate endDate)
DayCountConventiongetDaycountFraction in interface DayCountConventionstartDate - The start date given as a LocalDate.endDate - The end date given as a LocalDate.Copyright © 2019. All rights reserved.