Skip to content

feat(prototypes): test debt at estimated present value - #151

Merged
jm-rivera merged 1 commit into
devfrom
feat/prototype-debt-pv
Nov 16, 2026
Merged

jm-rivera merged 1 commit into
devfrom
feat/prototype-debt-pv

Conversation

@jm-rivera

Copy link
Copy Markdown
Contributor

The debt test in the debt-thresholds prototype now uses an estimate of present value in place of face value. The IMF–World Bank thresholds are set on present value, and FDL's 2023 note measures debt "at present value over GDP". IDS publishes face value only, so the data step estimates present value as face value × (1 − concessional share × mean grant element). The rebuild of 2024 now matches FDL's group for 54 of 58 countries, up from 51, and 57 of 58 on the debt test alone.

Changes

  • _data/pipeline/sources/ids_bulk.py reads DT.DOD.ALLC.CD (concessional stock) and DT.GRE.DPPG (grant element of new commitments) from the bulk files for both views.
  • _data/pipeline/valuation.py adds present_value: the concessional share of the PPG stock in the base year, capped at one, discounted by the mean grant element from 2015 to the base year. build.py writes it as debtPV beside debtFace, and coverage.py checks it.
  • _lib/thresholds.ts debtRatio uses debtPV. The scatter title, the country card heading and the CSV column say "at present value", and the envelope's measure is pv.
  • page.mdx: step 1 says FDL checks debt at present value, the Notes name Mozambique as the one debt-test difference, and the face-value bullet becomes a short account of the estimate.
  • Data regenerated. The 2025 counts are 7 above the debt threshold, 20 above the debt-service threshold and 31 below both (11, 18 and 29 at face value).

Notes for reviewers

  • At face value, Lesotho, Rwanda, São Tomé and Príncipe and The Gambia fell above FDL's 2024 debt threshold while FDL placed them lower. Present value puts all four where FDL does. Mozambique moves the other way: 28.8% of GDP against its 30% threshold, where FDL finds it at risk of insolvency. The three remaining differences (Comoros, Haiti, Sierra Leone) come from the debt-service test and are unchanged.
  • In 2025, Mozambique, Lesotho, Liberia and Rwanda leave the debt group. Liberia falls furthest, from 31.3% to 18.6%, since almost all its debt is concessional.
  • The estimate is uncalibrated: it applies the grant element at full weight. Weights from 0.8 to 1.2 give 57 or 58 of 58 on the 2024 debt test, so the result does not hinge on that choice. FDL discounts loan cash flows in its own model, at 5% in its 2022 paper; no FDL document describes this proxy.
  • _data/fixture.json sets debtFace a quarter above debtPV, so the TS tests fail if debtRatio slips back to face value (7 of 31 fail).

Testing: uvx --with pytest pytest tests (79 passed), pnpm test (31 passed), pnpm typecheck, pnpm check:data and ESLint on the prototype all clean; page checked on the dev server.

The IMF-World Bank debt thresholds are set on present value, and FDL's
2023 note measures debt "at present value over GDP". IDS publishes face
value only, so the data step now estimates present value as face value
times (1 - concessional share x mean grant element), with the share from
DT.DOD.ALLC.CD over DT.DOD.DPPG.CD and the grant element the mean of
DT.GRE.DPPG from 2015 to the base year.

The rebuild of 2024 now matches FDL's group for 54 of 58 countries
(51 at face value), and 57 of 58 on the debt test alone. The 2025
counts become 7, 20 and 31.
@jm-rivera
jm-rivera marked this pull request as ready for review November 16, 2026 22:48
@jm-rivera
jm-rivera merged commit bb6b60a into dev Nov 16, 2026
12 checks passed
@jm-rivera
jm-rivera deleted the feat/prototype-debt-pv branch November 16, 2026 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant