ogphl


Nameogphl JSON
Version 0.0.7 PyPI version JSON
download
home_pagehttps://github.com/EAPD-DRB/OG-PHL/
SummaryPhilippines Calibration for OG-Core
upload_time2024-12-07 05:51:04
maintainerNone
docs_urlNone
authorMarcelo LaFleur, Richard W. Evans, and Jason DeBacker
requires_python<3.13,>=3.7.7
licenseCC0 1.0 Universal (CC0 1.0) Public Domain Dedication
keywords phl philippines calibration of large scale overlapping generations model of fiscal policy
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # OG-PHL

| | |
| --- | --- |
| Org | [![United Nations DESA](https://img.shields.io/badge/United%20Nations%20DESA-blue)](https://www.un.org/en/desa) [![PSL cataloged](https://img.shields.io/badge/PSL-cataloged-a0a0a0.svg)](https://www.PSLmodels.org) [![OS License: CC0-1.0](https://img.shields.io/badge/OS%20License-CC0%201.0-yellow)](https://github.com/EAPD-DRB/OG-PHL/blob/main/LICENSE) |
| Package | [![Python 3.10](https://img.shields.io/badge/python-3.10-blue.svg)](https://www.python.org/downloads/release/python-31013/) [![Python 3.11](https://img.shields.io/badge/python-3.11-blue.svg)](https://www.python.org/downloads/release/python-3116/) [![PyPI Latest Release](https://img.shields.io/pypi/v/ogphl.svg)](https://pypi.org/project/ogphl/) [![PyPI Downloads](https://img.shields.io/pypi/dm/ogphl.svg?label=PyPI%20downloads)](https://pypi.org/project/ogphl/) |
| Testing | ![example event parameter](https://github.com/EAPD-DRB/OG-PHL/actions/workflows/build_and_test.yml/badge.svg?branch=main) ![example event parameter](https://github.com/EAPD-DRB/OG-PHL/actions/workflows/deploy_docs.yml/badge.svg?branch=main) ![example event parameter](https://github.com/EAPD-DRB/OG-PHL/actions/workflows/check_format.yml/badge.svg?branch=main) [![Codecov](https://codecov.io/gh/EAPD-DRB/OG-PHL/branch/main/graph/badge.svg)](https://codecov.io/gh/EAPD-DRB/OG-PHL) |

OG-PHL is an overlapping-generations (OG) model that allows for dynamic general equilibrium analysis of fiscal policy for the Philippines. OG-PHL 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 Philippines calibration of the model will be available soon.


## Using and contributing to OG-PHL

* If you are installing on a Mac computer, install XCode Tools. In Terminal: `xcode-select —install`
* Download and install the appropriate [Anaconda distribution](https://www.anaconda.com/products/distribution#Downloads) of Python. Select the correct version for you platform (Windows, Intel Mac, or M1 Mac).
* In Terminal:
  * Make sure the `conda` package manager is up-to-date: `conda update conda`.
  * Make sure the Anaconda distribution of Python is up-to-date: `conda update anaconda`.
* Fork this repository and clone your fork of this repository to a directory on your computer.
* From the terminal (or Anaconda 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 `ogphl-dev` conda environment should not take more than five minutes.
* Then, `conda activate ogphl-dev`
* Then install by `pip install -e .`
### Run an example of the model
* Navigate to `./examples`
* Run the model with an example reform from terminal/command prompt by typing `python run_og_phl.py`
* You can adjust the `./examples/run_og_phl.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-PHL_example_plots`
    * This folder will contain a number of plots generated from OG-Core to help you visualize the output from your run
  * `./examples/ogphl_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-PHL-Example/OUTPUT_BASELINE/model_params.pkl`
    * Model parameters used in the baseline run
    * See [`ogcore.execute.py`](https://github.com/PSLmodels/OG-Core/blob/master/ogcore/execute.py) for items in the dictionary object in this pickle file
  * `./examples/OG-PHL-Example/OUTPUT_BASELINE/SS/SS_vars.pkl`
    * Outputs from the model steady state solution under the baseline policy
    * See [`ogcore.SS.py`](https://github.com/PSLmodels/OG-Core/blob/master/ogcore/SS.py) for what is in the dictionary object in this pickle file
  * `./examples/OG-PHL-Example/OUTPUT_BASELINE/TPI/TPI_vars.pkl`
    * Outputs from the model timepath solution under the baseline policy
    * See [`ogcore.TPI.py`](https://github.com/PSLmodels/OG-Core/blob/master/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 from 35 minutes to more than two hours of compute time.

If you run into errors running the example script, please open a new issue in the OG-PHL 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 ogphl.calibrate import Calibration
p = Specifications()
c = Calibration(p)
updated_params = c.get_dict()
p.update_specifications({'initial_debt_ratio': updated_params['initial_debt_ratio']})
```

## Disclaimer
The organization of this repository will be changing rapidly, but the `OG-PHL/examples/run_og_phl.py` script will be kept up to date to run with the master branch of this repo.

## Core Maintainers

The core maintainers of the OG-PHL repository are:

* Marcelo LaFleur (GitHub handle: [@SeaCelo](https://github.com/SeaCelo)), Senior Economist, Department of Economic and Social Affairs (DESA), United Nations
* [Richard W. Evans](https://sites.google.com/site/rickecon/) (GitHub handle: [@rickecon](https://github.com/rickecon)), Senior Research Fellow and Director of Open Policy, Center for Growth and Opportunity at Utah State University; President, Open Research Group, Inc.
* [Jason DeBacker](https://jasondebacker.com) (GitHub handle: [@jdebacker](https://github.com/jdebacker)), Associate Professor, University of South Carolina; Vice President of Research, Open Research Group, Inc.

## Citing OG-PHL

OG-PHL (Version #.#.#)[Source code], https://github.com/EAPD-DRB/OG-PHL

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/EAPD-DRB/OG-PHL/",
    "name": "ogphl",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.7.7",
    "maintainer_email": null,
    "keywords": "PHL Philippines calibration of large scale overlapping generations model of fiscal policy",
    "author": "Marcelo LaFleur, Richard W. Evans, and Jason DeBacker",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/82/69/c1a2a9968b6fa835fe45559355f49a169509059d8d36405b26fda83cbaa0/ogphl-0.0.7.tar.gz",
    "platform": null,
    "description": "# OG-PHL\n\n| | |\n| --- | --- |\n| Org | [![United Nations DESA](https://img.shields.io/badge/United%20Nations%20DESA-blue)](https://www.un.org/en/desa) [![PSL cataloged](https://img.shields.io/badge/PSL-cataloged-a0a0a0.svg)](https://www.PSLmodels.org) [![OS License: CC0-1.0](https://img.shields.io/badge/OS%20License-CC0%201.0-yellow)](https://github.com/EAPD-DRB/OG-PHL/blob/main/LICENSE) |\n| Package | [![Python 3.10](https://img.shields.io/badge/python-3.10-blue.svg)](https://www.python.org/downloads/release/python-31013/) [![Python 3.11](https://img.shields.io/badge/python-3.11-blue.svg)](https://www.python.org/downloads/release/python-3116/) [![PyPI Latest Release](https://img.shields.io/pypi/v/ogphl.svg)](https://pypi.org/project/ogphl/) [![PyPI Downloads](https://img.shields.io/pypi/dm/ogphl.svg?label=PyPI%20downloads)](https://pypi.org/project/ogphl/) |\n| Testing | ![example event parameter](https://github.com/EAPD-DRB/OG-PHL/actions/workflows/build_and_test.yml/badge.svg?branch=main) ![example event parameter](https://github.com/EAPD-DRB/OG-PHL/actions/workflows/deploy_docs.yml/badge.svg?branch=main) ![example event parameter](https://github.com/EAPD-DRB/OG-PHL/actions/workflows/check_format.yml/badge.svg?branch=main) [![Codecov](https://codecov.io/gh/EAPD-DRB/OG-PHL/branch/main/graph/badge.svg)](https://codecov.io/gh/EAPD-DRB/OG-PHL) |\n\nOG-PHL is an overlapping-generations (OG) model that allows for dynamic general equilibrium analysis of fiscal policy for the Philippines. OG-PHL 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 Philippines calibration of the model will be available soon.\n\n\n## Using and contributing to OG-PHL\n\n* If you are installing on a Mac computer, install XCode Tools. In Terminal: `xcode-select \u2014install`\n* Download and install the appropriate [Anaconda distribution](https://www.anaconda.com/products/distribution#Downloads) of Python. Select the correct version for you platform (Windows, Intel Mac, or M1 Mac).\n* In Terminal:\n  * Make sure the `conda` package manager is up-to-date: `conda update conda`.\n  * Make sure the Anaconda distribution of Python is up-to-date: `conda update anaconda`.\n* Fork this repository and clone your fork of this repository to a directory on your computer.\n* From the terminal (or Anaconda 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 `ogphl-dev` conda environment should not take more than five minutes.\n* Then, `conda activate ogphl-dev`\n* Then install by `pip install -e .`\n### Run an example of the model\n* Navigate to `./examples`\n* Run the model with an example reform from terminal/command prompt by typing `python run_og_phl.py`\n* You can adjust the `./examples/run_og_phl.py` by modifying model parameters specified in the dictionary passed to the `p.update_specifications()` calls.\n* Model outputs will be saved in the following files:\n  * `./examples/OG-PHL_example_plots`\n    * This folder will contain a number of plots generated from OG-Core to help you visualize the output from your run\n  * `./examples/ogphl_example_output.csv`\n    * This is a summary of the percentage changes in macro variables over the first ten years and in the steady-state.\n  * `./examples/OG-PHL-Example/OUTPUT_BASELINE/model_params.pkl`\n    * Model parameters used in the baseline run\n    * See [`ogcore.execute.py`](https://github.com/PSLmodels/OG-Core/blob/master/ogcore/execute.py) for items in the dictionary object in this pickle file\n  * `./examples/OG-PHL-Example/OUTPUT_BASELINE/SS/SS_vars.pkl`\n    * Outputs from the model steady state solution under the baseline policy\n    * See [`ogcore.SS.py`](https://github.com/PSLmodels/OG-Core/blob/master/ogcore/SS.py) for what is in the dictionary object in this pickle file\n  * `./examples/OG-PHL-Example/OUTPUT_BASELINE/TPI/TPI_vars.pkl`\n    * Outputs from the model timepath solution under the baseline policy\n    * See [`ogcore.TPI.py`](https://github.com/PSLmodels/OG-Core/blob/master/ogcore/TPI.py) for what is in the dictionary object in this pickle file\n  * An analogous set of files in the `./examples/OUTPUT_REFORM` directory, which represent objects from the simulation of the reform policy\n\nNote that, depending on your machine, a full model run (solving for the full time path equilibrium for the baseline and reform policies) can take from 35 minutes to more than two hours of compute time.\n\nIf you run into errors running the example script, please open a new issue in the OG-PHL repo with a description of the issue and any relevant tracebacks you receive.\n\nOnce the package is installed, one can adjust parameters in the OG-Core `Specifications` object using the `Calibration` class as follows:\n\n```\nfrom ogcore.parameters import Specifications\nfrom ogphl.calibrate import Calibration\np = Specifications()\nc = Calibration(p)\nupdated_params = c.get_dict()\np.update_specifications({'initial_debt_ratio': updated_params['initial_debt_ratio']})\n```\n\n## Disclaimer\nThe organization of this repository will be changing rapidly, but the `OG-PHL/examples/run_og_phl.py` script will be kept up to date to run with the master branch of this repo.\n\n## Core Maintainers\n\nThe core maintainers of the OG-PHL repository are:\n\n* Marcelo LaFleur (GitHub handle: [@SeaCelo](https://github.com/SeaCelo)), Senior Economist, Department of Economic and Social Affairs (DESA), United Nations\n* [Richard W. Evans](https://sites.google.com/site/rickecon/) (GitHub handle: [@rickecon](https://github.com/rickecon)), Senior Research Fellow and Director of Open Policy, Center for Growth and Opportunity at Utah State University; President, Open Research Group, Inc.\n* [Jason DeBacker](https://jasondebacker.com) (GitHub handle: [@jdebacker](https://github.com/jdebacker)), Associate Professor, University of South Carolina; Vice President of Research, Open Research Group, Inc.\n\n## Citing OG-PHL\n\nOG-PHL (Version #.#.#)[Source code], https://github.com/EAPD-DRB/OG-PHL\n",
    "bugtrack_url": null,
    "license": "CC0 1.0 Universal (CC0 1.0) Public Domain Dedication",
    "summary": "Philippines Calibration for OG-Core",
    "version": "0.0.7",
    "project_urls": {
        "Download": "https://github.com/EAPD-DRB/OG-PHL/",
        "Homepage": "https://github.com/EAPD-DRB/OG-PHL/",
        "Issue Tracker": "https://github.com/EAPD-DRB/OG-PHL/issues"
    },
    "split_keywords": [
        "phl",
        "philippines",
        "calibration",
        "of",
        "large",
        "scale",
        "overlapping",
        "generations",
        "model",
        "of",
        "fiscal",
        "policy"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f28f1487ecc4712021d30f4e08776af8f86df44e001e1c2a288d038af15a897f",
                "md5": "4b87e7e28c73233b39341d5e3f46d85a",
                "sha256": "48834ff9010f2914a0eb3c28bcbe38f3c8c711285a020f12977761e03c63e0f9"
            },
            "downloads": -1,
            "filename": "ogphl-0.0.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4b87e7e28c73233b39341d5e3f46d85a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.7.7",
            "size": 164074,
            "upload_time": "2024-12-07T05:51:02",
            "upload_time_iso_8601": "2024-12-07T05:51:02.386937Z",
            "url": "https://files.pythonhosted.org/packages/f2/8f/1487ecc4712021d30f4e08776af8f86df44e001e1c2a288d038af15a897f/ogphl-0.0.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8269c1a2a9968b6fa835fe45559355f49a169509059d8d36405b26fda83cbaa0",
                "md5": "f59f7e82143f519b950a60237802612d",
                "sha256": "79d459ed4c1f6dac487d062507287b7bfc1ecfd774eb4477146918707e19ed43"
            },
            "downloads": -1,
            "filename": "ogphl-0.0.7.tar.gz",
            "has_sig": false,
            "md5_digest": "f59f7e82143f519b950a60237802612d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.7.7",
            "size": 157101,
            "upload_time": "2024-12-07T05:51:04",
            "upload_time_iso_8601": "2024-12-07T05:51:04.324694Z",
            "url": "https://files.pythonhosted.org/packages/82/69/c1a2a9968b6fa835fe45559355f49a169509059d8d36405b26fda83cbaa0/ogphl-0.0.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-07 05:51:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "EAPD-DRB",
    "github_project": "OG-PHL",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "ogphl"
}
        
Elapsed time: 0.44992s