Skip to main content

pynare

This is a slim Python API to Dynare. It runs the *.mod file, displays the resulting output, and then provides access to the Dynare workspace. It works with both, Matlab and Octave.

For fellow linux users (and probably mac users as well), this also provides a script to execute Dynare from comand line.

NOTE: This is at a very early stage and not well-tested (and not tested at all on Windows). Comments via the bug tracker are very welcome.

Motivation

The declared goal of this project is to provide access to Dynare without having to learn and use Matlab / Octave. This reflects the acknowledgement that the translation of the Dynare codebase to a more efficient open source alternative is a major effort which may take a while. Meanwhile, pynare encourages young researchers to focus on modern open source languages and, as the whole interface is pure Python, still allows them to use Dynare without Matlab.

Usage

Package import and running a modfile:

from pynare import pynare
modfile = '/path/to/greatmodel.mod'
mod = pynare(modfile)

This will give you the usual info about how the Blanchard-Kahn conditions are messed up. Then access the attributes:

mod.workspace                   # will give you the matlab workspace
print(mod.workspace['beta'])    # it contains all the parameters
>>> 0.995                       # likely to be the case

I also added the oo_ Dynare-object, which contains a lot of usefull stuff. Note that you could have also accessed it via mod.workspace['oo_'].

mod.oo_.keys()              # it is a dict, so browse it via `keys()`
irfs = mod.oo_['irfs']      # for instance get your impulse response functions (it's again a dict). Maybe plot them?

Just evoking pynare from the comand prompt/shell is as simple as

pynare modelpath/crazy.mod

Installation via pip

Installation is as simply as running (Windows user from the Anaconda Prompt):

pip install pynare

Of course, installing Dynare remains your responibility.

If you care for the bleeding edge developing version (which, at this stage, is recommended), the handy way is to install via the git-command. If you hav not yet installed git, Windows users get it here: https://git-scm.com/download/win (Linux users just use the repo of their distro). Then:

pip install git+https://github.com/gboehl/pynare

Metadata

Release files for pynare 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pynare 0.1.5
File Size Uploaded Provenance
pynare-0.1.5.tar.gz 6.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pynare 0.1.5
File Interpreter ABI Platform
pynare-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 12.7 kB

Release files / pynare-0.1.5.tar.gz

Download URL pynare-0.1.5.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
faeb1513525105baf9c0e09e169185b9e02c0f1ef94b5d5464c15991d3afa387
BLAKE2b-256 checksum
How to use checksums
d1a17a650620825d7bab247ca537ff912931c15ce3427b57a5b59f572809ed54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.3

Release files / pynare-0.1.5-py3-none-any.whl

Download URL pynare-0.1.5-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
86c027d17257224e1be5fe5706c2a4196e2d859fe379b76cf1005a3dda7b7936
BLAKE2b-256 checksum
How to use checksums
6aaad26af1ced8fc20a035191fbd4b99e3bee94f81313cc2c7c31c2d43c12b02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.3

Security for pynare 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page