This calculates the years between two dates using the 30/360 (EU) day basis convention. This convention assumes that months consists of 30 days and years consist of 360 calendar days. This is also known as the 30/360 ICMA, Eurobond (ISDA 2006) and Special German basis.
thirty_360_eu(date1, date2)
A date-time object
A date-time object
a numeric value representing the number of years between
date1
and date2
.
The day count is determined after making the following (ordered) modifications:
If the start date is the 31st, set the start date to the 30th
If the end date is 31st, set the end date to the 30th
The year fraction is then calculated as: $$\frac{(d_2-d_1) + (m_2-m_1)\times 30 + (y_2-y_1)\times 360}{360}$$
The order of date1
and date2
is not important. If date1
is less than date2
then the result will be non-negative. Otherwise,
the result will be negative.
Other counter methods: actual_360
,
actual_365
,
actual_actual_isda
,
is_valid_day_basis
,
thirty_360_eu_isda
,
thirty_360_eu_plus
,
thirty_360_us
, thirty_360
,
year_frac