net.finmath.time.daycount
Class DayCountConvention_NONE
- java.lang.Object
-
- net.finmath.time.daycount.DayCountConvention_NONE
-
- All Implemented Interfaces:
- DayCountConventionInterface
public class DayCountConvention_NONE extends java.lang.Object implements DayCountConventionInterface
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 implementingDayCountConventionInterface.
-
-
Constructor Summary
Constructors Constructor and 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 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_NONE
public DayCountConvention_NONE()
Create a day count convention with a constant year fraction of 1.0 for all periods.
-
-
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