You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR updates OG-Core with a new parameter, baseline_theta. If baseline_theta=True, then the reform run uses the same replacement rate in the Social Security pension system as was computed in the baseline simulation.
❌ Patch coverage is 33.87097% with 41 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.92%. Comparing base (cb0e9df) to head (f9e34c1). ⚠️ Report is 131 commits behind head on master.
@jdebacker. This breaks when doing the reform simulation. I got the following traceback after a run finished the baseline TPI solution and moved to the reform SS solution.
File "/opt/anaconda3/envs/ss-maxben-j-dev/lib/python3.13/site-packages/ogcore/SS.py", line 66, in euler_equation_solver
error1 = household.FOC_savings(
r,
...<17 lines>...
"SS",
)
File "/opt/anaconda3/envs/ss-maxben-j-dev/lib/python3.13/site-packages/ogcore/household.py", line 494, in FOC_savings
taxes = tax.net_taxes(
r,
...<14 lines>...
p,
)
File "/opt/anaconda3/envs/ss-maxben-j-dev/lib/python3.13/site-packages/ogcore/tax.py", line 285, in net_taxes
pension = pensions.pension_amount(
r, w, n, 1, theta, t, j, shift, method, e, factor, p
)
File "/opt/anaconda3/envs/ss-maxben-j-dev/lib/python3.13/site-packages/ogcore/pensions.py", line 98, in pension_amount
pension = SS_amount(w, n, theta, t, j, shift, method, e, p)
File "/opt/anaconda3/envs/ss-maxben-j-dev/lib/python3.13/site-packages/ogcore/pensions.py", line 159, in SS_amount
pension[p.retire[-1] :] = replace_rate_adjust * theta * w
~~~~~~~^^^^^^^^^^^^^^^^
ValueError: could not broadcast input array from shape (7,) into shape (36,)
@rickecon Good catch on the error above. I fixed the case for baseline_theta=True and j not None in pensions.replacement_rate_vals. I also added a test to cover this case.
@jdebacker. I pulled this branch, updated the conda environment, and ran the run_ogcore_example.py script. Script ran smoothly through all phases of baseline and reform, steady state and time path. I am merging this.
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
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 updates OG-Core with a new parameter,
baseline_theta. Ifbaseline_theta=True, then the reform run uses the same replacement rate in the Social Security pension system as was computed in the baseline simulation.