Here you can download various programs for business cycle
analysis. All programs are written in GAUSS and no further documentation is
provided. Please acknowledge when used.
1. The Hodrick-Prescott filter.
The HP (1980) filter is widely applied and coding is
available here for GAUSS versions of a FORTRAN program by Ed Prescott.
HP1: This program is relatively fast if you're filtering
many time series. You call the procedureby the command hp1(dat) where dat is your data. Remember to
take logs and to specify the smoothing parameter in the program itself.
HPNEW: There is an alternative version here where you call
it as hpnew(dat,lambda) where dat is your data series and lambda is the value of the
smoothing parameter.
2. The Marcet-Ravn Version of the HP-filter
This program computes the alternative version of the
HP-filter that Albert and I propose in 'The HP-filter in Cross-Country Comparisons'. The
idea is to formulate the filter as a constrained minimization prblem and then impose the same constraint
across countries. It could be used for the same purpose comparing different time periods as well. The Gauss programs should be relatively self-explanatory. Click here to download GAUSS program.
3. Solving Real Business Cycle Models.
Want to solve and analyse calibrated RBC models? In that case, you can apply the programmes provided below.
There is also an info file which gives some further details, and example files for each of
them.
A.The King-Plosser-Rebelo (JME, 1988) programmes.
There are four programmes with notations that follow King et al, 1987, very closely.
The programmes are GAUSS versions of MATLAB programmes by KPR.
The linearized economy is solved for the optimal decision rules using the saddle
point stability property of the competitive equilibrium.
1) DYN.E - setting up the basic system matrices and
manipulating the system.
2) MDR.E - solving for the Markov-decision rules
3) IMP.E - computing impulse responses and transitions
towards the steady state
4) SIMUL.E - simulating the model with stochastic shocks.
Results are HP-filtered but moments of 'raw' data can be computed directly.
STEP 1 AND 2 SHOULD ALWAYS BE COMPLETED BEFORE 3 OR 4
There are 4 example files in DYN.X1, MDR.X1, IMP.X1, AND
SIMUL.X1. These illustrate the simplest model economy from KPR, 1988a.
B. Solving for the decision rules using a Ricatti Equation
Approach
There are three programmes which solve for the decision rules
using a quadratic approximation of the value function. You can find a description of this
technique in Hansen and Prescott's chapter in the Cooley volume. The files contain the same example as
above.
1) PROG1.E - formulating your model and solving for the
decision rules.
2) PROG2.E - computing impulse responses.
3) PROG3.E - stochastic simulation of the model.
4. Other Business Cycle Gauss Programmes
A. The Backus, Kehoe and Kydland, AER, 1994
Economy.
The following files includes the programmes for solving the
BKK 1994 (AER) model of multiple goods. The model is simplified in such a way
that capital adjustment costs (time to build) are excluded. The programmes solve the model using
the Ricatti Equation method and precision is enhanced by using a log transformation. The
documentation is a bit scarce but the notation should be obvious. The programmes can be
used also for reproducing the results in Ravn, Journal of International Money and Finance,
1997. The programmes are:
1) lbkk.dyn - solves
for the optimal decision rules
2) lbkk.imp - computes impulse response functions
3) lbkk.sim - simulates the model and computes business
cycle statistics
B. The Mehra and Prescott, JME, 1985 Economy
This programme computes the unconditional equity premium for
the Mehra and Prescott JME (1985) economy. All the notation etc. follows their
paper.