In this repository you will find the replication files from the paper "Solving DSGE models with incomplete markets by perturbation", by Guillermo Hausmann-Guil (Review of Economic Dynamics, 2025).
I solve most of the applications with both Dynare (5.x version) and the solution package by Levintal (2017), so you can visualize codes in parallel and learn how to use one toolkit starting from the other. Note that there's always 100% agreement on the results between codes using either toolkit.
All the codes were tested with MATLAB R2021a and Dynare 5.5. The codes will not work with the latest Dynare 6.x version because the Dynare team changed the syntax of MATLAB functions.
Each folder comes with a readme ".txt" file that lists the files and provides instructions. See also "consolidated readme file.txt" for a folder-by-folder description and computing times.
The folder "Perturbation" consists of the solution package by Levintal (2017), which comes with its own license.
Advice: If you change from Levintal's toolkit to Dynare's routines (or viceversa), remember to remove the corresponding folders with codes from the MATLAB search path, as otherwise the packages may conflict with each other.
Please write to guillermo.hausmann@evaf.vu.lt if you find any issue.
You are welcome to use these files for your own research. Just remember to give credit to the sources!