Skip to content

Commit 005ee38

Browse files
committed
sync with master
2 parents 0d20376 + e0d0972 commit 005ee38

54 files changed

Lines changed: 1050284 additions & 1050656 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,59 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.15.3] - 2025-01-24 12:00:00
89

10+
### Added
11+
12+
- Two new parameters, `income_tax_filer` and `wealth_tax_filer`, that determine whether certain types `j` pay income or wealth taxes, respectively. See PR [#1084](https://github.com/PSLmodels/OG-Core/pull/1084)
13+
14+
## [0.15.2] - 2025-01-22 12:00:00
15+
16+
### Added
17+
18+
- Two new parameters, `r_gov_DY` and `r_gov_DY2`, that allow the government interest rate to be a function of the debt-to-GDP ratio. See PR [#1037](https://github.com/PSLmodels/OG-Core/pull/1037)
19+
20+
## [0.15.1] - 2026-01-19 12:00:00
21+
22+
### Added
23+
24+
- A new parameter `c_min` to the `Parameters` class that allows the user to specify minium consumption amounts by consumption good. See PR [#1085](https://github.com/PSLmodels/OG-Core/pull/1085)
25+
26+
## [0.15.0] - 2025-12-03 12:00:00
27+
28+
### Added
29+
30+
- A new parameter `baseline_theta` to the `Parameters` class that allows the user to specify whether to use the steady-state replacement rate parameters from the baseline solution in a reform run. See PR [#1077](https://github.com/PSLmodels/OG-Core/pull/1077)
31+
32+
## [0.14.14] - 2025-11-24 12:00:00
33+
34+
### Added
35+
36+
- Create `SS.SS_initial_guesses` function to allow more flexible initial guesses for steady state solution ((PR #1061)[https://github.com/PSLmodels/OG-Core/pull/1061])
37+
- Robust steady-state solution used for reform solution ((PR #1061)[https://github.com/PSLmodels/OG-Core/pull/1061])
38+
- Test of `SS.solve_for_j` function ((PR #1061)[https://github.com/PSLmodels/OG-Core/pull/1061])
39+
40+
### Bug Fix
41+
- Fixes to deprecated API calls avoid many warnings during testing ((PR #1061)[https://github.com/PSLmodels/OG-Core/pull/1061])
42+
43+
## [0.14.13] - 2025-11-21 12:00:00
44+
45+
### Bug Fix
46+
47+
- Fix calculation of consumption tax revenue with differentiated goods ((PR #1074)[https://github.com/PSLmodels/OG-Core/pull/1074])
48+
49+
## [0.14.12] - 2025-11-07 12:00:00
50+
51+
### Bug Fix
52+
53+
- Use data for pre-time path population distribution (rather than inferring it) ([PR #1071](https://github.com/PSLmodels/OG-Core/pull/1071))
54+
55+
## [0.14.11] - 2025-11-07 12:00:00
56+
57+
### Added
58+
59+
- Adds Ethiopia demographic data mapping ((PR #1063)[https://github.com/PSLmodels/OG-Core/pull/1063])
60+
-
961
## [0.14.10] - 2025-09-11 12:00:00
1062

1163
### Added
@@ -453,6 +505,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
453505
- 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.
454506

455507

508+
[0.15.3]: https://github.com/PSLmodels/OG-Core/compare/v0.15.2...v0.15.3
509+
[0.15.2]: https://github.com/PSLmodels/OG-Core/compare/v0.15.1...v0.15.2
510+
[0.15.1]: https://github.com/PSLmodels/OG-Core/compare/v0.15.0...v0.15.1
511+
[0.15.0]: https://github.com/PSLmodels/OG-Core/compare/v0.14.14...v0.15.0
512+
[0.14.14]: https://github.com/PSLmodels/OG-Core/compare/v0.14.13...v0.14.14
513+
[0.14.13]: https://github.com/PSLmodels/OG-Core/compare/v0.14.12...v0.14.13
514+
[0.14.12]: https://github.com/PSLmodels/OG-Core/compare/v0.14.11...v0.14.12
515+
[0.14.11]: https://github.com/PSLmodels/OG-Core/compare/v0.14.10...v0.14.11
456516
[0.14.10]: https://github.com/PSLmodels/OG-Core/compare/v0.14.9...v0.14.10
457517
[0.14.9]: https://github.com/PSLmodels/OG-Core/compare/v0.14.8...v0.14.9
458518
[0.14.8]: https://github.com/PSLmodels/OG-Core/compare/v0.14.7...v0.14.8

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
| | |
44
| --- | --- |
5-
| Org | [![PSL cataloged](https://img.shields.io/badge/PSL-cataloged-a0a0a0.svg)](https://www.PSLmodels.org) [![OS License: CCO-1.0](https://img.shields.io/badge/OS%20License-CCO%201.0-yellow)](https://github.com/PSLmodels/OG-Core/blob/master/LICENSE) [![Jupyter Book Badge](https://jupyterbook.org/badge.svg)](https://pslmodels.github.io/OG-Core/) |
5+
| Org | [![PSL cataloged](https://img.shields.io/badge/PSL-cataloged-a0a0a0.svg)](https://www.PSLmodels.org) [![OS License: CCO-1.0](https://img.shields.io/badge/OS%20License-CCO%201.0-yellow)](https://github.com/PSLmodels/OG-Core/blob/master/LICENSE) [![Jupyter Book Badge](https://raw.githubusercontent.com/jupyter-book/jupyter-book/next/docs/media/images/badge.svg)](https://pslmodels.github.io/OG-Core/) |
66
| Package | [![Python 3.12](https://img.shields.io/badge/python-3.12-blue.svg)](https://www.python.org/downloads/release/python-3129/) [![Python 3.13](https://img.shields.io/badge/python-3.13-blue.svg)](https://www.python.org/downloads/release/python-3137/) [![PyPI Latest Release](https://img.shields.io/pypi/v/ogcore.svg)](https://pypi.org/project/ogcore/) [![PyPI Downloads](https://img.shields.io/pypi/dm/ogcore.svg?label=PyPI%20downloads)](https://pypi.org/project/ogcore/) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) |
77
| Testing | ![example event parameter](https://github.com/PSLmodels/OG-Core/actions/workflows/build_and_test.yml/badge.svg?branch=master) ![example event parameter](https://github.com/PSLmodels/OG-Core/actions/workflows/deploy_docs.yml/badge.svg?branch=master) ![example event parameter](https://github.com/PSLmodels/OG-Core/actions/workflows/check_black.yml/badge.svg?branch=master) [![Codecov](https://codecov.io/gh/PSLmodels/OG-Core/branch/master/graph/badge.svg)](https://codecov.io/gh/PSLmodels/OG-Core) |
88

@@ -12,8 +12,8 @@ OG-Core is an overlapping-generations (OG) model core theory, logic, and solutio
1212
**Country calibrations of OG-Core**
1313
| | | |
1414
| :-----------: | :---------: | :---------: |
15-
| United States, [OG-USA](https://github.com/PSLmodels/OG-USA) | United Kingdom, [OG-UK](https://github.com/PSLmodels/OG-USA) | |
16-
| Phillipines, [OG-PHL](https://github.com/EAPD-DRB/OG-PHL) | South Africa, [OG-ZAF](https://github.com/EAPD-DRB/OG-ZAF) | Indonesia, [OG-IDN](https://github.com/EAPD-DRB/OG-IDN) |
15+
| United States, [OG-USA](https://github.com/PSLmodels/OG-USA) | United Kingdom, [OG-UK](https://github.com/PSLmodels/OG-USA) | Phillipines, [OG-PHL](https://github.com/EAPD-DRB/OG-PHL) |
16+
| South Africa, [OG-ZAF](https://github.com/EAPD-DRB/OG-ZAF) | Indonesia, [OG-IDN](https://github.com/EAPD-DRB/OG-IDN) | Ethiopia, [OG-ETH](https://github.com/EAPD-DRB/OG-ETH) |
1717
| India, [OG-IND](https://github.com/OpenSourceEcon/OG-IND) | Malaysia, [OG-MYS](https://github.com/OpenSourceEcon/OG-MYS) | |
1818

1919

docs/book/content/intro/intro.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
| | |
55
| --- | --- |
6-
| Org | [![PSL cataloged](https://img.shields.io/badge/PSL-cataloged-a0a0a0.svg)](https://www.PSLmodels.org) [![OS License: CCO-1.0](https://img.shields.io/badge/OS%20License-CCO%201.0-yellow)](https://github.com/PSLmodels/OG-Core/blob/master/LICENSE) [![Jupyter Book Badge](https://jupyterbook.org/badge.svg)](https://pslmodels.github.io/OG-Core/) |
6+
| Org | [![PSL cataloged](https://img.shields.io/badge/PSL-cataloged-a0a0a0.svg)](https://www.PSLmodels.org) [![OS License: CCO-1.0](https://img.shields.io/badge/OS%20License-CCO%201.0-yellow)](https://github.com/PSLmodels/OG-Core/blob/master/LICENSE) [![Jupyter Book Badge](https://raw.githubusercontent.com/jupyter-book/jupyter-book/next/docs/media/images/badge.svg)](https://pslmodels.github.io/OG-Core/) |
77
| Package | [![Python 3.12](https://img.shields.io/badge/python-3.12-blue.svg)](https://www.python.org/downloads/release/python-3129/) [![Python 3.13](https://img.shields.io/badge/python-3.13-blue.svg)](https://www.python.org/downloads/release/python-3137/) [![PyPI Latest Release](https://img.shields.io/pypi/v/ogcore.svg)](https://pypi.org/project/ogcore/) [![PyPI Downloads](https://img.shields.io/pypi/dm/ogcore.svg?label=PyPI%20downloads)](https://pypi.org/project/ogcore/) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) |
88
| Testing | ![example event parameter](https://github.com/PSLmodels/OG-Core/actions/workflows/build_and_test.yml/badge.svg?branch=master) ![example event parameter](https://github.com/PSLmodels/OG-Core/actions/workflows/deploy_docs.yml/badge.svg?branch=master) ![example event parameter](https://github.com/PSLmodels/OG-Core/actions/workflows/check_black.yml/badge.svg?branch=master) [![Codecov](https://codecov.io/gh/PSLmodels/OG-Core/branch/master/graph/badge.svg)](https://codecov.io/gh/PSLmodels/OG-Core) |
99

@@ -12,8 +12,8 @@
1212
**Country calibrations of OG-Core**
1313
| | | |
1414
| :-----------: | :---------: | :---------: |
15-
| United States, [OG-USA](https://github.com/PSLmodels/OG-USA) | United Kingdom, [OG-UK](https://github.com/PSLmodels/OG-USA) | |
16-
| Phillipines, [OG-PHL](https://github.com/EAPD-DRB/OG-PHL) | South Africa, [OG-ZAF](https://github.com/EAPD-DRB/OG-ZAF) | Indonesia, [OG-IDN](https://github.com/EAPD-DRB/OG-IDN) |
15+
| United States, [OG-USA](https://github.com/PSLmodels/OG-USA) | United Kingdom, [OG-UK](https://github.com/PSLmodels/OG-USA) | Phillipines, [OG-PHL](https://github.com/EAPD-DRB/OG-PHL) |
16+
| South Africa, [OG-ZAF](https://github.com/EAPD-DRB/OG-ZAF) | Indonesia, [OG-IDN](https://github.com/EAPD-DRB/OG-IDN) | Ethiopia, [OG-ETH](https://github.com/EAPD-DRB/OG-ETH) |
1717
| India, [OG-IND](https://github.com/OpenSourceEcon/OG-IND) | Malaysia, [OG-MYS](https://github.com/OpenSourceEcon/OG-MYS) | |
1818

1919
The model output focuses changes in macroeconomic aggregates (GDP, investment, consumption), wages, interest rates, and the stream of tax revenues over time. Although `OG-Core` can be run independently based on default parameter values (currently representing something similar to the United States), it is meant to be a dependency of a country-specific calibration. This documentation contains the following major sections, which are regularly updated.

docs/book/content/intro/parameters.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ _Valid Range:_ min = 0.0 and max = 1.0
4343
_Out-of-Range Action:_ error
4444

4545

46+
#### `c_min`
47+
_Description:_ Minimum consumption levels for each good in the composite consumption good.
48+
_Notes:_ Enter this value in model units.
49+
_Value Type:_ float
50+
_Valid Range:_ min = 0.0 and max = 100.0
51+
_Out-of-Range Action:_ error
52+
53+
4654
#### `chi_b`
4755
_Description:_ Household utility weight on bequests.
4856
_Value Type:_ float
@@ -114,6 +122,7 @@ _Out-of-Range Action:_ error
114122
#### `use_zeta`
115123
_Description:_ Indicator variable for whether or not to use the zeta matrix to distribute bequests.
116124
_Value Type:_ bool
125+
_Valid Choices:_[True, False]
117126

118127

119128
### Model Dimensions
@@ -395,6 +404,12 @@ _Valid Range:_ min = 0.0 and max = 10.0
395404
_Out-of-Range Action:_ error
396405

397406

407+
#### `baseline_theta`
408+
_Description:_ Flag for use in reform simulations to keep Social Security system replacement rate constant between baseline and reform runs.
409+
_Value Type:_ bool
410+
_Valid Choices:_[True, False]
411+
412+
398413
### Spending
399414

400415
#### `alpha_T`
@@ -586,21 +601,25 @@ _Out-of-Range Action:_ error
586601
#### `constant_rates`
587602
_Description:_ Flag to use linear tax functions.
588603
_Value Type:_ bool
604+
_Valid Choices:_[True, False]
589605

590606

591607
#### `zero_taxes`
592608
_Description:_ Flag to run model without any individual income taxes.
593609
_Value Type:_ bool
610+
_Valid Choices:_[True, False]
594611

595612

596613
#### `analytical_mtrs`
597614
_Description:_ Flag to use analytically derived marginal tax rates in tax functions.
598615
_Value Type:_ bool
616+
_Valid Choices:_[True, False]
599617

600618

601619
#### `age_specific`
602620
_Description:_ Flag to use analytically derived marginal tax rates in tax functions.
603621
_Value Type:_ bool
622+
_Valid Choices:_[True, False]
604623

605624

606625
#### `tax_func_type`
@@ -730,6 +749,7 @@ _Out-of-Range Action:_ error
730749
_Description:_ Use constant demographics.
731750
_Notes:_ This boolean allows one to use empirical mortality rates, but keep the population distribution constant across periods. Note that immigration is shut off when this is true.
732751
_Value Type:_ bool
752+
_Valid Choices:_[True, False]
733753

734754

735755
#### `omega`
@@ -842,6 +862,7 @@ _Out-of-Range Action:_ error
842862
#### `reform_use_baseline_solution`
843863
_Description:_ Whether or not the baseline SS solution is used for starting values when solving the reform.
844864
_Value Type:_ bool
865+
_Valid Choices:_[True, False]
845866

846867

847868
#### `initial_guess_r_SS`

docs/book/content/theory/government.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ Total pension spending is the sum of the pension payments to each household in t
542542
(SecUBI_NonGrowthAdj)=
543543
###### UBI specification not adjusted for economic growth
544544

545-
A non-growth adjusted UBI (`ubi_growthadj = False`) is one in which the initial nonstationary nominal-valued $t=0$ UBI matrix $ubi^{\$}_{j,s,t=0}$ does not grow, while the economy's long-run growth rate is $g_y$ for the most common parameterization is positive ($g_y>0$).
545+
A non-growth adjusted UBI (`ubi_growthadj = False`) is one in which the initial nonstationary nominal-valued $t=0$ UBI matrix $ubi^{nom}_{j,s,t=0}$ does not grow, while the economy's long-run growth rate is $g_y$ for the most common parameterization is positive ($g_y>0$).
546546

547547
```{math}
548548
:label: EqUBIubi_nom_NonGrwAdj_jst
@@ -667,14 +667,14 @@ Note that the budget closure rule (described in Section ref{`SecUnbalGBCcloseRul
667667
(SecRateWedge)=
668668
## Interest Rate on Government Debt and Household Savings
669669

670-
Despite the model having no aggregate risk, it may be helpful to build in an interest rate differential between the rate of return on private capital and the interest rate on government debt. Doing so helps to add realism by including a risk premium. `OG-Core` allows users to set an exogenous wedge between these two rates. The interest rate on government debt,
670+
Despite the model having no aggregate risk, it may be helpful to build in an interest rate differential between the rate of return on private capital and the interest rate on government debt. Doing so helps to add realism by including a risk premium. `OG-Core` allows users to set an exogenous wedge between these two rates. `OG-Core` also allows for the risk premium on debt to be a quadratic function of the debt-to-GDP ratio. The interest rate on government debt is given by:
671671

672672
```{math}
673673
:label: EqUnbalGBC_rate_wedge
674-
r_{gov, t} = (1 - \tau_{d, t})r_{t} - \mu_{d}
674+
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
675675
```
676676

677-
where $r_t$ is the marginal product of capital faced by firms. The two parameters, $\tau_{d,t}$ and $\mu_{d,t}$ can be used to allow for a government interest rate that is a percentage hair cut from the market rate or a government interest rate with a constant risk premium.
677+
where $r_t$ is the marginal product of capital faced by firms. The two parameters, $\tau_{d,t}$ and $\mu_{d,t}$ can be used to allow for a government interest rate that is a percentage hair cut from the market rate or a government interest rate with a constant risk premium. The parameters $\beta_1$ and $\beta_2$ can be used to allow for a quadratic risk premium on government debt that is a function of the debt-to-GDP ratio.
678678

679679

680680
(SecUnbalGBCcloseRule)=

docs/make_params.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import os
66
import sys
77

8-
98
CURDIR_PATH = os.path.abspath(os.path.dirname(__file__))
109
OGCORE_PATH = os.path.join(CURDIR_PATH, "..", "ogcore")
1110
TEMPLATE_PATH = os.path.join(CURDIR_PATH, "templates")

docs/make_vars.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import os
66
import sys
77

8-
98
CURDIR_PATH = os.path.abspath(os.path.dirname(__file__))
109
OGCORE_PATH = os.path.join(CURDIR_PATH, "..", "ogcore")
1110
TEMPLATE_PATH = os.path.join(CURDIR_PATH, "templates")
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Model variables
2+
=================
3+
4+
This section summarizes variables output from the model in a format
5+
that is easy to search and print.
6+
The model variables are grouped together in common categories and are
7+
available in both the dictionaries of steady-state and transition-path
8+
output, unless noted otherwise in these docs.
9+

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dependencies:
1919
- sphinxcontrib-bibtex>=2.0.0
2020
- sphinx-math-dollar
2121
- pydata-sphinx-theme
22-
- jupyter-book>=0.11.3
22+
- jupyter-book<2.0.0
2323
- jupyter
2424
- pytest>=6.0
2525
- pytest-cov

examples/multi_industry_example.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import matplotlib.pyplot as plt
2020
import ogcore
2121

22-
2322
ogcore.TPI.ENFORCE_SOLUTION_CHECKS = False
2423

2524
# Use a custom matplotlib style file for plots

0 commit comments

Comments
 (0)