Doing Macro, UC3M, Throughout 2011

José-Víctor Ríos-Rull:,

  • Department of Economics University of Minnesota Phone-(612) 625-0941 4-101 Hanson Hall (off 4-179) Fed Phone (612) 204-5528 1925 Fourth Street South Fax: (612) 624-0209 Minneapolis, MN 55455. Homepage

  • There will be sessions of this course May 9 to May 20 and May 25 and 26. The classes will be 12:30 to 14:00 in 14.0.07.

    Due to Jordi Gali's seminar, Thursday May 19th the class will start at 11:30.

    What are we doing? A class by class ex-post diary, and list of the next class.

    1. Jan 26.

      We talked about the course, and what it is about. We went over all the details. We started with a discussion of what is it that it means to do Quantitative Macro, which is to answer quesstions with the aid of a model that can be solved and mapped to the data. I described the first homework which involves computing the Solow residual, estimating a process to represent it, posing it as a shock of a model that can be thought of representing a modern economy (has leisure and capital that depreciates it goes on forever), map the model to data, solve the model, use it to generate time series and compare the properties of those time series with those of the U.S. economy. The simplest way to do the homework is to use dynare. Some examples are provided here by J. Fernandez-Villaverde.

    2. Jan 27

      We went over the main tool of applied macro, that of Recursive Competitive Equilibria. We look at two specific models one with government policy, including debt, and one with more than one agent useful for example for international economics.
    3. Jan 28

      We looked at the other main class of tools for modern macro, using measures to describe economies. For this, we did some necessary math (measure theory) and went over various versions of Indusry equilibria as posed by Hopenhayn.

    4. Monday May 9th. Restart and various items

      We talked about the objects of your interests (entrepreneurship, new keynesian models of the labor market, asset prices with rigidities in the labor market). We also talked about the fundamental Real business cycle and how it fails. We did some planning for the next clasess.

    5. Tuesday May 10th. Housing

      We will again review some of the topics of your interests. Robert will explain us what is the role of heterogeneity in his monetary project. I will talk about how to model housing, and what is it from the point of view of macro.

    6. Wednesday May 11th.

      I presented a model of human capital accumulation to address fundamental differences in mortality across education groups.

    7. Thursday May 12th.

      I presented a model where households changed their size over the business cycle.

    8. Friday May 13th.

      Omar and Giorgiy presented. Thanks. Omar presented ... and Giorgiy presented a model of household formation.

    9. Monday May 16th.

      Lian on occupational choice and mobility with financial frictions in developing countries. Roman on a dynamic model of vertical integration. Thanks Lian and Roman.

    10. Tuesday May 17th.

      In the first part of the class, I will give a discussion of productivity shocks. Then I give the seminar which I cconsider an integral part of the course.

    11. Wednesday May 18th.

      Luis talked about how to think of an exogenous change of the interest rate as a mechanism to change housing prices. I started a model of household formation.

    12. Thursday May 19th.

      Cecilia talked about a model of investment to attract scarce resources. It can be applied to get spouses. I then discussed the problem of transitions. We then went and learned from Jordi Gali.

    13. Friday May 20th.

      We spent some time discussing Jordi's seminar. I talked about bankruptcies.

    14. Wednesday May 25th.

      Olga talked about how to think of credibitlity of a Central Bank. Luis gave a brief description of the logic of his project.

    15. Thursday May 26th.

      We discussed a bit of household formation in preparation for J Knowles seminar and we talked about the role of the course and of possible continuations. We went and had a caƱa.


    The homework consists essentially in replicating the calculations done in this paper. So I want you to collect data, from the first quarter of 1984 to the latest available, and do two things with them. First, hp-filter the data and describe their properties using the statistics of standard business cycle analysis. Second, estimate a univariate process for the Solow residual calculated as in the paper or as we talked in class.

    I also want you to pose a model. The baseline in this paper is fine, any change will be very welcome. Once the model is posed, you have write code to be able to solve it. Dynare is the easiest form of doing so. Then calibrate the economy (you have to write how, and why if different from that in the paper). Then simulate the model using your estimates of the Solow residual above and compare the statistics it generates with those of the data.

    I would be extremely happy if you were to do this with Spanish data instead of U.S. data.

    Email to me the results in pdf by May 5th.

    Course Description

    The target of this course is to aid you to transform a question into a strategy to write a paper. The first few classes are pure investment in tools (this includes the homework) that I think are necessary. After that, I want to discuss and shape questions into modeling strategies. These need identification (how can the data talk to us) and what are the ingredients of a model to be able to answer the question.

    This course can be thought of as an addendum to the other courses that you take that give specific tools or issues, but are less concerned about the linking of models and data and the writing of your papers.

    This requires your very active participation. So please think of a question (some of you have already talked to me and are reading papers to present) and/or a specific paper or papers that you may want to extend. Then you should volunteer to present it. This requieres that you digest the paper well and write slides (no more than 8). One with the question. Four or five with the main ingredients of the model. Another with its strategy to learn from the data, and the final one with its findings.

    This is a Ph.D. course not a Masters course. As such students are not expected to learn what other people have discovered, but the tools that are needed in order to discover things by themselves. Because of this reason the active work of the students is crucial to achieve the objective of mastering the tools that are described above. This is a course to learn to do things, and, therefore, it requires to do some things.

    Every class except the first one we will devote the first twenty minutes or so to students presentations of homeworks. I expect professional competence in this regard.

    What about knowledge of Computers?

    This is not a course in computer languages so students are responsible to learn to write computer programs. Students are also responsible for learning their way around McNeil computational facilities. I do not expect anybody to have a computer at home or anything like that. It is better to work in McNeill's computer room because you can talk to each other.

    There are various general classes of computer languages.

    • Fortran 90. This is the best and more powerfull computer language. Among economists very few prefer C. It is a little bit hard at the beginning (you have to declare variables and the like) but students have told me it is well worth to learn as soon as possible. A very good introduction to fortran can be found here.

    • MPI and open MP. This is the mother of all serious calculations. It is a form of using f90 to parallelize code and take advantage of various hardwares.

    • Matlab, Gauss, Scilab, Octave and R. These are very popular packages in economics. They are relatively easy to learn and code writing is easy. They generate a lot slower code than F90 (about 100 times) but they are probably a good choice to solve some problems. They may have an interface with f90 but I have never seen it working. Matlab is by now used in 90% of the cases. R and Octave are free. Dynare works with Matlab and Octave and it is dumb simple.

    • Stata, Eviews, R, Gretl, and Maple, SAS. These are packages best suited for reading data. State is the most popular and expensive. (I have used fortran for this which is insane, others have used Gauss). Still it is worth to learn stata.

    • Mathematica and Maple. These are packages capable of doing symbolic manipulation of equations. Occasionally they can also be used to do numeric calculations. It does not hurt to know them. They may work together with matlab and sciword.

    • Excel, open office Calc. A dirty thing to do fast data manipulation. Perfect for grades. And to get output of models. Calc is free and slow.

    • A program to write plots. Sciword does it as matlab and excel and gauss. Some dinosaurs like me use gnuplot.
    Students should be able to write code in F90 in addition to matlab or gauss and to stata. Most students tell me in later years that I should have enforced harder the learning of F90, but I am willing to consider exceptions. If somebody has a serious reason not to use F90, please come and talk to me. At least one homework should be answered in f90.

    What about textbooks?

    In addition to the standard macro books (Stokey and Lucas, [1989], Harris, [1987], Ljungqvist and Sargent, [2000]) I find that there are a few books of interest.
    • Cooley and Prescott, [1995]. It is now dated but it contains some important lines of attack on business cycles. The computational techniques are a little bit obsolete, but the questions less so.
    • Judd, [1998]. is a general computational textbook with special attention to economists. While it is short on some details that we care about (complicated equilibrium considerations, multidimensional value functions, multidimensional interpolation) it is a very useful book for many topics.
    • Marimon and Scott, [1998]. It has a bunch of chapters that deal with specific problems. I find the continuous time chapter nice as well as some scattered other chapters.
    • Miranda and Fackler, [2002]. It is quite a nice book. Like others it is too irrelevant in some places and too easy in others. It is designed for matlab which is a pity, but it has a nice implementation (via a <a href="" > downloadable toolbox</a>) of function global approximations.
    • Heer and Maussner, [2004]. This is a nice book with a lot more economics than the others. Its consideration of the theory is closest to what we do. It has also many examples. The codes can be found here.
    • Press et al., [1992]. The classic book for numerical analysis. Very useful.

    Some interesting and useful links

    Tips for Doing Computational Work in Economics by Tony Smith for insights.

    Makoto Nakajima's course materials a great place for stuff.

    Allan Miller's Fortran Software A good list of recently updated F90 codes.

    Computer Codes from RED.

    Fortran repositories. A place to look for that routine that you need.