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
OG-Core is an overlapping-generations (OG) model core theory, logic, and solution method algorithms that allow for dynamic general equilibrium analysis of fiscal policy. OG-Core provides a general framework and is a dependency of several country-specific OG model caliibrations, as listed in the table belowsuch as [OG-USA](https://github.com/PSLmodels/OG-USA) and [OG-UK](https://github.com/PSLmodels/OG-UK). The model output includes changes in macroeconomic aggregates (GDP, investment, consumption), wages, interest rates, and the stream of tax revenues over time. Regularly updated documentation of the model theory--its output, and solution method--and the Python API is available [here](https://pslmodels.github.io/OG-Core).
@@ -24,13 +24,12 @@ The model is constantly under development, and model components could change sig
24
24
25
25
## Using/contributing to OG-Core
26
26
27
-
There are two primary methods for installing and running OG-Core on your computer locally. The first and simplest method is to download the most recent `ogcore` Python package from the Python Package Index ([PyPI.org]()). A second option is to fork and clone the most recent version of OG-Core from its GitHub repository and create the conda environment for the `ogcore` package. We detail both of these methods below.
27
+
There are two primary methods for installing and running OG-Core on your computer locally. The first and simplest method is to download the most recent `ogcore` Python package from the Python Package Index ([PyPI.org](https://pypi.org/project/ogcore/)). A second option is to fork and clone the most recent version of OG-Core from its GitHub repository and install the `ogcore` package with its development dependencies using `uv`. We detail both of these methods below.
28
28
29
29
30
30
### Installing and Running OG-Core from Python Package Index (PyPI.org)
31
31
32
-
* Open your terminal (or Conda command prompt), and make sure you have the most recent version of `pip` (the Python Index Package manager) by typing on a Unix/macOS machine `python3 -m pip install --upgrade pip` or on a Windows machine `py -m pip install --upgrade pip`.
33
-
* Install the [`ogcore`](https://pypi.org/project/ogcore/) package from the Python Package Index by typing `pip install ogcore`.
32
+
* Open your terminal and install the [`ogcore`](https://pypi.org/project/ogcore/) package from the Python Package Index by typing `pip install ogcore`.
34
33
* Navigate to a folder `./YourFolderName/` where you want to save scripts to run OG-Core and output from the simulations in those scripts.
35
34
* Save the python script [`run_ogcore_example.py`](https://github.com/PSLmodels/OG-Core/blob/master/run_examples/run_ogcore_example.py) from the OG-Core GitHub repository in the folder where you are working on your local machine `./YourFolderName/run_ogcore_example.py`.
36
35
* Run the model with an example reform from terminal/command prompt by typing `python run_ogcore_example.py`
@@ -60,13 +59,11 @@ The CSV output file `./ogcore_example_output.csv` can be compared to the [`./run
60
59
61
60
### Installing and Running OG-Core from GitHub repository
62
61
63
-
* Install the [Anaconda distribution](https://www.anaconda.com/distribution/) of Python
62
+
* Install [`uv`](https://docs.astral.sh/uv/) by following the [installation instructions](https://docs.astral.sh/uv/getting-started/installation/) for your platform (or simply run `pip install uv`)
64
63
* Clone this repository to a directory on your computer
65
-
* From the terminal (or Conda command prompt), navigate to the directory to which you cloned this repository and run `conda env create -f environment.yml`
66
-
* Then, `conda activate ogcore-dev`
67
-
* Then install by `pip install -e .`
64
+
* From the terminal, navigate to the directory to which you cloned this repository and run `uv pip install -e ".[dev]"` to install the package and all development dependencies
68
65
* Navigate to `./run_examples`
69
-
* Run the model with an example reform from terminal/command prompt by typing `python run_ogcore_example.py`
66
+
* Run the model with an example reform from terminal/command prompt by typing `uv run python run_ogcore_example.py`
70
67
* You can adjust the `./run_examples/run_ogcore_example.py` script by modifying model parameters specified in the `og_spec` dictionary.
71
68
* Model outputs will be saved in the following files:
Copy file name to clipboardExpand all lines: docs/book/content/intro/parameters.md
+33-2Lines changed: 33 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -434,7 +434,8 @@ _Out-of-Range Action:_ error
434
434
435
435
436
436
#### `infra_investment_leakage_rate`
437
-
_Description:_ Fraction of government infrastructure investment lost to leakage (e.g., corruption or other frictions) and treated as deadweight loss. Only $(1 - \phi_g)$ of investment enters the public capital stock.
437
+
_Description:_ Fraction of government infrastructure investment lost to leakage (e.g., corruption or other frictions) and treated as deadweight loss. Only (1 - infra_investment_leakage_rate) * I_g enters the public capital stock.
438
+
_Notes:_ A value of 0.0 (default) implies no leakage. A value of 0.2 implies 20% of infrastructure spending is lost before entering the public capital stock.
438
439
_Value Type:_ float
439
440
_Valid Range:_ min = 0.0 and max = 1.0
440
441
_Out-of-Range Action:_ error
@@ -651,6 +652,22 @@ _Valid Range:_ min = 0.0 and max = 1.0
651
652
_Out-of-Range Action:_ error
652
653
653
654
655
+
#### `income_tax_filer`
656
+
_Description:_ Binary indicator for whether lifetime income type j is subject to income taxes. Non-filers (tax_filer[j]=0) are not subject to income taxes but still pay payroll taxes.
657
+
_Notes:_ Specified by time T and lifetime income group J. Defaults to 1.0 (all groups file). Can be set to values between 0 and 1 to represent the share of group j that files.
658
+
_Value Type:_ float
659
+
_Valid Range:_ min = 0.0 and max = 1.0
660
+
_Out-of-Range Action:_ error
661
+
662
+
663
+
#### `wealth_tax_filer`
664
+
_Description:_ Binary indicator for whether lifetime income type j is subject to wealth taxes. Non-filers (wealth_tax_filer[j]=0) are not subject to wealth taxes but still pay payroll taxes.
665
+
_Notes:_ Specified by time T and lifetime income group J. Defaults to 1.0 (all groups file). Can be set to values between 0 and 1 to represent the share of group j that files.
666
+
_Value Type:_ float
667
+
_Valid Range:_ min = 0.0 and max = 1.0
668
+
_Out-of-Range Action:_ error
669
+
670
+
654
671
#### `etr_params`
655
672
_Description:_ Effective tax rate function parameters.
656
673
_Value Type:_ float
@@ -709,6 +726,20 @@ _Valid Range:_ min = -0.3 and max = 0.3
709
726
_Out-of-Range Action:_ error
710
727
711
728
729
+
#### `r_gov_DY`
730
+
_Description:_ Parameter summarizing the linear effect of the debt to GDP ratio on the government interest rate.
731
+
_Value Type:_ float
732
+
_Valid Range:_ min = -0.3 and max = 0.3
733
+
_Out-of-Range Action:_ error
734
+
735
+
736
+
#### `r_gov_DY2`
737
+
_Description:_ Parameter summarizing the quadratic effect of the debt to GDP ratio on the government interest rate.
738
+
_Value Type:_ float
739
+
_Valid Range:_ min = -0.3 and max = 0.3
740
+
_Out-of-Range Action:_ error
741
+
742
+
712
743
## Open Economy Parameters
713
744
714
745
#### `world_int_rate_annual`
@@ -744,7 +775,7 @@ _Out-of-Range Action:_ error
744
775
## Economic Assumptions
745
776
746
777
#### `g_y_annual`
747
-
_Description:_Growth rate of labor augmenting technological change.
778
+
_Description:_Annual growth rate of labor augmenting technological change.
0 commit comments