OG-JPN is an overlapping-generations (OG) model core theory, logic, and solution method algorithms that allow for dynamic general equilibrium analysis of fiscal policy. OG-JPN provides a general framework and is a dependency of several country-specific OG models, such as OG-USA and 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 at here.
The model is constantly under development, and model components could change significantly. The package will have released versions, which will be checked against existing code prior to release. Stay tuned for an upcoming release!
There is only one method available for installing and running OG-JPN on your computer locally. The method is to fork and clone the most recent version of OG-JPN from its GitHub repository and create the conda environment for the ogjpn
package. We detail this method below.
conda env create -f environment.yml
conda activate ogjpn-dev
pip install -e .
./run_examples
python run_ogjpn_example.py
./run_examples/run_ogjpn_example.py
script by modifying model parameters specified in the og_spec
dictionary../run_examples/run_example_plots
./run_examples/ogjpn_example_output.csv
./run_examples/OUTPUT_BASELINE/model_params.pkl
execute.py
for items in the dictionary object in this pickle file./run_examples/OUTPUT_BASELINE/SS/SS_vars.pkl
SS.py
for what is in the dictionary object in this pickle file./run_examples/OUTPUT_BASELINE/TPI/TPI_vars.pkl
TPI.py
for what is in the dictionary object in this pickle file./run_examples/OUTPUT_REFORM
directory, which represent objects from the simulation of the reform policyNote that, depending on your machine, a full model run (solving for the full time path equilibrium for the baseline and reform policies) can take more than two hours of compute time.
If you run into errors running the example script, please open a new issue in the OG-JPN repo with a description of the issue and any relevant tracebacks you receive.
Once the package is installed, one can adjust parameters in the OG-Core Specifications
object using the Calibration
class as follows:
from ogcore.parameters import Specifications
from ogjpn.calibrate import Calibration
p = Specifications()
c = Calibration(p)
updated_params = c.get_dict()
p.update_specifications({'initial_debt_ratio': updated_params['initial_debt_ratio']})
The core maintainer of the OG-JPN repository is:
OG-JPN (Version 1.0.0)[Source code], https://github.com/Tatsuru-Kikuchi/OG-JPN