FN-COUPDAYSNC-001: On basis 0 COUPDAYSNC is not always COUPDAYS minus COUPDAYBS
Quirk · measured · recorded 2026-11-04
On basis 0 (US 30/360), COUPDAYSNC is P - A. A is COUPDAYBS, the accrued days. P is a 30/360 count between the actual previous and next coupon dates, with day 31 and the last day of February both counted as day 30. COUPDAYS on basis 0 is always 360/frequency, but P need not be: when a coupon falls on the last day of February and maturity is not a month end, P can be 88, 89 or 92 for a quarter and 178 or 182 for a half year. So COUPDAYSNC(39923,50919,4,0), with coupons 2009-02-28 and 2009-05-29, is 39: P is 89 and A is 50, where 90 - 50 would give 40. With no coupon date before settlement in Excel's calendar, the period starts at serial 0: COUPDAYSNC(33,400,2,0) is 1, and for settlement 61, maturity 456 and annual coupons COUPDAYBS plus COUPDAYSNC is 90, not 360. This rule matches all 1,664 recorded number rows on basis 0, 733 of them chosen near February, month ends and the start of the calendar.
| Call and input route | Inputs | Excel | Correct value | Recorded in |
|---|---|---|---|---|
COUPDAYSNC(39923, 50919, 4, 0)cell-value2 | settlement: 399230x40e37e6000000000maturity: 509190x40e8dce000000000frequency: 40x4010000000000000basis: 00x0000000000000000 | 390x4043800000000000 | — | Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file |
COUPDAYSNC(45986, 57038, 2, 0)cell-value2 | settlement: 459860x40e6744000000000maturity: 570380x40ebd9c000000000frequency: 20x4000000000000000basis: 00x0000000000000000 | 950x4057c00000000000 | — | Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file |
COUPDAYSNC(46478, 46627, 4, 0)cell-value2 | settlement: 464780x40e6b1c000000000maturity: 466270x40e6c46000000000frequency: 40x4010000000000000basis: 00x0000000000000000 | 570x404c800000000000 | — | Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file |
COUPDAYSNC(33, 400, 2, 0)cell-value2 | settlement: 330x4040800000000000maturity: 4000x4079000000000000frequency: 20x4000000000000000basis: 00x0000000000000000 | 10x3ff0000000000000 | — | Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file |
COUPDAYBS(61, 456, 1, 0)cell-value2 | settlement: 610x404e800000000000maturity: 4560x407c800000000000frequency: 10x3ff0000000000000basis: 00x0000000000000000 | 610x404e800000000000 | — | Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file |
COUPDAYSNC(61, 456, 1, 0)cell-value2 | settlement: 610x404e800000000000maturity: 4560x407c800000000000frequency: 10x3ff0000000000000basis: 00x0000000000000000 | 290x403d000000000000 | — | Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file |
Basis: 1,664 recorded rows with a number answer on basis 0, from builds 20131, 20430 and 20527, recomputed independently from the calendar. An implementation of these rules matches all 33,504 selected readings of the six coupon functions. Fictitious 1900-02-29 is not a month end here.
Inferred: The split into P and A reproduces every row; that Excel's code forms these two counts is inferred. For the February cases in this note only COUPDAYSNC is recorded: their A comes from the rule, not from a COUPDAYBS reading.
Evidence and capture sources
- DnaCalc · crates/calc-func/src/ported/coupon_family.rs 7ec08d6707059ef1d74922ac9b8e0769f6093312 · coupdaysnc_kernel the rule as implemented
- DnaCalc · crates/calc-func/tests/captures/fn4_questions/COUPDAYSNC.reading.json 2d0eddcac86413014643af81d646581d54ba57bc · 733 recorded readings
- DnaCalc · crates/calc-func/tests/captures/fn4_questions/COUPDAYBS.reading.json 2d0eddcac86413014643af81d646581d54ba57bc · 120 recorded readings
- DnaCalc · .beads/issues.jsonl 2d0eddcac86413014643af81d646581d54ba57bc · dc-zmk.4 the 33,504 selected coupon readings
- DnaCalc · crates/calc-func/tests/captures/fn4_questions/COUPDAYSNC.reading.json 2d0eddcac86413014643af81d646581d54ba57bc · fn7-COUPDAYSNC-remaining-calendar-1
- DnaCalc · crates/calc-func/tests/captures/fn4_questions/COUPDAYSNC.reading.json 2d0eddcac86413014643af81d646581d54ba57bc · fn7-COUPDAYSNC-remaining-calendar-2
- DnaCalc · crates/calc-func/tests/captures/fn4_questions/COUPDAYSNC.reading.json 2d0eddcac86413014643af81d646581d54ba57bc · fn7-COUPDAYSNC-full-period-holdout-90
- DnaCalc · crates/calc-func/tests/captures/fn4_questions/COUPDAYSNC.reading.json 2d0eddcac86413014643af81d646581d54ba57bc · fn7-COUPDAYSNC-calendar-boundary-127
- DnaCalc · crates/calc-func/tests/captures/fn4_questions/COUPDAYBS.reading.json 2d0eddcac86413014643af81d646581d54ba57bc · fn7-COUPDAYBS-fake-february-43
- DnaCalc · crates/calc-func/tests/captures/fn4_questions/COUPDAYSNC.reading.json 2d0eddcac86413014643af81d646581d54ba57bc · fn7-COUPDAYSNC-fake-february-43