Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.25.3] - 2026-11-24

### Adds
- Adds government debt contracted abroad at its own interest rate, addressing Issue #1125 (concessional debt from official lenders), and usable for any government debt contracted abroad, concessional or commercial. The new time-varying parameter `alpha_D_ext` (default 0.0) sets this debt as a share of GDP, and `r_D_ext_annual` (default 0.0, time varying, converted to a model-period rate `r_D_ext`) its real interest rate. Each period the government receives the new external borrowing and pays its interest, in the budget constraint of the steady state and the time path (`fiscal.D_G_path`, `fiscal.get_G_ss`, and the balanced-budget case of `fiscal.get_TR`), and the interest is paid abroad at `r_D_ext` in the resource constraint. The debt is held only by foreigners and is separate from the market debt `D`: it does not enter households' portfolio return `r_p`, and `debt_ratio_ss`, the closure rule and `zeta_D` refer to market debt.
- Adds `fiscal.get_D_ext`, which returns the stock of debt contracted abroad, new external borrowing, and its interest in the steady state or along the time path.
- Adds `D_ext`, `new_borrowing_ext`, and `debt_service_ext` to the steady-state and time-path output (with their descriptions in `model_variables.json`, and in `utils.unstationarize_vars`), and includes external interest in `total_government_outlays`. The debt is a share of GDP in the reform as well, including when `baseline_spending=True`, except in the first period: a reform starts from the baseline's stock, as it does for market debt and public capital.
- Adds the debt contracted abroad to the government budget constraint, the budget closure rules, and their stationarized forms in the documentation, and adds it and foreign aid to the goods market clearing condition.
- Adds tests of `fiscal.get_D_ext`, of the steady-state spending and the time path of debt and spending with debt contracted abroad (the budget constraint holds each period), of the premium on total debt, of the new parameters, a steady-state solution that balances the budget and clears the goods market, and a time path (marked `local`) with a falling external debt that keeps the budget and the goods market in balance in every period.

### Updates
- The debt-elastic premium on `r_gov` (`r_gov_DY`, `r_gov_DY2`) is evaluated at all government debt, market debt plus debt contracted abroad. With `alpha_D_ext` at its default of zero this is the market-debt ratio, so results are unchanged.
- The debt-to-GDP ratio in `output_tables.macro_table_SS` and in the calibration moments counts debt contracted abroad, and `output_plots.plot_all` adds it to the debt-to-GDP plot when it is not zero. Both are unchanged when `alpha_D_ext` is zero.

## [0.25.2] - 2026-11-23

