Skip to main content

dyno.py

Dyno is a Python library for specifying, solving and simulating dynamic macroeconomic models: stochastic DSGE models solved by first-order perturbation, and deterministic perfect-foresight (transition) models solved with a stacked-time Newton solver. Models are written in the human-readable .dyno language (explicit time indices [t], [t-1], [t+1], steady-state values [~]), or imported directly from Dynare .mod files. Dyno checks steady states and Blanchard-Kahn conditions, computes impulse responses, moments and simulations, renders model reports, and comes with Dyno Lab, a JupyterLab extension for editing and solving models interactively.

Documentation: https://econforge.github.io/dyno.py/

Install

Dyno is distributed as a conda package on the econforge channel on prefix.dev. With pixi, in a new or existing project:

pixi init my-project && cd my-project            # skip for an existing project
pixi workspace channel add --prepend https://prefix.dev/econforge
pixi add dyno

--prepend gives the econforge channel priority over conda-forge, so you get the latest Dyno release. For the graphical interface (Dyno Lab), also add JupyterLab and the extension:

pixi add jupyterlab jupyterlab-dyno
pixi run jupyter lab

See the installation guide for optional components (such as the Dynare preprocessor).

Example

Write a model in neo.dyno:

α <- 0.36
β <- 0.99
δ <- 0.025
ρ <- 0.95
γ <- 2.0

z[~] <- 0.0
k[~] <- ((1/β - (1-δ)) / α)**(1 / (α-1))
y[~] <- k[~]^α
i[~] <- δ * k[~]
c[~] <- y[~] - i[~]

z[t] = ρ * z[t-1] + e_z[t]
y[t] = exp(z[t]) * k[t-1]^α
k[t] = (1-δ) * k[t-1] + i[t]
c[t] = y[t] - i[t]
β * (c[t+1]/c[t])^(-γ) * (α * y[t+1]/k[t] + 1 - δ) = 1

e_z[t] <- N(0.01)

Then solve it and compute impulse responses:

from dyno import DynoModel

model = DynoModel("neo.dyno")
model.check()                          # raises if the steady state is wrong
solution = model.solve()               # first-order perturbation
irfs = solution.irfs(type="deviation", T=40)
print(irfs["e_z"][["y", "c", "k", "i"]].head())
solution.plot(type="deviation")        # interactive chart in Jupyter

Dynare files work the same way: DynoModel("model.mod").

Contributing

Contributors work from a clone of this repository. The sections below, and the Develop Dyno page of the documentation, describe the development setup.

Setup

Using pixi (production and development environment)

pixi can be installed on a *nix system using the following command:

curl -fsSL https://pixi.sh/install.sh | sh

For interactive modeling, Dyno features a JupyterLab extension (jupyterlab_dyno / Dyno Lab):

pixi run -e dev jupyter lab

For development (including documentation and unit tests), pixi provides a set of pre-configured tasks.

Model representation explorer (dev tool)

To visualize how the library currently imports and renders every example model (across backends, strict options, and text/HTML/Markdown output), run:

pixi run -e solara explorer

This is a maintainer/contributor tool for tracking the library's progress across its example models — it is not meant for developing or calibrating your own models; use Dyno Lab (above) for that. See the documentation for details.

To build and serve documentation locally with zensical:

pixi run -e dev docs

To run unit and coverage tests:

pixi run test
pixi run cov

Finally, types can be checked with mypy:

pixi run typecheck

Metadata

Release files for dynopy 0.1.15

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

Source distribution (sdist)

Source distribution for dynopy 0.1.15
File Size Uploaded Provenance Actions
dynopy-0.1.15.tar.gz 272.9 kB With provenance Details for dynopy-0.1.15.tar.gz

Built distribution (wheel)

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

Total release size: 563.3 kB

Release files / dynopy-0.1.15.tar.gz

Download URL dynopy-0.1.15.tar.gz
Size 272.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7122ac5a8734d4517c632341fb2efa7a4a0140ffacc2575033bf6228804f60a0
BLAKE2b-256 checksum
How to use checksums
ef28d6d080d44ae21d36e508f44b4a9b247dd81b3053a05d6bda691f00782d9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

Release files / dynopy-0.1.15-py3-none-any.whl

Download URL dynopy-0.1.15-py3-none-any.whl
Size 290.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4b9a3a1a02856e4ee31ba13318200e48b1d422e81f7755bca9c97c6e8ffcdd4f
BLAKE2b-256 checksum
How to use checksums
b8ac86f02297ceba03e0628719645e13f93ba833b52ccb1827b27a5111f3b42a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

Security for dynopy 0.1.15

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for dynopy-0.1.15.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

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.

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