net.finmath.time.daycount
Class DayCountConvention_NL_365
- java.lang.Object
-
- net.finmath.time.daycount.DayCountConvention_NL_365
-
- All Implemented Interfaces:
- DayCountConventionInterface
public class DayCountConvention_NL_365 extends java.lang.Object implements DayCountConventionInterface
Implementation of NL/365. Calculates the day count by calculating the actual number of days between startDate (excluding) and endDate (including), excluding a leap day (February 29th) if present. The method is only exact, if the two calendar dates are (approximately) on the same time. A fractional day is rounded to the approximately nearest day (since daylight saving is not considered, the notion of nearest may be off by one hour). The day count fraction is calculated using NL/365 convention, that is, the day count is divided by 365.
-
-
Constructor Summary
Constructors Constructor and Description DayCountConvention_NL_365()Create an NL/365 day count convention.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublegetDaycount(java.util.Calendar startDate, java.util.Calendar endDate)Return the number of days between startDate and endDate given the specific daycount convention.doublegetDaycountFraction(java.util.Calendar startDate, java.util.Calendar endDate)Return the daycount fraction corresponding to the period from startDate to endDate given the specific daycount convention.
-
-
-
Constructor Detail
-
DayCountConvention_NL_365
public DayCountConvention_NL_365()
Create an NL/365 day count convention.
-
-
Method Detail
-
getDaycount
public double getDaycount(java.util.Calendar startDate, java.util.Calendar endDate)Description copied from interface:DayCountConventionInterfaceReturn the number of days between startDate and endDate given the specific daycount convention.- Specified by:
getDaycountin interfaceDayCountConventionInterface- Parameters:
startDate- The start date given as aCalendar.endDate- The end date given as aCalendar.- Returns:
- The number of days within the given period.
-
getDaycountFraction
public double getDaycountFraction(java.util.Calendar startDate, java.util.Calendar endDate)Description copied from interface:DayCountConventionInterfaceReturn the daycount fraction corresponding to the period from startDate to endDate given the specific daycount convention.- Specified by:
getDaycountFractionin interfaceDayCountConventionInterface- Parameters:
startDate- The start date given as aCalendar.endDate- The end date given as aCalendar.- Returns:
- The daycount fraction corresponding to the given period.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG