Skip to main content

Python Platform for DSGE Modeling

Project description

Python Framework for DSGE Models

Authors: Alexei Goumilevski and James Otterson

What it is:

This Framework aims to help economists to ease development and run of Dynamic Stochastic General Equilibrium (DSGE) models in Python environment.

Installation:

User is adviced to create a virtual environmemt in Python that isolates this installation along with its packages from the system-wide Python installation and other virtual environments. There are three options to install “Snowdrop” package:

  1. Clone this GitHub repository to your local drive. Then run command in a command prompt, pip install -r requirements.txt to install packages needed for a project to run.
  2. Run command: pip install snowdrop-1.0.5-py3-none-any.whl --user
  3. Install Snowdrop via pip installer: pip install pysnowdrop --upgrade

How to run:

  • Create or modify existing YAML model file in snowdrop/models folder.
  • Open snowdrop/src/tests/test_toy_models.py file and set fname to the name of this model file.
  • Run simulations in Spyder IDE by double-clicking on run button or run python script in a command prompt.

Content:

  • Sample model file (see <snowdrop/models/Toy/JLMP98.yaml>)
  • Documentation (see <snowdrop/docs/UserGuide.pdf>)

Highlights:

  • Framework is written in Python language and uses only Python libraries that are available by installing Anaconda distribution.
  • Framework is versatile to parse model files written in a human readable YAML format, Sirius XML format and to parse simple IRIS and DYNARE model files.
  • Prototype model files are created for non-linear and linear perfect-foresight models.
  • It can be run as a batch process, in a Jupyter notebook, or in a Spyder interactive development environment (Scientific Python Development environment).
  • Framework parses the model file, checks its syntax for errors, and generates Python functions source code. It computes the Jacobian up to the third order in a symbolic form.
  • Non-linear equations are solved by iterations by Newton's method. Two algorithms are implemented: ABLR stacked matrices method and LBJ forward-backward substitution method.
  • Linear models are solved with Binder and Pesaran's method, Anderson and More's method and two generalized Schur's method that reproduce calculations employed in Dynare and Iris.
  • Non-linear models can be run with time dependents parameters.
  • Framework can be used to calibrate models to find model's parameters. Calibration can be run for both linear and nonlinear models. Framework applies Bayesian approach to maximize likelihood function that incorporates prior beliefs about parameters and goodness of fit of model to the data.
  • Framework can sample model parameters by using Markov Chain Monte Carlo affine invariant ensemble sampler algorithm of Jonathan Goodman.
  • Framework uses Scientific Python Sparse package for large matrices algebra.
  • Following filters were implemented: Kalman (linear and non-linear models), Unscented Kalman, LRX, HP, Bandpass, Particle. Several versions of Kalman filter and smoother algorithms were developed including diffuse and non-diffuse, multivariate and univariate filters and smoothers.
  • As a result of runs Framework generates 1 and 2 dimensional plots and saves data in excel file and in Python sqlite database.

DISCLAIMERS:

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE

DOI

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

pysnowdrop-1.0.6.tar.gz (14.2 MB view details)

Uploaded Source

Built Distribution

pysnowdrop-1.0.6-py3-none-any.whl (14.7 MB view details)

Uploaded Python 3

File details

Details for the file pysnowdrop-1.0.6.tar.gz.

File metadata

  • Download URL: pysnowdrop-1.0.6.tar.gz
  • Upload date:
  • Size: 14.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.2 Linux/5.4.0-205-generic

File hashes

Hashes for pysnowdrop-1.0.6.tar.gz
Algorithm Hash digest
SHA256 802e84b51c7767d556e2dd223e516ba0fccfcb44a3b0f2b758050373327193f3
MD5 571021cb9047594dfc62584ceddf1f38
BLAKE2b-256 d7beef7167c2d81a045cc482a0b3a508a1da993f24c4cf4f276dea045c038877

See more details on using hashes here.

File details

Details for the file pysnowdrop-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: pysnowdrop-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 14.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.2 Linux/5.4.0-205-generic

File hashes

Hashes for pysnowdrop-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 395a44004cc98a4e0898709e71a081570d6e1d6cbc66962caf4e7ee1d5a62dd3
MD5 b7a535f579d1aa6cd31c2820e8146c4d
BLAKE2b-256 9adebac4da4cb24082917bb58938ea83ba7318b03c85cf97bf54fd93cfff7e6a

See more details on using hashes here.

Supported by

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