Economics 613a -- Advanced Macroeconomics I
Computational Methods of Macroeconomics
Fall 2006
University of Western Ontario


Instructor: Karen Kopecky
Office: SSC 4024
Office Hours: By Appointment
Course Time: Tuesdays and Thursdays 2:00-3:30pm
Location: SSC 4032
Course Web Page:


Course Description
The primary goal of the course is to equip students with the numerical tools necessary to tackle interesting
questions in macroeconomics. The course has two main focuses. The first is the study of numerical methods and
algorithms pertinent to solving and analyzing macro models. The second is the study of good examples of their
application by macroeconomists. While this is not a computer programming course, the course work will be
computational in nature. Students should be familiar with some programming language such as Matlab, Fortran, or
C. While all the course work can be completed with Matlab, my recommendation to students who are serious about
macroeconomics is to use this course as an opportunity to learn either Fortran or C.


Handout and Assignments

Course Outline

Guide for preparing presentations (inspired by Kydland and Prescott (1996))
Programming Tips
Assignment 1 (Due: October 3rd)
Paul's lecture notes on stationary measure stuff
Assignment 2 (Due: October 29th)
Assignment 3 (Due: November 14th)
Assignment 4 (Due: December 5th)
Papers on projection methods: Judd (1992), McGrattan (1996), McGrattan (1998)


Assignment 1 Solutions
Question 1:
Question 2: fortran, matlab
Question 3: fortran 1, fortran 2, matlab


Assignment 2 Solutions
Question 1: fortran
Question 2:
Question 3:


Assignment 3 Solutions
Question 1:
fortran-silverfrost version: code, zipped-up project
  fortran-intel version: code, zipped-up project


Assignment 4 Solutions
Question 1 : example code (same problem solved with Matlab and collocation), fortran (uses numerical recipes)
Question 2 : fortran (for intel using numerical recipes), Silverfrost version
Question 3 : fortran (uses mherzo and NAG library)


Some Useful Links

Numerical Recipes' Website
Makoto Nakajima's Fall 2004 Computational Methods Course
Makoto Nakajima's Spring 2006 Computational Macro Course
Heer and Maussner's Textbook Page
Prescott's Papers
Silverfrost Fortran95
Fortran numerical libraries and other tools
TOMS611 library for unconstrained minimization


Fortran Example Code
From Lance
Class Example 1
Class Example 2
File reading and writing example code and data file
Subroutine which computes the optimal nodes and weights for Gauss-Hermite quadrature: mherzo.f90 and example code. It's a modified version of some code from here.
Program which generates normally distributed random numbers is here.


What did we do?  
09/12/06 We talked about Kydland and Prescott (96), computer programming, and computer error.
09/14/06 We talked about Fortran, programming, and numerical computation.
09/19/06 Fortran Overview, HP filter, value function iteration.
09/21/06 value function iteration, convergence rates, one-dimensional root-finding.
09/26/06 We finished one-dimensional root-finding and did numerical differentiation.
09/28/06 We discussed the hwk.
10/03/06 We looked at a good example of how to slow down matlab code and we finished numerical differentiation .
10/05/06 Polynomial interpolation and orthogonal polynomials.
10/10/06 I got to learn instead of teach. Paul taught us about stationary distributions and their existence.
10/12/06 Chebyshev Interpolation and Regression with application to NGM. It was snowing while we were in class.
10/17/06 Newton-Cotes quadrature and Romberg Integrations.
10/19/06 Gaussian quadrature .
10/24/06 Computing expectations numerically/discretizing continuous processes
10/26/06 Discretizing AR(1)'s, Monte carlos
10/31/06 Parameterized Expectations
11/02/06 No class on account of CMSG.
11/07/06 No class on account of CMSG.
11/09/06 Paul talked about log-linearizing and I reviewed parameterized expectations
11/14/06 Projection methods
11/21/06 Projection methods


back to homepage