ogphl


Nameogphl JSON
Version 0.0.6 PyPI version JSON
download
home_pagehttps://github.com/EAPD-DRB/OG-PHL/
SummaryPhilippines Calibration for OG-Core
upload_time2024-10-24 05:14:41
maintainerNone
docs_urlNone
authorMarcelo LaFleur, Richard W. Evans, and Jason DeBacker
requires_python<3.12,>=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_zaf.py`
* You can adjust the `./examples/run_og_zaf.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_zaf.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.12,>=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/a6/bc/fe774cd60896611eb1d9889c305a6ef1f6c02f2f53852bb4b53c3bbd5b15/ogphl-0.0.6.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_zaf.py`\n* You can adjust the `./examples/run_og_zaf.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_zaf.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.6",
    "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": "a903b47f5197bfdac8ddd810b5ef2b1440ef07c72e625fa00f0d5f2cd5a5d8e0",
                "md5": "295684fd131c18f7718687917b996fec",
                "sha256": "60d7d087559f5279fefa0a2f76430a77366c5f79c72b1f1c588ae5b5f1707444"
            },
            "downloads": -1,
            "filename": "ogphl-0.0.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "295684fd131c18f7718687917b996fec",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.12,>=3.7.7",
            "size": 164075,
            "upload_time": "2024-10-24T05:14:40",
            "upload_time_iso_8601": "2024-10-24T05:14:40.175724Z",
            "url": "https://files.pythonhosted.org/packages/a9/03/b47f5197bfdac8ddd810b5ef2b1440ef07c72e625fa00f0d5f2cd5a5d8e0/ogphl-0.0.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a6bcfe774cd60896611eb1d9889c305a6ef1f6c02f2f53852bb4b53c3bbd5b15",
                "md5": "174004a66d7b90dfcadfcc506390a8a8",
                "sha256": "7ffb7af27d355064206cfd0b10d1ed091bfbbd68d734452feeee059644bb3f80"
            },
            "downloads": -1,
            "filename": "ogphl-0.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "174004a66d7b90dfcadfcc506390a8a8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.12,>=3.7.7",
            "size": 157112,
            "upload_time": "2024-10-24T05:14:41",
            "upload_time_iso_8601": "2024-10-24T05:14:41.799238Z",
            "url": "https://files.pythonhosted.org/packages/a6/bc/fe774cd60896611eb1d9889c305a6ef1f6c02f2f53852bb4b53c3bbd5b15/ogphl-0.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-24 05:14:41",
    "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.37891s