Skip to content

Create J=7 and J=10 default parameters JSON files#143

Open
rickecon wants to merge 8 commits intoPSLmodels:masterfrom
rickecon:j7
Open

Create J=7 and J=10 default parameters JSON files#143
rickecon wants to merge 8 commits intoPSLmodels:masterfrom
rickecon:j7

Conversation

@rickecon
Copy link
Member

@rickecon rickecon commented Jan 6, 2026

This PR:

  • Updates ogusa_default_parameters_j10 and ogusa_default_parameters_j7
  • Sets run_ogusa.py example run script to use ogusa_default_parameters_j7
  • Sets jupyter-book<2.0.0 in environment.yml
  • Updates copyright to 2026 in _config.yml

cc: @jdebacker

@rickecon
Copy link
Member Author

rickecon commented Jan 6, 2026

@jdebacker. I ran the run_ogusa.py example script which uses the new ogusa_default_parameters_j7.json file, and all pieces ran well (see output below). The only weird thing is that both steady-state solutions have the warning that "The combination of the tax policy you specified and your target debt-to-GDP ratio results in an infeasible amount of government spending in order to close the budget (i.e., G < 0)." But the output plots all look good.

BASELINE STEADY STATE OUTPUT

GE loop errors = ['-2.345e-14', '-4.287e-14', '3.335e-13', '0.000e+00', '1.380e-13', '1.223e-14', '8.979e-15', '-2.956e-14', '8.807e-15', '8.892e-15', '-6.143e-14', '1.885e-13', '1.382e-14', '-2.975e-14']
Iteration: 1  Distance: 1.818785895916384e-11
SS debt = 1.4450482903476964, 0.009428600029611354
IO: (1, 1), C: (1,)
Foreign debt holdings = 0.5780193161390786
Foreign capital holdings = 0.7079711621113451
resource constraint: [-2.52992072e-14]
Steady state government spending is negative to satisfy budget
Checking constraints on capital, labor, and consumption.
There were no violations of the constraints on labor supply.
There were no violations of the constraints on consumption.
Maximum error in labor FOC = 1.98507876802978e-13
Maximum error in savings FOC = 8.393286066166183e-14
/opt/anaconda3/envs/ogusa-dev/lib/python3.13/site-packages/ogcore/SS.py:1586: UserWarning: Warning: The combination of the tax policy you specified and your target debt-to-GDP ratio results in an infeasible amount of government spending in order to close the budget (i.e., G < 0)
  warnings.warn(
JUST SAVED SS output to  /Users/richardevans/Docs/Economics/OSE/OG/OG-USA/examples/Example/OUTPUT_BASELINE/SS/SS_vars.pkl

BASELINE TPI OUTPUT (22 min 57.0 sec)

Maximum debt ratio:  2.37528943123774
w diff: 1.8841688034232362e-06, -4.1571596054446047e-07
r diff: 5.551142762127981e-08, -2.3438898834327038e-07
r_p diff: 3.81142645916599e-09, -1.2925466144619868e-07
p_m diff: 0.0, 0.0
BQ diff: 1.575120338187519e-07, -9.060161364204955e-09
TR diff: 3.9154495035109704e-08, -1.3422945839558498e-07
Iteration: 23
Distance: 7.061981347201567e-06
Max absolute value resource constraint error: 1.3936342946191393e-06
Checking time path for violations of constraints.
Max Euler error, savings: 1.9012569296705806e-12
Max Euler error labor supply: 8.473222123939195e-13
Time path iteration complete.
It took 1376.949385881424 seconds to get that part done.
run time =  1376.952320098877

REFORM STEADY STATE OUTPUT

GE loop errors = ['-6.245e-17', '-2.220e-16', '0.000e+00', '0.000e+00', '-3.109e-15', '5.369e-15', '3.601e-15', '3.598e-15', '1.815e-15', '7.112e-15', '-3.410e-15', '9.012e-16', '-3.053e-16']
Iteration: 1  Distance: 2.231492983175023e-13
SS debt = 1.4339960863452266, 0.009356486999423357
IO: (1, 1), C: (1,)
Foreign debt holdings = 0.5735984345380907
Foreign capital holdings = 0.6717956684392964
resource constraint: [-3.19744231e-14]
Steady state government spending is negative to satisfy budget
Checking constraints on capital, labor, and consumption.
There were no violations of the constraints on labor supply.
There were no violations of the constraints on consumption.
Maximum error in labor FOC = 1.8740564655672642e-13
Maximum error in savings FOC = 9.14823772291129e-14
/opt/anaconda3/envs/ogusa-dev/lib/python3.13/site-packages/ogcore/SS.py:1586: UserWarning: Warning: The combination of the tax policy you specified and your target debt-to-GDP ratio results in an infeasible amount of government spending in order to close the budget (i.e., G < 0)
  warnings.warn(
JUST SAVED SS output to  /Users/richardevans/Docs/Economics/OSE/OG/OG-USA/examples/Example/OUTPUT_REFORM/SS/SS_vars.pkl

REFORM TPI OUTPUT (23 min 59.2 sec)

Maximum debt ratio:  2.2538409820956846
w diff: 1.8927770917276376e-06, -3.878258494349751e-07
r diff: 5.142087338566581e-08, -2.3501141069304232e-07
r_p diff: 2.6532497240938646e-09, -1.2863901326098937e-07
p_m diff: 0.0, 0.0
BQ diff: 1.5609311275130433e-07, -8.920426917968793e-09
TR diff: 3.7856555196169595e-08, -1.2995995299358576e-07
Iteration: 23
Distance: 7.0832305178882486e-06
Max absolute value resource constraint error: 1.3828157817002973e-06
Checking time path for violations of constraints.
Max Euler error, savings: 2.0239365738916604e-12
Max Euler error labor supply: 7.980283101005625e-13
Time path iteration complete.
It took 1439.2077939510345 seconds to get that part done.
run time =  1439.2101199626923
Percentage changes in aggregates: Year                    Variable  2026  2027  2028  2029  2030  2031  2032  2033  2034  2035  2026-2035    SS
0                    GDP ($Y_t$) -0.89 -0.85 -0.80 -0.77 -0.73 -0.69 -0.65 -0.63 -0.62 -0.60      -0.72 -0.76
1            Consumption ($C_t$) -0.35 -0.55 -0.41 -0.49 -0.52 -0.54 -0.56 -0.57 -0.57 -0.58      -0.51 -0.89
2          Capital Stock ($K_t$) -2.14 -2.12 -2.06 -2.01 -1.96 -1.89 -1.82 -1.80 -1.77 -1.73      -1.93 -2.33
3                  Labor ($L_t$) -0.12 -0.07 -0.03  0.00  0.03  0.06  0.08  0.09  0.10  0.10       0.02  0.21
4     Real interest rate ($r_t$) -2.05 -1.94 -1.86 -1.78 -1.73 -1.68 -1.65 -1.67 -1.69 -1.72      -1.77 -0.90
5            Wage rate ($w_{t}$) -0.78 -0.78 -0.78 -0.77 -0.76 -0.74 -0.73 -0.72 -0.71 -0.70      -0.75 -0.97

@rickecon
Copy link
Member Author

rickecon commented Jan 6, 2026

@jdebacker. I am currently getting one test failure in the GH Actions and six test failures when I run the entire set of tests on my local machine. I'll try to work on these later today.

(ogusa-dev) richardevans@MacBookPro OG-USA % pytest
============================= test session starts ==============================
platform darwin -- Python 3.13.11, pytest-9.0.2, pluggy-1.6.0
rootdir: /Users/richardevans/Docs/Economics/OSE/OG/OG-USA
configfile: pytest.ini
testpaths: ./tests
plugins: anyio-4.12.0, xdist-3.8.0, cov-7.0.0
collected 38 items                                                             

tests/test_calibrate.py ....                                             [ 10%]
tests/test_get_micro_data.py ..FF.....FF....                             [ 50%]
tests/test_income.py ...F........                                        [ 81%]
tests/test_psid_data_setup.py ...                                        [ 89%]
tests/test_run_example.py .                                              [ 92%]
tests/test_utils.py F                                                    [ 94%]
tests/test_wealth.py ..                                                  [100%]

=========================== short test summary info ============================
FAILED tests/test_get_micro_data.py::test_puf_path - AttributeError: 'Records' object has no attribute '_Data__data_year'
FAILED tests/test_get_micro_data.py::test_tmd_path - AssertionError: Regex pattern did not match.
FAILED tests/test_get_micro_data.py::test_get_calculator_puf - AttributeError: 'Records' object has no attribute '_Data__data_year'
FAILED tests/test_get_micro_data.py::test_get_calculator_puf_from_file - AttributeError: 'Records' object has no attribute '_Data__data_year'
FAILED tests/test_income.py::test_arctan_fit - assert False
FAILED tests/test_utils.py::test_read_cbo_forecast - urllib.error.HTTPError: HTTP Error 403: Forbidden
============ 6 failed, 32 passed, 44 warnings in 502.21s (0:08:22) =============

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant