Modeling foreign direct aid#1126
Open
jdebacker wants to merge 17 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements Issue #1123 by introducing a new time-varying parameter (alpha_FA) representing direct foreign assistance to the domestic government as a share of GDP, and wiring that flow into the government budget constraint and the economy-wide resource constraint.
Changes:
- Add
alpha_FAto default parameters and document it in the book. - Incorporate foreign aid flows into fiscal policy accounting (debt/spending/transfers) and into the SS/TPI resource constraint calculations.
- Adjust tests/docs around the updated equations and function signatures.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
ogcore/default_parameters.json |
Adds the new alpha_FA parameter definition and validation. |
ogcore/fiscal.py |
Applies foreign aid flows to government budget arithmetic (SS and time path). |
ogcore/aggregates.py |
Extends resource_constraint() to include foreign aid. |
ogcore/SS.py |
Passes SS foreign-aid vector into the resource constraint. |
ogcore/TPI.py |
Passes TPI foreign-aid path into the resource constraint. |
tests/test_fiscal.py |
Updates fiscal tests to set alpha_FA and includes a debug print. |
tests/test_aggregates.py |
Removes old commented-out code in the resource constraint test (but currently misses new arg). |
docs/book/content/theory/stationarization.md |
Updates stationarized government budget constraint equations to include foreign aid. |
docs/book/content/theory/government.md |
Updates government budget constraint equations/closure rules to include foreign aid. |
docs/book/content/intro/parameters.md |
Documents alpha_FA (and includes a couple parameter doc range tweaks). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1126 +/- ##
==========================================
- Coverage 73.25% 73.24% -0.02%
==========================================
Files 21 21
Lines 5242 5251 +9
==========================================
+ Hits 3840 3846 +6
- Misses 1402 1405 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses Issue #1123 by adding a parameter for direct foreign assistance (as a fraction of GDP) that contributes resources to the government.