Indonesia (IDN) Calibration for OG-Core
Project description
OG-IDN
Org | |
Package | |
Testing |
OG-IDN is an overlapping-generations (OG) model that allows for dynamic general equilibrium analysis of fiscal policy for Indonesia. OG-IDN 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 Indonesian calibration of the model will be available soon.
Using and contributing to OG-IDN
- If you are installing on a Mac computer, install XCode Tools. In Terminal:
xcode-select —install
- Download and install the appropriate Anaconda distribution 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
.
- Make sure the
- 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 theogidn-dev
conda environment should not take more than five minutes. - Then,
conda activate ogidn-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 thep.update_specifications()
calls. - Model outputs will be saved in the following files:
./examples/OG-IDN_example_plots
- This folder will contain a number of plots generated from OG-Core to help you visualize the output from your run
./examples/ogidn_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-IDN-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-IDN-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-IDN-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 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-IDN 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 ogidn.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-IDN/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-IDN repository are:
- Marcelo LaFleur (GitHub handle: @SeaCelo), Senior Economist, Department of Economic and Social Affairs (DESA), United Nations
- Richard W. Evans (GitHub handle: @rickecon), Senior Economist, Abundance Institute; President, Open Research Group, Inc.
- Jason DeBacker (GitHub handle: @jdebacker), Associate Professor, University of South Carolina; Vice President of Research, Open Research Group, Inc.
Citing OG-IDN
OG-IDN (Version #.#.#)[Source code], https://github.com/EAPD-DRB/OG-IDN
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ogidn-0.0.2.tar.gz
.
File metadata
- Download URL: ogidn-0.0.2.tar.gz
- Upload date:
- Size: 311.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb8bd575d5cd8926fd93854dc5e8dc3d70161f357f0311e0d4b9db00fd670384 |
|
MD5 | 74e01f3158a95fb1a1d11dbbc54b3cde |
|
BLAKE2b-256 | 87ad6e5aac2a2faa7c0c19bb3d38f3db94e5a6242a38801a44bf4e7506657fa4 |
File details
Details for the file ogidn-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: ogidn-0.0.2-py3-none-any.whl
- Upload date:
- Size: 309.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c22117447e45dcfc956c2433068174e7ab81d5f9c1ee17a21ff0421fccd8c5e5 |
|
MD5 | 74a9248deb1c54dbce05d1f7d43f4910 |
|
BLAKE2b-256 | c44e0bdbe316681238c4d29d6344bae3432c08a3fbd92544c715daf825924c62 |