| A | B | C | D | E | F | G | H | I | J | K | L | M | N | |
| 2 | ||||||||||||||
| 3 | DiffY | |||||||||||||
| 4 | ||||||||||||||
| 5 | Category: | Date and Time Calculations | ||||||||||||
| 6 | Family: | Date Difference | ||||||||||||
| 7 | Arguments: | Date1, Date2, [DayCount], [Periods] | ||||||||||||
| 8 | Meaning: | Difference in Years | ||||||||||||
| 9 | Description: | Calculates the difference in years between two dates as Date2 - Date1 | ||||||||||||
| 10 | ||||||||||||||
| 11 | Date1 | 15 Jan 01 | 15 Jan 01 | 15 Nov 99 | 1 Apr 01 | 29 Feb 00 | ||||||||
| 12 | Date2 | 30 Mar 01 | 31 Mar 01 | 12 Jan 00 | 15 Jan 01 | 15 Jan 09 | ||||||||
| 13 | 74 | 75 | 58 | (76) | 3243 | |||||||||
| 14 | 0.1588 | |||||||||||||
| 15 | DiffY | DiffY | DiffY | DiffY | DiffY | |||||||||
| 16 | DCount | Function | Function | Function | Function | Function | ||||||||
| 17 | Actual Days/Actual Days In Month ('Decimal Year'). | 0.2083 | 0.2111 | 0.1583 | (0.2111) | 8.8750 | ||||||||
| 18 | ||||||||||||||
| 19 | 30/360 (PSA). | 0.2083 | 0.2111 | 0.1583 | (0.2111) | 8.8750 | ||||||||
| 20 | 1 | Actual/Actual (365 or 366). | 0.2027 | 0.2055 | 0.1588 | (0.2082) | 8.8772 | 8.8772 * | ||||||
| 21 | 2 | Actual Days/360. | 0.2056 | 0.2083 | 0.1611 | (0.2111) | 9.0083 | |||||||
| 22 | 3 | Actual Days/365. | 0.2027 | 0.2055 | 0.1589 | (0.2082) | 8.8849 | |||||||
| 23 | 4 | 30/360 (European). | 0.2083 | 0.2083 | 0.1583 | (0.2111) | 8.8778 | |||||||
| 24 | 5 | Actual Days/Actual Days In Month ('Decimal Year'). | 0.2070 | 0.2097 | 0.1573 | (0.2124) | 8.8738 | |||||||
| 25 | ||||||||||||||
| 26 | Check: First Principles: | |||||||||||||
| 27 | 30/360 (PSA). | 0.2083 | 0.2111 | 0.2111 | (0.2111) | |||||||||
| 28 | 1 | Actual/Actual (365 or 366). | 0.2027 | 0.2055 | 0.1589 | (0.2082) | ||||||||
| 29 | 2 | Actual Days/360. | 0.2056 | 0.2083 | 0.1611 | (0.2111) | ||||||||
| 30 | 3 | Actual Days/365. | 0.2027 | 0.2055 | 0.1589 | (0.2082) | ||||||||
| 31 | 4 | 30/360 (European). | 0.2083 | 0.2083 | 0.2111 | (0.2111) | ||||||||
| 32 | ||||||||||||||
| 33 | 5 | Actual Days/Actual Days In Month ('Decimal Year'). | 0.2070 | 0.2097 | 0.2124 | (0.2124) | ||||||||
| 34 | ||||||||||||||
| 35 | Excel's YEARFRAC function: | |||||||||||||
| 36 | 30/360 | 0.2083 | 0.2111 | 0.1583 | 0.2111 | 8.8750 | ||||||||
| 37 | 1 | ACT/ACT | 0.2027 | 0.2055 | 0.1589 | 0.2082 | 8.8776 | 8.8776 * | ||||||
| 38 | 2 | ACT/360 | 0.2056 | 0.2083 | 0.1611 | 0.2111 | 9.0083 | |||||||
| 39 | 3 | ACT/365 | 0.2027 | 0.2055 | 0.1589 | 0.2082 | 8.8849 | |||||||
| 40 | 4 | 30E/350 | 0.2083 | 0.2083 | 0.1583 | 0.2111 | 8.8778 | |||||||
| 41 | ||||||||||||||
| 42 | Note on Date Inclusivity: | |||||||||||||
| 43 | The Business Functions Library (and Excel's YEARFRAC) function include the Start date but Exclude the Finish Date. | |||||||||||||
| 44 | In other words, all these functions are not Date inclusive. | |||||||||||||
| 45 | ||||||||||||||
| 46 | ||||||||||||||
| 47 | * Note that BF and Excel use different methods where the time difference spans | |||||||||||||
| 48 | a leap year. Excel uses the average number of days in the years between the start year | |||||||||||||
| 49 | and end year, irrespective of where the start date and end date are. | |||||||||||||
| 50 | BF counts the number of whole years (in this case 8) and adds the fractional part in the | |||||||||||||
| 51 | 366-day year to that of the 365-day year, in accordance with bond calculation methodology | |||||||||||||
| 52 | (source: Krgin, Handbook of Global Fixed Income Calculations). | |||||||||||||
| 53 | In fact, the behavour of ACT/ACT for periods longer than a year is not standardised - bonds | |||||||||||||
| 54 | are only concerned with periods of less than a year. | |||||||||||||
| 55 | ||||||||||||||
| 56 | ||||||||||||||
| 57 | ||||||||||||||
| 58 | ||||||||||||||
| 59 | ||||||||||||||
| 60 | ||||||||||||||
| 61 | ||||||||||||||
| 62 | ||||||||||||||
| 63 | ||||||||||||||
| 64 | ||||||||||||||
| 65 | ||||||||||||||
| 66 | ||||||||||||||
| 67 | ||||||||||||||
| 68 | ||||||||||||||
| 69 | ||||||||||||||
| 70 | ||||||||||||||
| 71 | ||||||||||||||
| 72 | ||||||||||||||
| 73 | ||||||||||||||
| 74 | ||||||||||||||
| 75 | ||||||||||||||
| 76 | ||||||||||||||
| 77 | ||||||||||||||
| 78 | ||||||||||||||
| 79 | ||||||||||||||
| 80 | ||||||||||||||