GDSGE: A Toolbox for Solving DSGE Models with Global Methods

Welcome to GDSGE’s documentation!

GDSGE is a toolbox that solves nonlinear Dynamic Stochastic General Equilibrium (DSGE) models with a global method based on the Simultaneous Transition and Policy Function Iteration (STPFI) algorithm introduced in Cao, Luo, and Nie (2023). It allows users to define economic models in compact and intuitive scripts, called gmod files (gmod stands for global model). It parses the script into dynamic libraries which implement the actual computations (policy function iterations and Monte Carlo simulations) efficiently in C++, and provides a convenient MATLAB interface to researchers.

The toolbox can be used to solve models in macroeconomics, international finance, asset pricing, and related fields.

To get started, run in the MATLAB command window

websave('gdsge.zip','https://github.com/gdsge/gdsge/archive/refs/heads/main.zip')
unzip gdsge.zip
mex -setup c++
cd gdsge-main/tests
runtests

These commands download the latest version of the toolbox, set up the mex compiler, and run the test examples. This works on Windows, macOS, and MATLAB Online (Linux). These produce all results in the companion paper Cao, Luo, and Nie (2023).

Then try the leading example, Heaton and Lucas (1996), by compiling the gmod file HL1996: run in MATLAB

gdsge_codegen('HL1996')

The toolbox source code is hosted at: https://github.com/gdsge/gdsge, where you can download the latest version of the toolbox, find detailed instructions for setting up the compiler, and submit issues.

Examples and documentation of the toolbox are provided below.

Lectures on the toolbox can be found at Lectures.

If you have comments, suggestions or coding questions for us, or would like to contribute GDSGE examples, please reach out to us at: gdsge.cln2020@gmail.com


Contents:

Indices and tables