Skip to content

OriginalThoughts

Michel Juillard edited this page Feb 14, 2024 · 1 revision

Original thoughts about the DynareJulia project

strengths and weaknesses of Dynare

Strong points

  • A simple and intuitive modeling language used in many papers and projects (see Macroeconomic Model Data Base, model collections such as Johannes Pfeifer at (https://github.com/JohannesPfeifer/DSGE_mod) and many more)
  • Help for replication
  • A very efficient preprocessor (including symbolic derivation)
  • Fast algorithms
  • A unique environment for several connected tasks:
    • Solution of the model
    • Simulation
    • Estimation (Bayesian, ML, methods of moments)
    • Forecasting
    • Optimal policy
    • Occasionally binding constraints
    • Markov-Switching VAR
    • Simple time series operations
    • Reporting results
  • A lively community (forum, Summer school, Dynare conferences)
  • Fast correction of bugs
  • Has been adopted for teaching

Some birth defects

  • Too much concern about memory footprint
    • selecting variables present with leads or lags,
    • in perfect foresight algorithm: triangularizing the Jacobian matrix of the stacked system period by period, instead of using sparse matrix code (corrected since).
    • partly due to hardware limitations in mid-1990
  • Ignoring time series nature of data (partly corrected with dseries)
  • Absence of block for calibrating parameters
  • Absence of a documented API for the main numerical functions.
  • Difficulties in handling contributions

New directions

  • Estimation of models with zero lower bound
  • Support for heterogeneous agents models
  • Global solution

Algorithms

Discussion of some of the algorithms used for solving the model and estimating its parameters can be found here

DYNARE-JULIA

Rewriting Dynare

  • More than 20 years of development layers
  • Two language problem: fast code must be written in C, C++ or Fortran
  • Matlab doesn't have an ecosystem or a community of open source developers
  • Matlab price tag is a deterrent for many users and Octave is too slow

Why Julia

  • meant for scientific computing
  • JIT compiling
  • solves the two language problem
  • user defined types, no classes, multiple dispatch
  • rich collection of existing packages
  • lively community
  • efficient package management
  • powerful metaprogramming

Dynare-Julia

  • Different packages for numerical algorithms and for interpretation of Dynare modeling language
  • Re-using Dynare C++ preprocessor with special output for Julia
  • Insist on modularity
  • Homogeneous coding style
  • Leveraging existing Julia packages (NLsolve, Plots, PrettyTables)