Skip to content

Commit d8e454e

Browse files
authored
Merge pull request #1126 from jdebacker/foreign_aid
Merging
2 parents 4a8ef99 + 68cc07a commit d8e454e

15 files changed

Lines changed: 1048681 additions & 1048622 deletions

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
9+
## [0.16.0] - 2026-06-02 12:00:00
10+
11+
### Added
12+
13+
- Adds a new parameter, `alpha_FA`, that allows the user to specify the level of direct foreign aid as a percentage of GDP. See PR [#1126](https://github.com/PSLmodels/OG-Core/pull/1126).
14+
815
## [0.15.13] - 2026-05-15 06:00:00
916

1017
### Added
@@ -575,6 +582,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
575582
- 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.
576583

577584

585+
[0.16.0]: https://github.com/PSLmodels/OG-Core/compare/v0.15.13...v0.16.0
578586
[0.15.13]: https://github.com/PSLmodels/OG-Core/compare/v0.15.12...v0.15.13
579587
[0.15.12]: https://github.com/PSLmodels/OG-Core/compare/v0.15.11...v0.15.12
580588
[0.15.11]: https://github.com/PSLmodels/OG-Core/compare/v0.15.10...v0.15.11

docs/book/content/intro/parameters.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,15 @@ _Valid Range:_ min = 0.0 and max = 5.0
279279
_Out-of-Range Action:_ error
280280

281281

282+
### Fiscal Policy Parameters
283+
284+
#### `alpha_FA`
285+
_Description:_ Foreign aid payments to domestic government as a share of GDP.
286+
_Value Type:_ float
287+
_Valid Range:_ min = 0.0 and max = 1.0
288+
_Out-of-Range Action:_ error
289+
290+
282291
### Government Pension Parameters
283292

284293
#### `retirement_age`
@@ -556,7 +565,7 @@ _Out-of-Range Action:_ error
556565
_Description:_ Consumption tax rate. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered.
557566
_Notes:_ This policy parameter represents the effective consumption tax rate from sales taxes, VATs, and excise taxes by consumption good. Tax rates cab vary over time. It is thus a TxI array.
558567
_Value Type:_ float
559-
_Valid Range:_ min = 0.0 and max = 5.0
568+
_Valid Range:_ min = -5.0 and max = 5.0
560569
_Out-of-Range Action:_ error
561570

562571

@@ -879,7 +888,7 @@ _Out-of-Range Action:_ error
879888
#### `mindist_TPI`
880889
_Description:_ Tolerance for convergence of time path solution.
881890
_Value Type:_ float
882-
_Valid Range:_ min = 1e-13 and max = 0.001
891+
_Valid Range:_ min = 1e-13 and max = 0.01
883892
_Out-of-Range Action:_ error
884893

885894

docs/book/content/theory/government.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -615,11 +615,11 @@ Note that the budget closure rule (described in Section ref{`SecUnbalGBCcloseRul
615615
(SecUnbalGBCbudgConstr)=
616616
## Government Budget Constraint
617617

618-
Let the level of government debt in period $t$ be given by $D_t$. The government budget constraint requires that government revenue $Rev_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$,
618+
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$,
619619

620620
```{math}
621621
:label: EqUnbalGBCbudgConstr
622-
D_{t+1} + Rev_t = (1 + r_{gov,t})D_t + G_t + I_{g,t} + Pensions_t + TR_t + UBI_t \quad\forall t
622+
D_{t+1} + Rev_t + FA_t = (1 + r_{gov,t})D_t + G_t + I_{g,t} + Pensions_t + TR_t + UBI_t \quad\forall t
623623
```
624624

625625
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, and $UBI_t$ is the total UBI transfer outlays across households in time $t$. 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$).
@@ -713,8 +713,8 @@ Note that the budget closure rule (described in Section ref{`SecUnbalGBCcloseRul
713713
&\text{where}\quad g_{g,t} =
714714
\begin{cases}
715715
1 \qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\quad\:\text{if}\quad t < T_{G1} \\
716-
\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}}{\alpha_g Y_t} \quad\text{if}\quad T_{G1}\leq t<T_{G2} \\
717-
\frac{\alpha_{D}Y_{t} - (1+r_{gov,t})D_{t} - I_{g,t} - TR_{t} - UBI_{t} + Rev_{t}}{\alpha_g Y_t} \qquad\qquad\quad\:\:\,\text{if}\quad t \geq T_{G2}
716+
\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} \\
717+
\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}
718718
\end{cases} \\
719719
&\text{and}\quad g_{tr,t} = 1 \quad\forall t
720720
\end{split}
@@ -735,8 +735,8 @@ Note that the budget closure rule (described in Section ref{`SecUnbalGBCcloseRul
735735
&\text{where}\quad g_{tr,t} =
736736
\begin{cases}
737737
1 \qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\:\:\:\,\text{if}\quad t < T_{G1} \\
738-
\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}}{\alpha_{tr} Y_t} \quad\text{if}\quad T_{G1}\leq t<T_{G2} \\
739-
\frac{\alpha_{D}Y_{t} - (1+r_{gov,t})D_{t} - G_{t} - I_{g,t} - UBI_{t} + Rev_{t}}{\alpha_{tr}Y_t} \qquad\qquad\quad\:\:\:\text{if}\quad t \geq T_{G2}
738+
\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} \\
739+
\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}
740740
\end{cases} \\
741741
&\text{and}\quad g_{g,t} = 1 \quad\forall t
742742
\end{split}
@@ -766,8 +766,8 @@ Note that the budget closure rule (described in Section ref{`SecUnbalGBCcloseRul
766766
&\text{where}\quad g_{trg,t} =
767767
\begin{cases}
768768
1 \qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\quad\:\,\text{if}\quad t < T_{G1} \\
769-
\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}}{\left(\alpha_g + \alpha_{tr}\right)Y_t} \quad\text{if}\quad T_{G1}\leq t<T_{G2} \\
770-
\frac{\alpha_{D}Y_{t} - (1+r_{gov,t})D_{t} - I_{g,t} - UBI_{t} + Rev_{t}}{\left(\alpha_g + \alpha_{tr}\right)Y_t} \qquad\qquad\quad\:\:\:\text{if}\quad t \geq T_{G2}
769+
\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} \\
770+
\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}
771771
\end{cases}
772772
\end{split}
773773
```

docs/book/content/theory/stationarization.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ The usual definition of equilibrium would be allocations and prices such that ho
244244

245245
```{math}
246246
:label: EqStnrzGovBC
247-
e^{g_y}\left(1 + \tilde{g}_{n,t+1}\right)\hat{D}_{t+1} + \hat{Rev}_t = (1 + r_{gov,t})\hat{D}_t + \hat{G}_t + \hat{I}_{g,t} + \hat{Pensions}_t + \hat{TR}_t + \hat{UBI}_t \quad\forall t
247+
e^{g_y}\left(1 + \tilde{g}_{n,t+1}\right)\hat{D}_{t+1} + \hat{Rev}_t + \hat{FA}_t = (1 + r_{gov,t})\hat{D}_t + \hat{G}_t + \hat{I}_{g,t} + \hat{Pensions}_t + \hat{TR}_t + \hat{UBI}_t \quad\forall t
248248
```
249249

250250
The stationarized versions of the rule for total government infrastructure investment spending $I_{g,t}$ in {eq}`EqUnbalGBC_Igt` and the rule for government investment spending in each industry in {eq}`EqUnbalGBC_Igt` are found by dividing both sides of the respective equations by $e^{g_y t}\tilde{N}_t$.
@@ -298,8 +298,8 @@ The usual definition of equilibrium would be allocations and prices such that ho
298298
&\text{where}\quad g_{g,t} =
299299
\begin{cases}
300300
1 \qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\quad\text{if}\quad t < T_{G1} \\
301-
\frac{e^{g_y}\left(1 + \tilde{g}_{n,t+1}\right)\left[\rho_{d}\alpha_{D}\hat{Y}_{t} + (1-\rho_{d})\hat{D}_{t}\right] - (1+r_{gov,t})\hat{D}_{t} - \hat{TR}_{t} - \hat{I}_{g,t} - \hat{UBI}_t + \hat{Rev}_{t}}{\alpha_g \hat{Y}_t} \:\text{if}\: T_{G1}\leq t<T_{G2} \\
302-
\frac{e^{g_y}\left(1 + \tilde{g}_{n,t+1}\right)\alpha_{D}\hat{Y}_{t} - (1+r_{gov,t})\hat{D}_{t} - \hat{TR}_{t} - \hat{I}_{g,t} - \hat{UBI}_t + \hat{Rev}_{t}}{\alpha_g \hat{Y}_t} \qquad\qquad\quad\,\text{if}\quad t \geq T_{G2}
301+
\frac{e^{g_y}\left(1 + \tilde{g}_{n,t+1}\right)\left[\rho_{d}\alpha_{D}\hat{Y}_{t} + (1-\rho_{d})\hat{D}_{t}\right] - (1+r_{gov,t})\hat{D}_{t} - \hat{TR}_{t} - \hat{I}_{g,t} - \hat{UBI}_t + \hat{Rev}_{t} + \hat{FA}_t}{\alpha_g \hat{Y}_t} \:\text{if}\: T_{G1}\leq t<T_{G2} \\
302+
\frac{e^{g_y}\left(1 + \tilde{g}_{n,t+1}\right)\alpha_{D}\hat{Y}_{t} - (1+r_{gov,t})\hat{D}_{t} - \hat{TR}_{t} - \hat{I}_{g,t} - \hat{UBI}_t + \hat{Rev}_{t} + \hat{FA}_t}{\alpha_g \hat{Y}_t} \qquad\qquad\quad\,\text{if}\quad t \geq T_{G2}
303303
\end{cases} \\
304304
&\text{and}\quad g_{tr,t} = 1 \quad\forall t
305305
\end{split}
@@ -313,8 +313,8 @@ The usual definition of equilibrium would be allocations and prices such that ho
313313
&\text{where}\quad g_{tr,t} =
314314
\begin{cases}
315315
1 \qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\:\:\:\text{if}\quad t < T_{G1} \\
316-
\frac{e^{g_y}\left(1 + \tilde{g}_{n,t+1}\right)\left[\rho_{d}\alpha_{D}\hat{Y}_{t} + (1-\rho_{d})\hat{D}_{t}\right] - (1+r_{gov,t})\hat{D}_{t} - \hat{G}_{t} - \hat{I}_{g,t} - \hat{UBI}_t + \hat{Rev}_{t}}{\alpha_{tr} \hat{Y}_t} \:\text{if}\: T_{G1}\leq t<T_{G2} \\
317-
\frac{e^{g_y}\left(1 + \tilde{g}_{n,t+1}\right)\alpha_{D}\hat{Y}_{t} - (1+r_{gov,t})\hat{D}_{t} - \hat{G}_{t} - \hat{I}_{g,t} - \hat{UBI}_t + \hat{Rev}_{t}}{\alpha_{tr} \hat{Y}_t} \qquad\qquad\quad\,\text{if}\quad t \geq T_{G2}
316+
\frac{e^{g_y}\left(1 + \tilde{g}_{n,t+1}\right)\left[\rho_{d}\alpha_{D}\hat{Y}_{t} + (1-\rho_{d})\hat{D}_{t}\right] - (1+r_{gov,t})\hat{D}_{t} - \hat{G}_{t} - \hat{I}_{g,t} - \hat{UBI}_t + \hat{Rev}_{t} + \hat{FA}_t}{\alpha_{tr} \hat{Y}_t} \:\text{if}\: T_{G1}\leq t<T_{G2} \\
317+
\frac{e^{g_y}\left(1 + \tilde{g}_{n,t+1}\right)\alpha_{D}\hat{Y}_{t} - (1+r_{gov,t})\hat{D}_{t} - \hat{G}_{t} - \hat{I}_{g,t} - \hat{UBI}_t + \hat{Rev}_{t} + \hat{FA}_t}{\alpha_{tr} \hat{Y}_t} \qquad\qquad\quad\,\text{if}\quad t \geq T_{G2}
318318
\end{cases} \\
319319
&\text{and}\quad g_{g,t} = 1 \quad\forall t
320320
\end{split}
@@ -328,8 +328,8 @@ The usual definition of equilibrium would be allocations and prices such that ho
328328
&\text{where}\quad g_{trg,t} =
329329
\begin{cases}
330330
1 \qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\:\quad \text{if}\quad t < T_{G1} \\
331-
\frac{e^{g_y}\left(1 + \tilde{g}_{n,t+1}\right)\left[\rho_{d}\alpha_{D}\hat{Y}_{t} + (1-\rho_{d})\hat{D}_{t}\right] - (1+r_{gov,t})\hat{D}_{t} - \hat{I}_{g,t} - \hat{UBI}_t + \hat{Rev}_{t}}{\left(\alpha_g + \alpha_{tr}\right)\hat{Y}_t} \:\text{if}\: T_{G1}\leq t<T_{G2} \\
332-
\frac{e^{g_y}\left(1 + \tilde{g}_{n,t+1}\right)\alpha_{D}\hat{Y}_{t} - (1+r_{gov,t})\hat{D}_{t} - \hat{I}_{g,t} - \hat{UBI}_t + \hat{Rev}_{t}}{\left(\alpha_g + \alpha_{tr}\right)\hat{Y}_t} \qquad\qquad\quad\,\text{if}\quad t \geq T_{G2}
331+
\frac{e^{g_y}\left(1 + \tilde{g}_{n,t+1}\right)\left[\rho_{d}\alpha_{D}\hat{Y}_{t} + (1-\rho_{d})\hat{D}_{t}\right] - (1+r_{gov,t})\hat{D}_{t} - \hat{I}_{g,t} - \hat{UBI}_t + \hat{Rev}_{t} + \hat{FA}_t}{\left(\alpha_g + \alpha_{tr}\right)\hat{Y}_t} \:\text{if}\: T_{G1}\leq t<T_{G2} \\
332+
\frac{e^{g_y}\left(1 + \tilde{g}_{n,t+1}\right)\alpha_{D}\hat{Y}_{t} - (1+r_{gov,t})\hat{D}_{t} - \hat{I}_{g,t} - \hat{UBI}_t + \hat{Rev}_{t} + \hat{FA}_t}{\left(\alpha_g + \alpha_{tr}\right)\hat{Y}_t} \qquad\qquad\quad\,\text{if}\quad t \geq T_{G2}
333333
\end{cases}
334334
\end{split}
335335
```

