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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ 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.16.0] - 2026-06-02 12:00:00

### Added

- 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).

## [0.15.13] - 2026-05-15 06:00:00

### Added
Expand Down Expand Up @@ -575,6 +582,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.16.0]: https://github.com/PSLmodels/OG-Core/compare/v0.15.13...v0.16.0
[0.15.13]: https://github.com/PSLmodels/OG-Core/compare/v0.15.12...v0.15.13
[0.15.12]: https://github.com/PSLmodels/OG-Core/compare/v0.15.11...v0.15.12
[0.15.11]: https://github.com/PSLmodels/OG-Core/compare/v0.15.10...v0.15.11
Expand Down
13 changes: 11 additions & 2 deletions docs/book/content/intro/parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,15 @@ _Valid Range:_ min = 0.0 and max = 5.0
_Out-of-Range Action:_ error


### Fiscal Policy Parameters

#### `alpha_FA`
_Description:_ Foreign aid payments to domestic government as a share of GDP.
_Value Type:_ float
_Valid Range:_ min = 0.0 and max = 1.0
_Out-of-Range Action:_ error


### Government Pension Parameters

#### `retirement_age`
Expand Down Expand Up @@ -556,7 +565,7 @@ _Out-of-Range Action:_ error
_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.
_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.
_Value Type:_ float
_Valid Range:_ min = 0.0 and max = 5.0
_Valid Range:_ min = -5.0 and max = 5.0
_Out-of-Range Action:_ error


Expand Down Expand Up @@ -879,7 +888,7 @@ _Out-of-Range Action:_ error
#### `mindist_TPI`
_Description:_ Tolerance for convergence of time path solution.
_Value Type:_ float
_Valid Range:_ min = 1e-13 and max = 0.001
_Valid Range:_ min = 1e-13 and max = 0.01
_Out-of-Range Action:_ error


Expand Down
16 changes: 8 additions & 8 deletions docs/book/content/theory/government.md
Original file line number Diff line number Diff line change
Expand Up @@ -615,11 +615,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$ 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$,
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$,

