Dynare.jl

A Julia rewrite of Dynare: solving, simulating and estimating DSGE models.
Popularity
44 Stars
Updated Last
1 Year Ago
Started In
January 2022

WORK IN PROGRESS

Requirements

Julia 64bit >= v1.6

Warning

The last version of this package, v0.6.0, isn't available yet for macOS or FreeBSD

Installation

using Pkg
pkg"add Dynare"

Update

If you already have a version of Dynare installed (not in development mode):

using Pkg
pkg"update"

Running Dynare

Example (to be run in the directory Dynare.jl):

using Dynare
context = @dynare "./test/models/example1/example1.mod";

The results are in the context structure.

Supported Dynare instructions

  1. calib_smoother
  2. check
  3. deterministic_trends
  4. endval
  5. histval
  6. initval
  7. perfect_foresight_setup (only some options)
  8. perfect_foresight_solver (only some options, includind lmmcp)
  9. planner_objective
  10. ramsey_model
  11. shocks
  12. steady (including numerical solution)
  13. stoch_simul (only order=1)

Output

  1. The context structure is saved in the directory <path to modfile>/<modfilenane>/output/<modfilename>.jld2. It can be loaded with
    using JLD2
    DD = load("<path to modfile>/<modefilename>/output/<modefilename>.jld2")``
    
  2. The IRF graphs are saved in <path to modfile>/<modfilenane>/graphs

Project web site

PATH licence

Dynare uses the PATH software by S. Dirkse, M.C. Ferris and T. Munson (https://pages.cs.wisc.edu/~ferris/path.html), as provided by PATHSolver.jl to solve prefect foresight models with occasionally binding constraints.

In order to use it, you need to add the free licence available at https://pages.cs.wisc.edu/~ferris/path/LICENSE in your file ~/.julia/config/startup.jl

ENV["PATH_LICENSE_STRING"] = "licence number provided in the above link"

Under Windows

  1. Create a new folder in your .julia directory called config
  2. In the .julia\config folder create a new text file: Right click → New → Text Document
  3. Inside the new text document, type:

ENV["PATH_LICENSE_STRING"] = "licence number provided in the above link"

  1. In the text document, go File → Save as
  2. In the dropdown Save as type option at the bottom of the pop-up window select All files
  3. In the field File name write startup.jl
  4. Press Save

In VScode

  1. Go to File → Open Folder, navigate through your folders and choose the one where you want to create the startup.jl file
  2. Go to File → New Text File
  3. In the new text file, type

ENV["PATH_LICENSE_STRING"] = "licence number provided in the above link"

  1. Go to File → Save
  2. In the dropdown Save as type option at the bottom of the pop-up window select All files
  3. In the field File name write startup.jl.
  4. Press Save

Used By Packages

No packages found.