ogcore/SS.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1115,7 +1115,8 @@ def SS_solver(
11151115
net_capital_outflows_vec[-1] = net_capital_outflows
11161116
RM_vec_ss = np.zeros(p.M)
11171117
RM_vec_ss[-1] = RM_ss
1118-
1118+
foreign_aid_vec_ss = np.zeros(p.M)
1119+
foreign_aid_vec_ss[-1] = p.alpha_FA[-1] * Yss
11191120
RC = aggr.resource_constraint(
11201121
Y_vec_ss,
11211122
C_m_vec_ss,
@@ -1124,6 +1125,7 @@ def SS_solver(
11241125
I_g_vec_ss,
11251126
net_capital_outflows_vec,
11261127
RM_vec_ss,
1128+
foreign_aid_vec_ss,
11271129
)
11281130
logger.info(f"Foreign debt holdings = {D_f_ss}")
11291131
logger.info(f"Foreign capital holdings = {K_f_ss}")

ogcore/TPI.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1413,6 +1413,8 @@ def run_TPI(p, client=None):
14131413
net_capital_outflows_vec[:, -1] = net_capital_outflows[: p.T]
14141414
RM_vec = np.zeros((p.T, p.M))
14151415
RM_vec[:, -1] = RM[: p.T]
1416+
foreign_aid_vec = np.zeros((p.T, p.M))
1417+
foreign_aid_vec[:, -1] = p.alpha_FA[: p.T] * Y[: p.T]
14161418
RC_error = aggr.resource_constraint(
14171419
Y_vec,
14181420
C_m_vec,
@@ -1421,6 +1423,7 @@ def run_TPI(p, client=None):
14211423
I_g_vec,
14221424
net_capital_outflows_vec,
14231425
RM_vec,
1426+
foreign_aid_vec,
14241427
)
14251428
# Compute total investment (not just domestic)
14261429
I_total = aggr.get_I(None, K[1 : p.T + 1], K[: p.T], p, "total_tpi")

ogcore/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@
2121
from ogcore.txfunc import * # noqa: F403
2222
from ogcore.utils import * # noqa: F403
2323

24-
__version__ = "0.15.13"
24+
__version__ = "0.16.0"

ogcore/aggregates.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ def get_r_p(r, r_gov, p_m, K_vec, K_g, D, MPKg_vec, p, method):
509509
return np.squeeze(r_p)
510510

511511

512-
def resource_constraint(Y, C, G, I_d, I_g, net_capital_flows, RM):
512+
def resource_constraint(Y, C, G, I_d, I_g, net_capital_flows, RM, foreign_aid):
513513
r"""
514514
Compute the error in the resource constraint.
515515
@@ -518,7 +518,8 @@ def resource_constraint(Y, C, G, I_d, I_g, net_capital_flows, RM):
518518
\text{rc_error} &= \hat{Y}_t - \hat{C}_t -
519519
\Bigl(e^{g_y}\bigl[1 + \tilde{g}_{n,t+1}\bigr]\hat{K}^d_{t+1} -
520520
\hat{K}^d_t\Bigr) - \delta\hat{K}_t - \hat{G}_t - \hat{I}_{g,t} ... \\
521-
&\qquad -\: \hat{\text{net capital outflows}}_t + \hat{RM}_t
521+
&\qquad -\: \hat{\text{net capital outflows}}_t + \hat{RM}_t +
522+
\hat{\text{foreign aid}}_t
522523
\end{split}
523524
524525
Args:
@@ -529,12 +530,13 @@ def resource_constraint(Y, C, G, I_d, I_g, net_capital_flows, RM):
529530
I_g (array_like): investment in government capital
530531
net_capital_flows (array_like): net capital outflows
531532
RM (array_like): aggregate remittances
533+
foreign_aid (array_like): foreign aid payments
532534
533535
Returns:
534536
rc_error (array_like): error in the resource constraint
535537
536538
"""
537-
rc_error = Y - C - I_d - I_g - G - net_capital_flows + RM
539+
rc_error = Y - C - I_d - I_g - G - net_capital_flows + RM + foreign_aid
538540

539541
return rc_error
540542

ogcore/default_parameters.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -954,6 +954,30 @@
954954
}
955955
}
956956
},
957+
"alpha_FA": {
958+
"title": "Foreign aid payments to domestic government as a share of GDP",
959+
"description": "Foreign aid payments to domestic government as a share of GDP.",
960+
"short_description": "Foreign aid as a share of GDP",
961+
"param_notation": "$\\alpha_{FA}$",
962+
"section_1": "Fiscal Policy Parameters",
963+
"section_2": "Fiscal Policy Parameters",
964+
"notes": "",
965+
"number_dims": 1,
966+
"type": "float",
967+
"value": [
968+
{
969+
"value": [
970+
0.0
971+
]
972+
}
973+
],
974+
"validators": {
975+
"range": {
976+
"min": 0.0,
977+
"max": 1.0
978+
}
979+
}
980+
},
957981
"alpha_RM_1": {
958982
"title": "Exogenous ratio of aggregate remittances to GDP in current period (t=1)",
959983
"description": "Exogenous ratio of aggregate remittances to GDP in current period (t=1).",

ogcore/fiscal.py

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ def D_G_path(r, dg_fixed_values, p):
9494
else:
9595
G = p.alpha_G[: p.T] * Y[: p.T]
9696

97+
# direct foreign aid
98+
foreign_aid = p.alpha_FA[: p.T] * Y[: p.T]
99+
97100
if p.budget_balance:
98101
D = np.zeros(p.T + 1)
99102
G = p.alpha_G[: p.T] * Y[: p.T]
@@ -116,6 +119,7 @@ def D_G_path(r, dg_fixed_values, p):
116119
+ UBI_outlays[t - 1]
117120
+ agg_pension_outlays[t - 1]
118121
- total_tax_revenue[t - 1]
122+
- foreign_aid[t - 1]
119123
)
120124
r_gov[t] = get_r_gov(r[t], D[t] / Y[t], p, method="scalar", t=t)
121125
if (t >= p.tG1) and (t < p.tG2):
@@ -124,6 +128,7 @@ def D_G_path(r, dg_fixed_values, p):
124128
* (p.rho_G * p.debt_ratio_ss * Y[t] + (1 - p.rho_G) * D[t])
125129
- (1 + r_gov[t]) * D[t]
126130
+ total_tax_revenue[t]
131+
+ foreign_aid[t]
127132
- agg_pension_outlays[t]
128133
- I_g[t - 1]
129134
- TR[t]
@@ -134,6 +139,7 @@ def D_G_path(r, dg_fixed_values, p):
134139
growth[t + 1] * (p.debt_ratio_ss * Y[t])
135140
- (1 + r_gov[t]) * D[t]
136141
+ total_tax_revenue[t]
142+
+ foreign_aid[t]
137143
- agg_pension_outlays[t]
138144
- I_g[t - 1]
139145
- TR[t]
@@ -152,12 +158,14 @@ def D_G_path(r, dg_fixed_values, p):
152158
+ UBI_outlays[t - 1]
153159
+ agg_pension_outlays[t - 1]
154160
- total_tax_revenue[t - 1]
161+
- foreign_aid[t - 1]
155162
)
156163
r_gov[t] = get_r_gov(r[t], D[t] / Y[t], p, method="scalar", t=t)
157164
G[t] = (
158165
growth[t] * (p.debt_ratio_ss * Y[t])
159166
- (1 + r_gov[t]) * D[t]
160167
+ total_tax_revenue[t]
168+
+ foreign_aid[t]
161169
- agg_pension_outlays[t]
162170
- I_g[t - 1]
163171
- TR[t]
@@ -171,6 +179,7 @@ def D_G_path(r, dg_fixed_values, p):
171179
+ UBI_outlays[t]
172180
+ agg_pension_outlays[t]
173181
- total_tax_revenue[t]
182+
- foreign_aid[t]
174183
)
175184
D_ratio_max = np.amax(D[: p.T] / Y[: p.T])
176185
print("Maximum debt ratio: ", D_ratio_max)
@@ -284,12 +293,14 @@ def get_G_ss(
284293
G (tuple): steady-state government spending
285294
286295
"""
296+
foreign_aid = p.alpha_FA[-1] * Y
287297
if p.budget_balance:
288298
G = p.alpha_G[-1] * Y
289299
else:
290300
G = (
291301
total_tax_revenue
292302
+ new_borrowing
303+
+ foreign_aid
293304
- (agg_pension_outlays + TR + debt_service + UBI_outlays + I_g)
294305
)
295306

@@ -346,7 +357,7 @@ def get_TR(
346357
agg_pension_outlays (array_like): total government pension
347358
outlays
348359
UBI_outlays (array_like): total universal basic income (UBI) outlays
349-
I_g (array_like): public infrastructure investement
360+
I_g (array_like): public infrastructure investment
350361
p (OG-Core Specifications object): model parameters
351362
method (str): whether doing SS or TP calculation
352363
@@ -355,8 +366,17 @@ def get_TR(
355366
356367
"""
357368
if p.budget_balance:
369+
if method == "SS":
370+
foreign_aid = p.alpha_FA[-1] * Y
371+
else:
372+
foreign_aid = p.alpha_FA[: p.T] * Y[: p.T]
358373
new_TR = (
359-
total_tax_revenue - agg_pension_outlays - G - UBI_outlays - I_g
374+
total_tax_revenue
375+
+ foreign_aid
376+
- agg_pension_outlays
377+
- G
378+
- UBI_outlays
379+
- I_g
360380
)
361381
elif p.baseline_spending:
362382
new_TR = p.alpha_bs_T[-1] * TR
@@ -422,7 +442,7 @@ def get_I_g(Y, Ig_baseline, p, method="SS"):
422442
Args:
423443
Y (array_like): aggregate output
424444
Ig_baseline (array_like): public infrastructure investment in
425-
the baseliine simulation
445+
the baseline simulation
426446
p (OG-Core Specifications object): model parameters
427447
method (str): either 'SS' for steady-state or 'TPI' for transition path
428448

0 commit comments

Comments
 (0)