```{math}
:label: EqUnbalGBCbudgConstr
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
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
```

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$).
Expand Down Expand Up @@ -713,8 +713,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}}{\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}}{\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}}{\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}
\end{cases} \\
&\text{and}\quad g_{tr,t} = 1 \quad\forall t
\end{split}
Expand All @@ -735,8 +735,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}}{\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}}{\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}}{\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}
\end{cases} \\
&\text{and}\quad g_{g,t} = 1 \quad\forall t
\end{split}
Expand Down Expand Up @@ -766,8 +766,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}}{\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}}{\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}}{\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}
\end{cases}
\end{split}
```
Expand Down
14 changes: 7 additions & 7 deletions docs/book/content/theory/stationarization.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ The usual definition of equilibrium would be allocations and prices such that ho

```{math}
:label: EqStnrzGovBC
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
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
```

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$.
Expand Down Expand Up @@ -298,8 +298,8 @@ The usual definition of equilibrium would be allocations and prices such that ho
&\text{where}\quad g_{g,t} =
\begin{cases}
1 \qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\quad\text{if}\quad t < T_{G1} \\
\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} \\
\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}
\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} \\
\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}
\end{cases} \\
&\text{and}\quad g_{tr,t} = 1 \quad\forall t
\end{split}
Expand All @@ -313,8 +313,8 @@ The usual definition of equilibrium would be allocations and prices such that ho
&\text{where}\quad g_{tr,t} =
\begin{cases}
1 \qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\:\:\:\text{if}\quad t < T_{G1} \\
\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} \\
\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}
\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} \\
\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}
\end{cases} \\
&\text{and}\quad g_{g,t} = 1 \quad\forall t
\end{split}
Expand All @@ -328,8 +328,8 @@ The usual definition of equilibrium would be allocations and prices such that ho
&\text{where}\quad g_{trg,t} =
\begin{cases}
1 \qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\:\quad \text{if}\quad t < T_{G1} \\
\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} \\
\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}
\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} \\
\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}
\end{cases}
\end{split}
```
Expand Down
4 changes: 3 additions & 1 deletion ogcore/SS.py
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,8 @@ def SS_solver(
net_capital_outflows_vec[-1] = net_capital_outflows
RM_vec_ss = np.zeros(p.M)
RM_vec_ss[-1] = RM_ss

foreign_aid_vec_ss = np.zeros(p.M)
foreign_aid_vec_ss[-1] = p.alpha_FA[-1] * Yss
RC = aggr.resource_constraint(
Y_vec_ss,
C_m_vec_ss,
Expand All @@ -1124,6 +1125,7 @@ def SS_solver(
I_g_vec_ss,
net_capital_outflows_vec,
RM_vec_ss,
foreign_aid_vec_ss,
)
logger.info(f"Foreign debt holdings = {D_f_ss}")
logger.info(f"Foreign capital holdings = {K_f_ss}")
Expand Down
3 changes: 3 additions & 0 deletions ogcore/TPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -1413,6 +1413,8 @@ def run_TPI(p, client=None):
net_capital_outflows_vec[:, -1] = net_capital_outflows[: p.T]
RM_vec = np.zeros((p.T, p.M))
RM_vec[:, -1] = RM[: p.T]
foreign_aid_vec = np.zeros((p.T, p.M))
foreign_aid_vec[:, -1] = p.alpha_FA[: p.T] * Y[: p.T]
RC_error = aggr.resource_constraint(
Y_vec,
C_m_vec,
Expand All @@ -1421,6 +1423,7 @@ def run_TPI(p, client=None):
I_g_vec,
net_capital_outflows_vec,
RM_vec,
foreign_aid_vec,
)
# Compute total investment (not just domestic)
I_total = aggr.get_I(None, K[1 : p.T + 1], K[: p.T], p, "total_tpi")
Expand Down
2 changes: 1 addition & 1 deletion ogcore/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
from ogcore.txfunc import * # noqa: F403
from ogcore.utils import * # noqa: F403

__version__ = "0.15.13"
__version__ = "0.16.0"
8 changes: 5 additions & 3 deletions ogcore/aggregates.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ def get_r_p(r, r_gov, p_m, K_vec, K_g, D, MPKg_vec, p, method):
return np.squeeze(r_p)


def resource_constraint(Y, C, G, I_d, I_g, net_capital_flows, RM):
def resource_constraint(Y, C, G, I_d, I_g, net_capital_flows, RM, foreign_aid):
r"""
Compute the error in the resource constraint.

Expand All @@ -518,7 +518,8 @@ def resource_constraint(Y, C, G, I_d, I_g, net_capital_flows, RM):
\text{rc_error} &= \hat{Y}_t - \hat{C}_t -
\Bigl(e^{g_y}\bigl[1 + \tilde{g}_{n,t+1}\bigr]\hat{K}^d_{t+1} -
\hat{K}^d_t\Bigr) - \delta\hat{K}_t - \hat{G}_t - \hat{I}_{g,t} ... \\
&\qquad -\: \hat{\text{net capital outflows}}_t + \hat{RM}_t
&\qquad -\: \hat{\text{net capital outflows}}_t + \hat{RM}_t +
\hat{\text{foreign aid}}_t
\end{split}

Args:
Expand All @@ -529,12 +530,13 @@ def resource_constraint(Y, C, G, I_d, I_g, net_capital_flows, RM):
I_g (array_like): investment in government capital
net_capital_flows (array_like): net capital outflows
RM (array_like): aggregate remittances
foreign_aid (array_like): foreign aid payments

Returns:
rc_error (array_like): error in the resource constraint

"""
rc_error = Y - C - I_d - I_g - G - net_capital_flows + RM
rc_error = Y - C - I_d - I_g - G - net_capital_flows + RM + foreign_aid

return rc_error

Expand Down
24 changes: 24 additions & 0 deletions ogcore/default_parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -954,6 +954,30 @@
}
}
},
"alpha_FA": {
"title": "Foreign aid payments to domestic government as a share of GDP",
"description": "Foreign aid payments to domestic government as a share of GDP.",
"short_description": "Foreign aid as a share of GDP",
"param_notation": "$\\alpha_{FA}$",
"section_1": "Fiscal Policy Parameters",
"section_2": "Fiscal Policy Parameters",
"notes": "",
"number_dims": 1,
"type": "float",
"value": [
{
"value": [
0.0
]
}
],
"validators": {
"range": {
"min": 0.0,
"max": 1.0
}
}
},
"alpha_RM_1": {
"title": "Exogenous ratio of aggregate remittances to GDP in current period (t=1)",
"description": "Exogenous ratio of aggregate remittances to GDP in current period (t=1).",
Expand Down
26 changes: 23 additions & 3 deletions ogcore/fiscal.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ def D_G_path(r, dg_fixed_values, p):
else:
G = p.alpha_G[: p.T] * Y[: p.T]

# direct foreign aid
foreign_aid = p.alpha_FA[: p.T] * Y[: p.T]

if p.budget_balance:
D = np.zeros(p.T + 1)
G = p.alpha_G[: p.T] * Y[: p.T]
Expand All @@ -116,6 +119,7 @@ def D_G_path(r, dg_fixed_values, p):
+ UBI_outlays[t - 1]
+ agg_pension_outlays[t - 1]
- total_tax_revenue[t - 1]
- foreign_aid[t - 1]
)
r_gov[t] = get_r_gov(r[t], D[t] / Y[t], p, method="scalar", t=t)
if (t >= p.tG1) and (t < p.tG2):
Expand All @@ -124,6 +128,7 @@ def D_G_path(r, dg_fixed_values, p):
* (p.rho_G * p.debt_ratio_ss * Y[t] + (1 - p.rho_G) * D[t])
- (1 + r_gov[t]) * D[t]
+ total_tax_revenue[t]
+ foreign_aid[t]
- agg_pension_outlays[t]
- I_g[t - 1]
- TR[t]
Expand All @@ -134,6 +139,7 @@ def D_G_path(r, dg_fixed_values, p):
growth[t + 1] * (p.debt_ratio_ss * Y[t])
- (1 + r_gov[t]) * D[t]
+ total_tax_revenue[t]
+ foreign_aid[t]
- agg_pension_outlays[t]
- I_g[t - 1]
- TR[t]
Expand All @@ -152,12 +158,14 @@ def D_G_path(r, dg_fixed_values, p):
+ UBI_outlays[t - 1]
+ agg_pension_outlays[t - 1]
- total_tax_revenue[t - 1]
- foreign_aid[t - 1]
)
r_gov[t] = get_r_gov(r[t], D[t] / Y[t], p, method="scalar", t=t)
G[t] = (
growth[t] * (p.debt_ratio_ss * Y[t])
- (1 + r_gov[t]) * D[t]
+ total_tax_revenue[t]
+ foreign_aid[t]
- agg_pension_outlays[t]
- I_g[t - 1]
- TR[t]
Expand All @@ -171,6 +179,7 @@ def D_G_path(r, dg_fixed_values, p):
+ UBI_outlays[t]
+ agg_pension_outlays[t]
- total_tax_revenue[t]
- foreign_aid[t]
)
D_ratio_max = np.amax(D[: p.T] / Y[: p.T])
print("Maximum debt ratio: ", D_ratio_max)
Expand Down Expand Up @@ -284,12 +293,14 @@ def get_G_ss(
G (tuple): steady-state government spending

"""
foreign_aid = p.alpha_FA[-1] * Y
if p.budget_balance:
G = p.alpha_G[-1] * Y
else:
G = (
total_tax_revenue
+ new_borrowing
+ foreign_aid
- (agg_pension_outlays + TR + debt_service + UBI_outlays + I_g)
)

Expand Down Expand Up @@ -346,7 +357,7 @@ def get_TR(
agg_pension_outlays (array_like): total government pension
outlays
UBI_outlays (array_like): total universal basic income (UBI) outlays
I_g (array_like): public infrastructure investement
I_g (array_like): public infrastructure investment
p (OG-Core Specifications object): model parameters
method (str): whether doing SS or TP calculation

Expand All @@ -355,8 +366,17 @@ def get_TR(

"""
if p.budget_balance:
if method == "SS":
foreign_aid = p.alpha_FA[-1] * Y
else:
foreign_aid = p.alpha_FA[: p.T] * Y[: p.T]
new_TR = (
total_tax_revenue - agg_pension_outlays - G - UBI_outlays - I_g
total_tax_revenue
+ foreign_aid
- agg_pension_outlays
- G
- UBI_outlays
- I_g
)
elif p.baseline_spending:
new_TR = p.alpha_bs_T[-1] * TR
Expand Down Expand Up @@ -422,7 +442,7 @@ def get_I_g(Y, Ig_baseline, p, method="SS"):
Args:
Y (array_like): aggregate output
Ig_baseline (array_like): public infrastructure investment in
the baseliine simulation
the baseline simulation
p (OG-Core Specifications object): model parameters
method (str): either 'SS' for steady-state or 'TPI' for transition path

Expand Down
Loading
Loading