Matlab codes for Closing Small Open Economy Models, by Stephanie Schmitt-Grohe and Martin Uribe
 

Notes:
(1) Symbolic Math Toolbox is required
(2) The files listed under "General Tools" below are required.

Endogenous Discount Factor Model
mendoza91.m
mendoza91_ss.m
mendoza91_run.m

Endogenous Discount Factor Model without Internalization
mendoza91s.m
mendoza91s_ss.m
mendoza91s_run.m

Internal Debt Elastic Interest Rate Model (only in textbook)
deir.m
deir_ss.m
deir_run.m

External Debt Elastic Interest Rate Model
edeir_model.m
edeir_ss.m
edeir_run.m
Note: Run edeir_model.m once (it creates edeir_num_eval.m). No need to run edeir_model.m if parameter values are changed. Then run edeir_run.m.

Portfolio Adjustment Cost Model
bac.m
bac_ss.m
bac_run.m

Complete Asset Markets Model
cam_model.m
cam_ss.m
cam_run.m
Note: Run cam_model.m once (it creates cam_num_eval.m). No need to run cam_model.m if parameter values are changed. Then run cam_run.m.

The Nonstationary Case
rw.m
rw_ss.m
rw_run.m

Perpetual Youth Model (only in textbook)
py.m
py_ss.m
py_run.m

General Tools
Matlab Code for First- and Second-Order Accurate Solution to DSGE Models