Day count conventions
A day count convention says how much of a year one day of interest is worth. It is the divisor in the accrual. It is also the difference between two banks quoting “10%” and charging different money.
LedgerTM follows the ISO 20022 InterestComputationMethod external code set. A tenant adds a convention as a settings row over the closed numerator × denominator axes, so a new convention is configuration and not a code change.
The conventions we support
| Name in settings | ISO 20022 | Days in year | Days in period |
|---|---|---|---|
Actual365 |
A005 | 365 | Actual calendar days |
Actual360 |
A004 | 360 | Actual calendar days |
ActualActual |
A008 | 365, or 366 in a leap year | Actual calendar days |
ThirtyThreeSixty |
A001 | 360 | Every month counts 30 |
ThirtyE360 |
A007 | 360 | Every month counts 30, European rule |
Worked example
Take 100,000 of principal at a fixed rate of 10%, and accrue one day. These are
the numbers DayCountConventionTests.accrual_uses_correct_days_in_year_for_convention
asserts, rounded to four places away from zero.
| Convention | Divisor | One day of interest |
|---|---|---|
Actual365 |
365 | 27.3973 |
Actual360 |
360 | 27.7778 |
ThirtyThreeSixty |
360 | 27.7778 |
Act/360 charges more per day than Act/365 at the same rate, because the year is shorter. Over a full 365-day year that is 10,138.89 against 10,000.00 — 138.89 more on every 100,000 lent.
ActualActual divides by the length of the year the day falls in, so one account
accrues on 366 in 2024 and on 365 in 2023. That is asserted by
ValueDatedDayCountTests.ActualActual_divides_by_the_length_of_the_year_the_day_falls_in.
Where we deviate: 30/360 inside February
Under 30/360 every month is 30 days long, so an engine must decide where the calendar’s shortfall lands. LedgerTM skips the 31st and catches up two or three days on 28 or 29 February.
Totals match A001 Bond Basis over any full month or any full year. Accrued-to-date
inside February differs from ISDA 30/360. This reproduces the legacy engine
deliberately, and it is recorded in the standards register under “30/360
accrued-to-date (vs A001 Bond Basis)”. ThirtyE360 (A007) carries no deviation.
Changing an account’s convention
The convention is a value-dated property. An account that switches mid-life prices each day on the convention in force on that day, and a replay reprices it the same way. See value dating.