Simulations in MATLAB
 

                        The Relaxation Algorithm

 
Frontpage

Relaxation algorithm

Diamond OLG-model

Rational stochastic bubble

In Trimborn, Koch, and Steger, "Multidimensional transitional dynamics: A simple numerical procedure", Macroeconomic Dynamics, vol. 12, 2008, 301-319, the relaxation algorithm is proposed as a simple and powerful method for determining the solution of many dynamic macroeconomic models with forward-looking expectations numerically. An associated MATLAB program has been developed and described by Trimborn, Koch, and Steger. The program is designed for conducting simulation studies of the transition path in continous-time macroeconomic models. Among other things the program can handle models which exhibit saddle-point stability. This is useful in particular when an analytical solution to the model is not available. The reduced form system of differential equations is sufficient. The algorithm can even cope with situations where no explicit solution for the steady state values exist.

How to use Relaxation in MATLAB

First you download the system files (containing the algorithm) and the Instruction Manual by Trimborn, Koch and Steger (June 2008). Install the system files in a sub-folder in the directory where you also place the MATLAB code for the specific model you want to simulate (cf. the Instruction Manual).   Then download the MATLAB code for the specific model you want to simulate. Open MATLAB and add the directory with the system files and the MATLAB code for the chosen model in HOME - Set Path - Add Folder (or Add with Subfolders) - Save - Close. (In older versions of MATLAB: Choose File – Set Path.)

In MATLAB open Desktop - mark Command Window, Current Directory, Workspace, Toolbar, Current Directory Toolbar, and Titles. 


So far the following models are available:

Other models may be found here. The model you want to study may not be directly available, but it is easy to modify one of the available models.

Notice that the number of mesh points may be important for the properties of the numerical procedure. In Relaxsetting.m increase the number of mesh points if the convergence towards steady state seems awkward. This might help.

Last updated March 9, 2012
Niklas Brønager and Christian Groth
Department of Economics
University of Copenhagen