Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Day-Count Convention

Debt instruments use a day-count convention to calculate the amount of accrued interest when the next interest payment is less than a full interest period away.

The D-ASA MUST specify one day-count convention \( [IPCD] \).

The day-count convention MUST be identified with one of the following enumerated IDs (uint8):

IDNameACTUSDescription
0Actual/Actual\([AA]\)Year fractions accrue on the basis of the actual number of days per month and per year in the respective period
1Actual/360\([A360]\)Year fractions accrue on the basis of the actual number of days per month and 360 days per year in the respective period
2Actual/365\([A365]\)Year fractions accrue on the basis of the actual number of days per month and 365 days per year in the respective period
330/360 ISDA\([30E360ISDA]\)Year fractions accrue on the basis of 30 days per month and 360 days per year in the respective period (ISDA method)
430/360\([30E360]\)Year fractions accrue on the basis of 30 days per month and 360 days per year in the respective period
528/366\([28E366]\)Year fractions accrue on the basis of 28 days per month and 366 days per year in the respective period

Calendar

Calendars define the non-working days which may affect the dates of traditional debt instruments.

The AVM (so the D-ASA) time has no notion of calendars. Conversion of serial UNIX timestamps into a year/month/day triple1 (and vice versa) can be performed by external Algorand Applications2 or client side (normalization).

The D-ASA MAY specify a calendar \( [CLDR] \).

The calendar MUST be identified with one of the following enumerated IDs:

IDNameACTUSDescription
0No Calendar\([NC]\)No holidays defined (default if not specified)
1Monday to Friday\([MF]\)Saturdays and Sundays are holidays

Business Day Convention

Debt instruments cash flows execution may be stopped on non-working days (according to a calendar).

The business day convention defines how D-ASA execution can be shifted to the next business day (following) or the previous on (preceding).

The D-ASA MAY specify a business day convention \( [BDC] \).

IDNameACTUSDescription
0No Shift\([NOS]\)No shift applied to non-business days
1Shift-Calculate Following\([SCF]\)Shift event dates first then calculate accruals etc. Strictly shift to the next following business day
2Shift-Calculate Modified-Following\([SCMF]\)Shift event dates first then calculate accruals etc. Shift to the next following business day if this falls in the same month. Shift to the most recent preceding business day otherwise
3Calculate-Shift Following\([CSF]\)Calculate accruals etc. first then shift event dates. Strictly shift to the next following business day
4Calculate-Shift Modified-Following\([CSMF]\)Calculate accruals etc. first then shift event dates. Shift to the next following business day if this falls in the same month. Shift to the most recent preceding business day otherwise
5Shift-Calculate Preceding\([SCP]\)Shift event dates first then calculate accruals etc. Strictly shift to the most recent preceding business day
6Shift-Calculate Modified-Preceding\([SCMP]\)Shift event dates first then calculate accruals etc. Shift to the most recent preceding business day if this falls in the same month. Shift to the next following business day otherwise
7Calculate-Shift Preceding\([CSP]\)Calculate accruals etc. first then shift event dates. Strictly shift to the most recent preceding business day
8Calculate-Shift Modified-Preceding\([CSMP]\)Calculate accruals etc. first then shift event dates. Shift to the most recent preceding business day if this falls in the same month. Shift to the next following business day otherwise

End of Month Convention

Debt instruments may define due dates as the last day of the month.

The end-of-month convention defines how D-ASA execution can be shifted according to the different number of days in months (31, 30, and 28) according to the calendar.

The D-ASA MAY specify an end-of-month convention \( [EOMC] \).

IDNameACTUS AcronymDescription
0Same Day\( [SD] \)Schedule times always fall on the schedule anchor date day of the month
1End of Month\( [EOM] \)Schedule times fall on the end of every month if the anchor date represents the last day of the respective month

Normalization profile restrictions

The D-ASA kernel MUST store one normalized day-count convention identifier.

The current kernel accepts the following identifiers:

IDNameACTUS
0Actual/ActualAA
1Actual/360A360
2Actual/365A365
330E/360 ISDA30E360ISDA
430E/36030E360

A contract configuration MUST fail if the normalized terms use any other day-count identifier.

The current D-ASA ACTUS profile imposes the following additional constraints on date handling:

  • business_day_convention MUST be NOS;
  • calendar MUST be NC;
  • Timestamps MUST be expressed as UTC UNIX seconds.

Those constraints are enforced during normalization so that the AVM only receives values that can be executed deterministically without external calendar logic.

Accrual factors

The AVM kernel does not recompute year fractions from raw dates. Instead, normalization MUST precompute the relevant accrual factors and place them in each ExecutionScheduleEntry.

This split is intentional:

  • Date arithmetic and ACTUS schedule generation happen off chain;
  • Execution, validation, and state transitions happen on chain.


  1. The paper “chrono-Compatible Low-Level Date Algorithms” (ref), by Howard Hinnant, provides a list of algorithms for the conversion of serial UNIX time into a proleptic Gregorian calendar (and vice versa).

  2. An example of Algorand Application implementing the conversion of serial UNIX time into a proleptic Gregorian calendar year/month/day triple.