Central Banks Notes
Dynare: Democratizing Macroeconomic Modeling with MATLAB
At the MathWorks Finance Conference 2023, Sébastien Villemot from CEPREMAP presented "Dynare: Macroeconomic Modeling for All," highlighting the impact of the tool on the world of economic modeling. Dynare, a software based on MATLAB®, is renowned for its ability to simulate and estimate macroeconomic models, making complex economic modeling more accessible.
Architecture of Dynare
- Preprocessor
- Standalone executable, written in C++ (~22% of source code)
- Parses the Dynare language
- Symbolic algebra manipulations (e.g. derivatives, block decomposition)
- Outputs M files (or MEX files) embedding the model and the requested operations
- Files
- Represent ~61% of source code
- For most high-level computational tasks
- MEX files
- In modern Fortran or C++ (~16% of source code)
- For accelerating costly inner tasks
- Specialized mathematical problems
- Stacked model Jacobian construction
- Parallelized law-of-motion of particles in particle filtering
- Machine or bytecode representation of model equations and derivatives
- Testsuite: unit and integration tests
Villemot's presentation delved into various aspects of Dynare, emphasizing its scientific, technical, and community-oriented dimensions.
- Overview of Dynare: Dynare is a leading tool for describing macroeconomic models, originally designed for New Keynesian structural models but adaptable for other theoretical paradigms. Its domain-specific language simplifies model description and operations, making it user friendly for economists.
- Technical Capabilities: The presentation showcased the range of applied mathematics and computer science techniques employed by Dynare, including nonlinear solving and optimization, matrix factorizations, local functional approximation, Kalman filters, MCMC techniques for Bayesian estimation, and more.
- Widespread Use and Applications: The versatility of Dynare has led to its adoption by private financial institutions, public bodies like central banks, ministries of economy and finance, and international organizations for policy analysis and economic forecasting. It's also extensively used in academia for research and teaching in postgraduate macroeconomics courses.
- Community and Open-Source Development: The development of Dynare is community-driven and supported by an open-source model. Online forums, scientific conferences, and training workshops have fostered a large, collaborative community around Dynare.
- Future Projects and Improvements: Villemot discussed future enhancements, such as performance improvements for large models, support for heterogenous agent New Keynesian (HANK) models, global solution methods, and more interactive model building.