Skip to main content

USA calibration for OG-Core

Project description

OG-USA

Org PSL cataloged OS License: CC0-1.0 Jupyter Book Badge
Package Python 3.10 Python 3.11 PyPI Latest Release PyPI Downloads Code style: black
Testing example event parameter example event parameter example event parameter Codecov

OG-USA is an overlapping-generations (OG) model that allows for dynamic general equilibrium analysis of fiscal policy for the United States. OG-USA is built on the OG-Core framework. 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 https://pslmodels.github.io/OG-Core and documentation of the specific United States calibration of the model is available at https://pslmodels.github.io/OG-USA.

Disclaimer

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!

Using/contributing to OG-USA

  • Install the Anaconda distribution of Python
  • Clone this repository to a directory on your computer
  • 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. The process of creating the ogusa-dev conda environment can take more than 20 minutes. The pip install of the OG-Core dependency from GitHub takes most of the time.
  • Then, conda activate ogusa-dev
  • Then install by pip install -e .
  • Navigate to ./examples
  • Run the model with an example reform from terminal/command prompt by typing python run_og_usa.py
  • You can adjust the ./examples/run_og_usa.py by modifying model parameters specified in the dictionary passed to the p.update_specifications() calls.
  • Model outputs will be saved in the following files:
    • ./examples/OG-USA_example_plots
      • This folder will contain a number of plots generated from OG-Core to help you visualize the output from your run
    • ./examples/ogusa_example_output.csv
      • This is a summary of the percentage changes in macro variables over the first ten years and in the steady-state.
    • ./examples/OG-USA-Example/OUTPUT_BASELINE/model_params.pkl
      • Model parameters used in the baseline run
      • See ogcore.execute.py for items in the dictionary object in this pickle file
    • ./examples/OG-USA-Example/OUTPUT_BASELINE/SS/SS_vars.pkl
      • Outputs from the model steady state solution under the baseline policy
      • See ogcore.SS.py for what is in the dictionary object in this pickle file
    • ./examples/OG-USA-Example/OUTPUT_BASELINE/TPI/TPI_vars.pkl
      • Outputs from the model timepath solution under the baseline policy
      • See ogcore.TPI.py for what is in the dictionary object in this pickle file
    • An analogous set of files in the ./examples/OUTPUT_REFORM directory, which represent objects from the simulation of the reform policy

Note 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-USA 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 ogusa.calibrate import Calibration
p = Specifications()
c = Calibration(p)
updated_params = c.get_dict()
p.update_specifications({'initial_debt_ratio': updated_params['initial_debt_ratio']})

Core Maintainers

The core maintainers of the OG-Core repository are:

  • Jason DeBacker (GitHub handle: jdebacker), Associate Professor, Department of Economics, Darla Moore School of Business, University of South Carolina; President, PSL Foundation; Vice President of Research and Co-founder, Open Research Group, Inc.
  • Richard W. Evans (GitHub handle: rickecon), Senior Research Fellow and Director of Open Policy, Center for Growth and Opportunity at Utah State University; President, Open Research Group, Inc.; Director, Open Source Economics Laboratory.

Citing OG-USA

OG-USA (Version #.#.#)[Source code], https://github.com/PSLmodels/OG-USA.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ogusa-0.1.11.tar.gz (20.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ogusa-0.1.11-py3-none-any.whl (20.2 MB view details)

Uploaded Python 3

File details

Details for the file ogusa-0.1.11.tar.gz.

File metadata

  • Download URL: ogusa-0.1.11.tar.gz
  • Upload date:
  • Size: 20.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for ogusa-0.1.11.tar.gz
Algorithm Hash digest
SHA256 910c40d85ef37c6b987145a44caa678e502bbb137214be60af1f414526826a8b
MD5 c539b1509d637fc30feb24e5de27d137
BLAKE2b-256 f0f08f1778b4c4a2d76b13be441a941e63039e6e997c7f0995c3f2c32e98dace

See more details on using hashes here.

File details

Details for the file ogusa-0.1.11-py3-none-any.whl.

File metadata

  • Download URL: ogusa-0.1.11-py3-none-any.whl
  • Upload date:
  • Size: 20.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for ogusa-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 9e14d84745a14d5da08c88d519470efad9e42900ad72b93c73d3c27a4bc79263
MD5 25d0c51414ddfc0e53905160a559068b
BLAKE2b-256 2041ccef10ee3d1b190f72f533366b9fecd1951cce14bda5f6b47f5f4bd862c6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page