Changelog
Source:NEWS.md
debtkit 0.1.4
Bug-fix release. dk_sustainability_gap() overstated S2 whenever ageing_costs was non-zero. Also a citation correction and two documentation changes.
S2 added the present value of ageing costs to an annual balance
S2 is a permanent change in the primary balance, a share of GDP per year. dk_sustainability_gap() added the net present value of future ageing costs, a stock, to it: ageing_costs * (1 + g) / (r - g). For the help page example (r = 2.5%, g = 1.5%, ageing costs of 2 pp) that put 2.03 of GDP into the indicator, and S2 came out at 204.9 pp. The correct term is the annuity value of that present value, which for the permanent step increase the function assumes is ageing_costs itself, so the example’s S2 is 3.9 pp. The same fix removes two artefacts of the old formula: with r < g, ageing costs reduced S2, and with r = g, S2 was Inf with a warning. S1 is unchanged.
dk_bohn_test() no longer calls a failed test “Not sustainable”
Bohn’s condition is sufficient for sustainability, not necessary. When rho is not positive and significant the printed verdict now says the condition is not met and that this is no evidence of a stabilising response, rather than “Not sustainable”. The sustainable element is unchanged. The README example also now passes lagged debt, as the debt argument requires; it passed current debt.
The Blanchard citation pointed at the wrong paper
The package cites Blanchard (1990) for the debt dynamics framework, but the DOI given was 10.1787/budget-v2-art12-en. That DOI resolves, which is why it survived CRAN’s incoming check, but CrossRef records it as a 2003 item in the OECD Journal on Budgeting carrying no title and no listed authors. It is not the 1990 paper.
The correct reference is 10.1787/435618162862, “Suggestions for a New Set of Fiscal Indicators”, OECD Economics Department Working Papers, 1990, whose CrossRef title and year match the claim exactly. Corrected in DESCRIPTION and in the @references for dk_decompose(), dk_project() and dk_rg().
dk_fan_chart() documents what seed does to your random stream
Passing seed calls set.seed() and does not restore the previous state, so the caller’s stream is left reseeded. That behaviour is unchanged: the save-and-restore implementation was removed at CRAN’s request in 0.1.2 because it manipulated .GlobalEnv, and reinstating it would re-open a question a reviewer has already settled. It is now stated in a “Random number generation” section on the help page instead, with the workaround, rather than being left for users to discover.
debtkit 0.1.2
CRAN release: 2026-03-31
- Removed
.GlobalEnvmodification indk_fan_chart()seed handling, per CRAN policy.
debtkit 0.1.1
- Fixed Bohn (1998) DOI: replaced defunct JSTOR DOI with QJE publisher DOI (10.1162/003355398555793).
debtkit 0.1.0
- Initial release.
- Deterministic debt projections via
dk_project()using the standard debt dynamics equation. - Historical decomposition of debt changes into interest, growth, primary balance, and stock-flow adjustment effects via
dk_decompose(). - Interest rate-growth differential and debt-stabilising primary balance via
dk_rg(). - Bohn (1998) fiscal reaction function estimation with OLS, rolling-window, and quadratic methods via
dk_bohn_test(). HAC (Newey-West) standard errors viarobust_se = TRUE. - Stochastic debt fan charts via Monte Carlo simulation using
dk_fan_chart()anddk_estimate_shocks(). Supports bootstrap residual resampling. - Six standardised IMF stress tests via
dk_stress_test(), with optional data-driven calibration. - IMF-style heat map risk assessment via
dk_heat_map(). - Gross financing needs projection via
dk_gfn(). - European Commission S1/S2 sustainability gap indicators via
dk_sustainability_gap(). - Scenario comparison via
dk_compare(). - Built-in sample data via
dk_sample_data().