Make interest rate on government debt a function of the debt to GDP ratio#1037
Make interest rate on government debt a function of the debt to GDP ratio#1037rickecon merged 49 commits intoPSLmodels:masterfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1037 +/- ##
==========================================
- Coverage 73.19% 73.01% -0.19%
==========================================
Files 21 21
Lines 5137 5143 +6
==========================================
- Hits 3760 3755 -5
- Misses 1377 1388 +11
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
@rickecon, This PR is ready for your review. |
|
@jdebacker. Thanks for submitting this PR. Great update. Here is one suggestion and two questions.
|
ogcore/TPI.py
Outdated
|
|
||
| # Compute other interest rates | ||
| r_gov = fiscal.get_r_gov(r, p, "TPI") | ||
| r_gov = fiscal.get_r_gov(r, 0, p, "TPI") |
There was a problem hiding this comment.
@jdebacker. Why is the DY_ratio argument in this line equal to 0? You have the D and the Y series above.
There was a problem hiding this comment.
I've updated this to take the initial guess at the debt to GDP path (although since these are initial guesses, they shouldn't affect the model solution, but make affect the time to convergence).
|
Still a couple tests that I expect to pass failing locally: In both cases, it's a diff in |
|
All tests pass locally: @rickecon This PR is ready for review. |
|
@jdebacker. I don't understand the 4 errors in |
|
@rickecon I see the issue, Pandas 3.0.0 (released yesterday) now treats Numpy arrays created from |
|
@jdebacker. This looks great. Thanks for adding those |
Since the risk premium of governments may vary with the amount of debt they accumulate, this PR updates the
$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$
fiscal.get_r_govfunction to allow it to vary with the debt to GDP ratio in a quadratic manner. The new specification adds to parameters to the function determiningr_gov. The new function is:In the code$\beta_1$ maps to $\beta_2$ maps to
r_gov_DYandr_gov_DY2to avoid confusion with the rate of time preference.