Skip to content

debtkit

Debt Sustainability Analysis and Fiscal Risk Assessment

v0.1.2 · Mar 31, 2026 · MIT + file LICENSE

Description

Analyses government debt sustainability using the standard debt dynamics framework from Blanchard (1990) <doi:10.1787/budget-v2-art12-en> and the IMF Debt Sustainability Analysis methodology (IMF, 2013) and the Sovereign Risk and Debt Sustainability Framework (IMF, 2022). Projects debt-to-GDP paths, decomposes historical debt changes into interest, growth, and primary balance contributions, and estimates fiscal reaction functions following Bohn (1998) <doi:10.1162/003355398555793>. Produces stochastic fan charts via Monte Carlo simulation, standardised stress tests, and IMF- style heat map risk assessments. Computes S1/S2 sustainability gap indicators used by the European Commission. All methods are pure computation with no external dependencies beyond base R; works with fiscal data from any source.

Downloads

CRAN

407

Last 30 days

10626th

1.3K

Last 90 days

1.4K

Last year

Trend: -2.6% (30d vs prior 30d)

r2u CRAN

0

Last 30 days

25

Last 90 days

29

Last year

Trend: -100% (30d vs prior 30d)

autoCRAN

4

Last 7 days

13

Last 30 days

0

All-time

autoCRAN-only: this name is served only by autoCRAN, so the count is exact.

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 7 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Apr 1, 2026

Code

Structure

Lines of code

5,022

Files

49

Compiled share

0%

Has compiled src

No

Language breakdown

R 2,725 (54.3%)Tests 1,402 (27.9%)Docs 895 (17.8%)

API

Exported functions

12

Internal functions

25

Recent export changes

v0.1.2+12 dk_bohn_test, dk_compare, dk_decompose +9 more

Testing & CI

Has tests

Yes

Test-to-code ratio

0.51

testthat edition

3

CI present

No

CI type

[]

PR gated

No

Docs

Return-value doc rate

100%

\dontrun example ratio

0%

Roxygen coverage

100%

Has pkgdown

No

NEWS present

Yes

Health & Security signals

Informational signals; not verdicts.

on.exit coverage

100%

Unsafe pattern score

0

Dep constraint coverage

25%

Secret pattern count

0

Bundled 3rd-party code

2 items

Portability & License

Min R version

4.1.0

System requirements

C++ standard

License

MIT + file LICENSE

License flags

SPDX valid, OSI approved

History

Versions

1

First release

2026-03-31

Latest release

2026-03-31

Avg cadence

Cold removal rate

Dep drift

0

Per-file churn detail lives in the source pipeline: https://github.com/r-observatory/cran-code-metrics.

Dependency Network

Dependencies Reverse dependencies cli debtkit

Version History

1 tracked
new 0.1.2 Mar 31, 2026