- Julia 64bit >= v1.10
- Recommended version: Julia 64 bit v1.10.5
using Pkg
pkg"add Dynare"
It is strongly recommended to install Dynare in a fresh Julia environment in order to avoid conflicts with other packages
If you already have a version of Dynare installed (not in development mode):
using Pkg
pkg"update"
Often, it is necessary to restart Julia to load the new version of Dynare.
Note that the version of the Dynare package is printed immediately after running Dynare:
julia> context = @dynare "example1";
Dynare version: 0.9.6
...
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.
- calib_smoother
- deterministic_trends
- endval
- estimated_params
- estimated_params_init
- estimation
- histval
- homotopy
- initval
- initval_file
- perfect_foresight_setup (only some options)
- perfect_foresight_solver (only some options, includind lmmcp)
- planner_objective
- ramsey_constraints
- ramsey_model
- shocks
- steady (including numerical solution)
- stoch_simul (only order=1)
- The
context
structure is saved in the directory<path to modfile>/<modfilenane>/output/<modfilename>.jls
. It can be loaded withusing Serialization DD = Serialization.deserialize("<path to modfile>/<modefilename>/output/<modefilename>.jls")``
- Graphs are saved in
<path to modfile>/<modfilenane>/graphs
- A log of the session is kept in
<filename>.log
.
- PATH algorithm for MCP problems
- You need to load PATHSolver before running Dynare (once per Julia session)
using PATHSolver
context = @dynare ...
- PARDISO is high-performance solver for very large sparse linear systems. It can be used with perfect foresight simulation of very large models. You need to load MKL and Pardiso before running Dynare (once per Julia session)
using MKL, Pardiso
context = @dynare ...
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"
- Create a new folder in your
.julia
directory calledconfig
- In the
.julia\config
folder create a new text file:Right click → New → Text Document
- Inside the new text document, type:
ENV["PATH_LICENSE_STRING"] = "licence number provided in the above link"
- In the text document, go
File → Save as
- In the dropdown
Save as type
option at the bottom of the pop-up window selectAll files
- In the field
File name
writestartup.jl
- Press
Save
- Go to
File → Open Folder
, navigate through your folders and choose the one where you want to create thestartup.jl
file - Go to
File → New Text File
- In the new text file, type
ENV["PATH_LICENSE_STRING"] = "licence number provided in the above link"
- Go to
File → Save
- In the dropdown
Save as type
option at the bottom of the pop-up window selectAll files
- In the field
File name
writestartup.jl
. - Press
Save
- With older Julia versions, in some circumstances, it is necessary to install first
Pardiso
, then build it, and finally installDynare.jl
- Perfect foresight simulations for purely backward models (without any forward look isn't supported yet
- Banque de France
- DSGE-net