java.lang.Object
net.finmath.time.daycount.DayCountConvention_ACT
net.finmath.time.daycount.DayCountConvention_ACT_ACT_ICMA
 All Implemented Interfaces:
Serializable
,DayCountConvention
Implementation of ACT/ACT ICMA.
Calculates the day count by calculating the actual number of days between startDate and endDate.
A fractional day is rounded to the approximately nearest day.
The day count fraction is calculated using ACT_ACT_ICMA convention, that is, the
day count fraction is n/(f*m), where
 n is the number of days between period start and the given day,
 m is the number of days between period start and period end,
 f is the number of periods within a year
net.finmath.time.Period
upon construction.
The class can be constructed using isCountLastDayNotFirst = true, which will change its behavior compared to above. In this case the start date is excluded in the counting and the end date is included in the counting. This means that from 31.12.2014 to 01.01.2015 the day count fraction is 1/365 since 2015 is not a leap year.
Note: The daycount methodDayCountConvention_ACT_ACT_ISDA
is a special case of this method
for frequency being one, having annual periods from January 1st to December 31st. Version:
 1.0
 Author:
 Christian Fries
 See Also:

Constructor Summary
ConstructorDescriptionDayCountConvention_ACT_ACT_ICMA
(ArrayList<Period> periods, int frequency) Create an ACT/ACT ICMA day count convention. 
Method Summary
Modifier and TypeMethodDescriptiondouble
getDaycountFraction
(LocalDate startDate, LocalDate endDate) Return the daycount fraction (year fraction) corresponding to the period from startDate to endDate given the specific daycount convention.Methods inherited from class net.finmath.time.daycount.DayCountConvention_ACT
daysBetween, getDaycount

Constructor Details

DayCountConvention_ACT_ACT_ICMA
Create an ACT/ACT ICMA day count convention. Parameters:
periods
 A sorted list of periods defining the periods. From the periods, only the period end dates are used as interval boundaries, except for the start date of the first interval, where the period start date is used.frequency
 The frequency, i.e., the number of periods which make up a year.


Method Details

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.