### Added
Expand Down Expand Up @@ -942,6 +955,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Any earlier versions of OG-USA can be found in the [`OG-Core`](https://github.com/PSLmodels/OG-Core) repository [release history](https://github.com/PSLmodels/OG-Core/releases) from [v.0.6.4](https://github.com/PSLmodels/OG-Core/releases/tag/v0.6.4) (Jul. 20, 2021) or earlier.


[0.25.3]: https://github.com/PSLmodels/OG-Core/compare/v0.25.2...v0.25.3
[0.25.2]: https://github.com/PSLmodels/OG-Core/compare/v0.25.1...v0.25.2
[0.25.1]: https://github.com/PSLmodels/OG-Core/compare/v0.25.0...v0.25.1
[0.25.0]: https://github.com/PSLmodels/OG-Core/compare/v0.24.6...v0.25.0
Expand Down
2 changes: 1 addition & 1 deletion docs/book/content/api/fiscal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ ogcore.fiscal

.. automodule:: ogcore.fiscal
:members: D_G_path, get_D_ss, get_G_ss, get_debt_service_f, get_TR,
get_r_gov, get_I_g, get_foreign_aid, get_K_g
get_r_gov, get_I_g, get_foreign_aid, get_D_ext, get_K_g
14 changes: 14 additions & 0 deletions docs/book/content/intro/parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,20 @@ _Valid Range:_ min = 0.0 and max = 1.0
_Out-of-Range Action:_ error


#### `alpha_D_ext`
_Description:_ Stock of government debt contracted abroad at its own interest rate, as a share of GDP: for example concessional loans from multilateral and bilateral lenders (official development assistance), or bonds and loans on commercial terms. This debt is held only by foreigners and is not part of the market debt D: it does not enter households' portfolio return, pays r_D_ext_annual, and is paid abroad at that rate. The debt-elastic premium on r_gov is evaluated at all government debt, D plus this debt, while the budget closure rule (debt_ratio_ss) and zeta_D refer to market debt. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered.
_Value Type:_ float
_Valid Range:_ min = 0.0 and max = 3.0
_Out-of-Range Action:_ error


#### `r_D_ext_annual`
_Description:_ Annual real interest rate paid on government debt contracted abroad (alpha_D_ext), in units of the model's output: for debt in foreign currency, the foreign-currency rate less foreign inflation, plus any expected real depreciation. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered.
_Value Type:_ float
_Valid Range:_ min = -0.2 and max = 0.2
_Out-of-Range Action:_ error


### Government Pension Parameters

#### `retirement_age`
Expand Down
31 changes: 21 additions & 10 deletions docs/book/content/theory/government.md
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,8 @@ Foreign aid to the domestic government, $FA_t$, is treated the same way. In the

This means that changes to `alpha_FA` in the reform have no effect when `baseline_spending=True`; use `alpha_bs_FA` to change the level of foreign aid relative to the baseline instead.

Debt contracted abroad $D^{ext}_t$ is not affected by `baseline_spending`. In a reform simulation the stock owed in the first period is the baseline's, since debt already owed when the reform begins cannot depend on it (as with market debt $D_0$ and public capital); from the second period on it is the fraction $\alpha_{D,ext,t}$ of GDP in the reform.

Note that the budget closure rule (described in Section ref{`SecUnbalGBCcloseRule`}) still takes effect in the case of `baseline_spending=True`. What this means is that the relation described above holds until the period in which the closure rules takes effect. Once the closure rule begins, the path of $G$ (and/or $TR$, depending on the closure rule used) will adjust as determined by the rule to close the government budget in the long run.

(SecUnbalGBCrev)=
Expand Down Expand Up @@ -832,11 +834,11 @@ Note that the budget closure rule (described in Section ref{`SecUnbalGBCcloseRul
(SecUnbalGBCbudgConstr)=
## Government Budget Constraint

Let the level of government debt in period $t$ be given by $D_t$. The government budget constraint requires that government revenue $Rev_t$, external foreign assistance, $FA_t$, plus the budget deficit ($D_{t+1} - D_t$) equal expenditures on interest on the debt, government spending on public goods $G_t$, total infrastructure investments $I_{g,t}$, total pension outlays, total transfer payments to households $TR_t$, and $UBI_t$ every period $t$. When the funded defined contribution pillar is on, net FDC fund revenue $\Psi^{fdc}_t - \Phi^{fdc}_t$ also enters the constraint (see {ref}`SecGovPensionsFDC`),
Let the level of government debt in period $t$ be given by $D_t$. The government may also owe debt contracted abroad at its own interest rate, $D^{ext}_t$, described below. The government budget constraint requires that government revenue $Rev_t$, external foreign assistance, $FA_t$, plus the budget deficit financed by new borrowing ($D_{t+1} - D_t$ and $D^{ext}_{t+1} - D^{ext}_t$) equal expenditures on interest on the debt, government spending on public goods $G_t$, total infrastructure investments $I_{g,t}$, total pension outlays, total transfer payments to households $TR_t$, and $UBI_t$ every period $t$. When the funded defined contribution pillar is on, net FDC fund revenue $\Psi^{fdc}_t - \Phi^{fdc}_t$ also enters the constraint (see {ref}`SecGovPensionsFDC`),

```{math}
:label: EqUnbalGBCbudgConstr
D_{t+1} + Rev_t + \Psi^{fdc}_t + FA_t = (1 + r_{gov,t})D_t + G_t + I_{g,t} + Pensions_t + TR_t + UBI_t + \Phi^{fdc}_t \quad\forall t
D_{t+1} + D^{ext}_{t+1} + Rev_t + \Psi^{fdc}_t + FA_t = (1 + r_{gov,t})D_t + (1 + r_{ext,t})D^{ext}_t + G_t + I_{g,t} + Pensions_t + TR_t + UBI_t + \Phi^{fdc}_t \quad\forall t
```

where $r_{gov,t}$ is the interest rate paid by the government defined in equation {eq}`EqUnbalGBC_rate_wedge` below, $G_{t}$ is government spending on public goods, $I_{g,t}$ is total government spending on infrastructure investment, $TR_{t}$ are non-pension government transfers, $UBI_t$ is the total UBI transfer outlays across households in time $t$, and $\Psi^{fdc}_t$ and $\Phi^{fdc}_t$ are the FDC fund revenue paid to the government and the transfers the government pays the fund, both zero when the pillar is off or `r_fdc_wedge` is zero. All variables in {eq}`EqUnbalGBCbudgConstr` are real variables denominated in units of current-period output in industry $M$ the numeraire ($p_{M,t}=1$ for all $t$).
Expand Down Expand Up @@ -873,6 +875,15 @@ Note that the budget closure rule (described in Section ref{`SecUnbalGBCcloseRul

where $\delta_g$ is the depreciation rate on infrastructure and $\phi_g$ (`infra_investment_leakage_rate`) is the fraction of infrastructure investment lost to leakage (e.g., corruption or other frictions). The stock of public capital in each industry $m$ complements labor and private capital in the production function of the representative firm, in Equation {eq}`EqFirmsCESprodfun`.

Governments also borrow abroad directly, outside the domestic bond market: from official lenders such as multilateral development banks and bilateral donors, often on concessional terms (at interest rates well below market rates, in amounts the lenders decide), and on commercial terms through bonds and loans issued abroad. `OG-Core` models this debt contracted abroad as a stock $D^{ext}_t$ held entirely by foreigners, set as a time-dependent fraction $\alpha_{D,ext,t}$ (`alpha_D_ext`) of GDP and paying the exogenous real interest rate $r_{ext,t}$ (`r_D_ext_annual`, converted to a model-period rate). The model has no exchange rate, so for debt in foreign currency $r_{ext,t}$ is the foreign-currency rate less foreign inflation, plus any expected real depreciation.

```{math}
:label: EqUnbalGBC_D_ext
D^{ext}_t = \alpha_{D,ext,t}\: Y_t \quad\forall t
```

The government receives the new external borrowing $D^{ext}_{t+1} - D^{ext}_t$ and pays the interest $r_{ext,t}D^{ext}_t$ each period. Debt contracted abroad is separate from the market debt $D_t$: it is not part of household savings, so it does not enter the household portfolio return $r_{p,t}$ in {eq}`eq_portfolio_return`, and the debt-to-GDP target $\alpha_D$ of the budget closure rule and the share of new market debt bought by foreigners $\zeta_D$ refer to market debt; $D^f_t$ is then the part of market debt held by foreigners. The debt-elastic premium on $r_{gov,t}$ in {eq}`EqUnbalGBC_rate_wedge` is evaluated at all government debt, $D_t + D^{ext}_t$. Its interest is paid abroad at $r_{ext,t}$ in the goods market clearing condition (Chapter {ref}`Chap_MarkClr`). Because the stock is set by $\alpha_{D,ext,t}$, a reform that changes borrowing changes market debt only, unless it also changes $\alpha_{D,ext,t}$; and in the steady state all government debt is $\alpha_D + \alpha_{D,ext}$ of GDP. In the steady state the stock grows with GDP, so the government borrows $\left[(1+g_n)e^{g_y} - 1\right]D^{ext}$ a period and pays $r_{ext}D^{ext}$ in interest: when $r_{ext}$ is below the growth rate, as concessional rates usually are, the long-run budget receives a permanent net inflow from abroad. (Market debt held at $\alpha_D$ has the same property whenever $r_{gov}$ is below growth; the difference is that $r_{ext}$ is set by the user.) Phasing $\alpha_{D,ext,t}$ down to zero, for example as the debt is repaid, avoids it. By default $\alpha_{D,ext,t} = 0$.

Aggregate spending on UBI at time $t$ is the sum of UBI payments across all households at time $t$:

```{math}
Expand All @@ -888,10 +899,10 @@ Note that the budget closure rule (described in Section ref{`SecUnbalGBCcloseRul

```{math}
:label: EqUnbalGBC_rate_wedge
r_{gov, t} = (1 - \tau_{d, t})r_{t} - \mu_{d} + \beta_{1}\frac{D_t}{Y_t} + \beta_{2}\left(\frac{D_t}{Y_t}\right)^2
r_{gov, t} = (1 - \tau_{d, t})r_{t} - \mu_{d} + \beta_{1}\frac{D_t + D^{ext}_t}{Y_t} + \beta_{2}\left(\frac{D_t + D^{ext}_t}{Y_t}\right)^2
```

where $r_t$ is the marginal product of capital faced by firms. The two parameters, $\tau_{d,t}$ and $\mu_{d,t}$ can be used to allow for a government interest rate that is a percentage hair cut from the market rate or a government interest rate with a constant risk premium. The parameters $\beta_1$ and $\beta_2$ can be used to allow for a quadratic risk premium on government debt that is a function of the debt-to-GDP ratio.
where $r_t$ is the marginal product of capital faced by firms. The two parameters, $\tau_{d,t}$ and $\mu_{d,t}$ can be used to allow for a government interest rate that is a percentage hair cut from the market rate or a government interest rate with a constant risk premium. The parameters $\beta_1$ and $\beta_2$ can be used to allow for a quadratic risk premium on government debt that is a function of the debt-to-GDP ratio. The ratio counts all government debt, the market debt $D_t$ and the debt contracted abroad $D^{ext}_t$, since the risk of the government's debt depends on everything it owes; with no debt contracted abroad it is $D_t/Y_t$.


(SecUnbalGBCcloseRule)=
Expand Down Expand Up @@ -930,8 +941,8 @@ Note that the budget closure rule (described in Section ref{`SecUnbalGBCcloseRul
&\text{where}\quad g_{g,t} =
\begin{cases}
1 \qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\quad\:\text{if}\quad t < T_{G1} \\
\frac{\left[\rho_{d}\alpha_{D}Y_{t} + (1-\rho_{d})D_{t}\right] - (1+r_{gov,t})D_{t} - I_{g,t} - TR_{t} - UBI_{t} + Rev_{t} + FA_{t}}{\alpha_g Y_t} \quad\text{if}\quad T_{G1}\leq t<T_{G2} \\
\frac{\alpha_{D}Y_{t} - (1+r_{gov,t})D_{t} - I_{g,t} - TR_{t} - UBI_{t} + Rev_{t} + FA_{t}}{\alpha_g Y_t} \qquad\qquad\quad\:\:\,\text{if}\quad t \geq T_{G2}
\frac{\left[\rho_{d}\alpha_{D}Y_{t} + (1-\rho_{d})D_{t}\right] - (1+r_{gov,t})D_{t} - I_{g,t} - TR_{t} - UBI_{t} + Rev_{t} + FA_{t} + D^{ext}_{t+1} - (1+r_{ext,t})D^{ext}_{t}}{\alpha_g Y_t} \quad\text{if}\quad T_{G1}\leq t<T_{G2} \\
\frac{\alpha_{D}Y_{t} - (1+r_{gov,t})D_{t} - I_{g,t} - TR_{t} - UBI_{t} + Rev_{t} + FA_{t} + D^{ext}_{t+1} - (1+r_{ext,t})D^{ext}_{t}}{\alpha_g Y_t} \qquad\qquad\quad\:\:\,\text{if}\quad t \geq T_{G2}
\end{cases} \\
&\text{and}\quad g_{tr,t} = 1 \quad\forall t
\end{split}
Expand All @@ -952,8 +963,8 @@ Note that the budget closure rule (described in Section ref{`SecUnbalGBCcloseRul
&\text{where}\quad g_{tr,t} =
\begin{cases}
1 \qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\:\:\:\,\text{if}\quad t < T_{G1} \\
\frac{\left[\rho_{d}\alpha_{D}Y_{t} + (1-\rho_{d})D_{t}\right] - (1+r_{gov,t})D_{t} - G_{t} - I_{g,t} - UBI_{t} + Rev_{t} + FA_{t}}{\alpha_{tr} Y_t} \quad\text{if}\quad T_{G1}\leq t<T_{G2} \\
\frac{\alpha_{D}Y_{t} - (1+r_{gov,t})D_{t} - G_{t} - I_{g,t} - UBI_{t} + Rev_{t} + FA_{t}}{\alpha_{tr}Y_t} \qquad\qquad\quad\:\:\:\text{if}\quad t \geq T_{G2}
\frac{\left[\rho_{d}\alpha_{D}Y_{t} + (1-\rho_{d})D_{t}\right] - (1+r_{gov,t})D_{t} - G_{t} - I_{g,t} - UBI_{t} + Rev_{t} + FA_{t} + D^{ext}_{t+1} - (1+r_{ext,t})D^{ext}_{t}}{\alpha_{tr} Y_t} \quad\text{if}\quad T_{G1}\leq t<T_{G2} \\
\frac{\alpha_{D}Y_{t} - (1+r_{gov,t})D_{t} - G_{t} - I_{g,t} - UBI_{t} + Rev_{t} + FA_{t} + D^{ext}_{t+1} - (1+r_{ext,t})D^{ext}_{t}}{\alpha_{tr}Y_t} \qquad\qquad\quad\:\:\:\text{if}\quad t \geq T_{G2}
\end{cases} \\
&\text{and}\quad g_{g,t} = 1 \quad\forall t
\end{split}
Expand Down Expand Up @@ -983,8 +994,8 @@ Note that the budget closure rule (described in Section ref{`SecUnbalGBCcloseRul
&\text{where}\quad g_{trg,t} =
\begin{cases}
1 \qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\quad\:\,\text{if}\quad t < T_{G1} \\
\frac{\left[\rho_{d}\alpha_{D}Y_{t} + (1-\rho_{d})D_{t}\right] - (1+r_{gov,t})D_{t} - I_{g,t} - UBI_{t} + Rev_{t} + FA_{t}}{\left(\alpha_g + \alpha_{tr}\right)Y_t} \quad\text{if}\quad T_{G1}\leq t<T_{G2} \\
\frac{\alpha_{D}Y_{t} - (1+r_{gov,t})D_{t} - I_{g,t} - UBI_{t} + Rev_{t} + FA_{t}}{\left(\alpha_g + \alpha_{tr}\right)Y_t} \qquad\qquad\quad\:\:\:\text{if}\quad t \geq T_{G2}
\frac{\left[\rho_{d}\alpha_{D}Y_{t} + (1-\rho_{d})D_{t}\right] - (1+r_{gov,t})D_{t} - I_{g,t} - UBI_{t} + Rev_{t} + FA_{t} + D^{ext}_{t+1} - (1+r_{ext,t})D^{ext}_{t}}{\left(\alpha_g + \alpha_{tr}\right)Y_t} \quad\text{if}\quad T_{G1}\leq t<T_{G2} \\
\frac{\alpha_{D}Y_{t} - (1+r_{gov,t})D_{t} - I_{g,t} - UBI_{t} + Rev_{t} + FA_{t} + D^{ext}_{t+1} - (1+r_{ext,t})D^{ext}_{t}}{\left(\alpha_g + \alpha_{tr}\right)Y_t} \qquad\qquad\quad\:\:\:\text{if}\quad t \geq T_{G2}
\end{cases}
\end{split}
```
Expand Down
6 changes: 4 additions & 2 deletions docs/book/content/theory/market_clearing.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@

```{math}
:label: EqMarkClrGoods_M
Y_{M,t} = C_{M,t} + I_{M,t} + I_{g,t} + G_t + r_{p,t} K^f_t + r_{p,t}D^f_t - (K^f_{t+1} - K^f_t) - \bigl(D^f_{t+1} - D^f_t\bigr) - RM_t \quad\forall t
Y_{M,t} = C_{M,t} + I_{M,t} + I_{g,t} + G_t + r_{p,t} K^f_t + r_{p,t}D^f_t - (K^f_{t+1} - K^f_t) - \bigl(D^f_{t+1} - D^f_t\bigr) + r_{ext,t}D^{ext}_t - \bigl(D^{ext}_{t+1} - D^{ext}_t\bigr) - RM_t - FA_t \quad\forall t
```
where
```{math}
Expand All @@ -135,7 +135,9 @@

Similarly, we must subtract off the foreign purchases of new government debt $D^f_{t+1} - D^f_t$ and aggregate remittances $RM_t$ as shown in the second term in parentheses and the last term, respectively, on the right-hand-side of {eq}`EqMarkClrGoods_M`. The new foreign purchases of government debt are part of $I_{g,t}$ and $G_t$, as they are functions of GDP $Y_t$, as shown in {eq}`EqUnbalGBC_Gt`, {eq}`EqUnbalGBC_Igt`, and the government budget constraint {eq}`EqUnbalGBCbudgConstr`. Foreign lending relaxes the resource constraint. And aggregate remittances are part of aggregate consumption $C_t$ and also relax the resource constraint.

Net exports (imports) of capital in the form of foreign private capital inflows $K^f_t$, foreign holdings of government debt $D^f_t$, and remittances $RM_t$ are clearly accounted for in {eq}`EqMarkClrGoods_M`. Foreign remittances received by domestic households are described in Section {ref}`SecHHremit` of Chapter {ref}`Chap_House`.
Government debt contracted abroad $D^{ext}_t$ (see the government budget constraint {eq}`EqUnbalGBCbudgConstr`) enters in the same way as foreign holdings of market debt, except that its interest is paid at its own rate $r_{ext,t}$ rather than $r_{p,t}$, because it is not part of the portfolio whose return $r_{p,t}$ pays foreign and domestic holders alike: new external borrowing $D^{ext}_{t+1} - D^{ext}_t$ relaxes the resource constraint and its interest $r_{ext,t}D^{ext}_t$ is output paid abroad. Foreign aid to the government $FA_t$ is a transfer from abroad and also relaxes the resource constraint.

Net exports (imports) of capital in the form of foreign private capital inflows $K^f_t$, foreign holdings of government debt $D^f_t$ and $D^{ext}_t$, remittances $RM_t$, and foreign aid $FA_t$ are clearly accounted for in {eq}`EqMarkClrGoods_M`. Foreign remittances received by domestic households are described in Section {ref}`SecHHremit` of Chapter {ref}`Chap_House`.


(SecMarkClrBQ)=
Expand Down
Loading
Loading