Homeworks for Econ 8185 Quantitative Macro, Fall of 2013


There may be preliminary versions of future homeworks in this page. I may change them until the day I state in the course homepage that the relevant homework batch is ready.
  • First Homework batch. Due Wed September 11th. Name them h1, h2 and so on.
    1. Data manipulation.

      1.A Fetch and plot US quarterly GDP Investment plus durables plus net exports, non-durables plus services, and aggregate hours both from CPS and from the firm survey (see Cooley chapter 1, page 30). Store it in pdf, eps, and emf or wmf formats.

      1.B HP filter and plot US quarterly (log) GDP. Store it in postcript or pdf. Compute the same table as in the Cooley book for those 4 variables using data up to 2003:4 or later.

      1.C Calculate a linear trend and decompose log GDP in the linear trend the hp trend and the hp residual.

      1.D Plot the growth rates together with the hp residual and comment the differences.

      1.E Compute a VAR of those 4 variables and plot the impulse responses. Make sure that you explicitly state what are the identifying assumptions that you make.

    2. Interpolation.

      Write a routine that linearly interpolates. Apply it by storing the value of exp (x) between 0 and 1. in intervals of .1 and assessing the value by interpolation in intervals of .05. Plot the function and what results from using approximation.

    3. Solving Equations of one unknown.

      (Parts of Homework 1 of Chapter 5 of Judd's book.) Solve sin 2

      x- 2x=0 using bisection between x 0 =-5 and x 1 =5 (If this interval is a bad one change it).

    4. Production Function manipulation.

      Compute labor factor shares with a CES production function

      Y=[ q K r +(1- q )N r )] 1/ r

      when K=N=1, and K=2, N=1. Are they the same?

      What about with Cobb-Douglas ( r =1).

      Note that Labor share = w*N/Y, and that under competition w=(dY/dN).

    5. Using symbolic software to obtain derivatives.

      Write in two equations in the capital-labor ratio and total labor the steady state conditions of the growth model with log utility and constant Frisch elasticity of labor (look up what this means if necessary). Use the CES production function with depreciation. Use mathematica or maple or matlab with the symbolic toolbox or even sciword if this does the job.

    6. Fetching data, U.S. and abroad.

      6.A Obtain and plot, since the earliest that you can after 1950, U.S. GDP, Consumption, Investment, Government expenditures, Employment, and the CPI.

      6.B Decompose and plot one of the series between a time trend (constant growth rate) and a residual.

      6.C Obtain the same series for your favorite European or Asian country and plot them and get the Solow residuals of the same series than the one you did for the U.S. Compare them and make some brief comments on what you see.

    7. Computation of the Solow Residual.

      7.A Use NIPA and the logic of the imputation of income to either labor or capital found in Cooley and Prescott (1996) to compute an updated series of the Solow residual.

      7.B Take away a linear trend (in logs) of the Solow residual and rename the new object alos as linearly detrended Solow residual. Estimate a univariate process for this new variable. Make sure that you argue forcefully for your specification.

      7.C Compute a bivariate VAR with the linearly detrended Solow residual and linearly detrended output and a linearly detrended trivariate VAR with the Solow residual, output and linearly detrended hours worked.




  • Second Homework batch. Business Cycles Questions. Due Wed Sept 18.

    1. Use a standard growth model suitable to measure the contribution of productivity shocks as represented by the Solow residual to movements in output and hours worked between 1954-2012.

      8.A Specify some steady targets that your model should satisfy.

      8.B Solve for the steady state. Be lazy and use software to get the derivatives and dynare to get the steady state.

      8.C Answer the question using dynare and the estimated process for the Solow residual.

      8.D Reassess your answer with data since 1982. Get labor data from Manovskii, here and described here of labor in the CPS and reestimate your answer.

      8.E Redo your answer posing alternative processes for the Solow residual (random walk with drift, AR(2)).


    2. Using a growth model with separable utility.

      9.A Specify the steady targets that your model should satisfy. Argue your case thoroughly.

      9.B Compute your answer using dynare.

      9.C Explore alternative specifications of the calibration targets based on some alternative logic and report your answers. What matters.

      9.D Redo your answer posing TFP shocks and shocks to the relative price of investment (which you have to compute using mostly Violante and coauthor's series).


    1. Comparison of calibration and estimation.

      10.A Pose a version of the model with the same steady state calibration than in Question 9 but now estimate processes for two independent shocks. One to hours worked in the utility function and another to the Solow residual using data of output and hours by using ML or by Bayesian methods.

      10.B Do it again with three independent shocks. One to hours worked in the utility function, another to patience, and another to productivity using data of output the Solow residual and hours by using ML or by Bayesian methods.

      10.C Redo the estimation adding labor share and the Frisch elasticity of labor to the parameters that govern the three shocks.

      10.D Compare the answers obtained in 10.A, 10.B, and 10.C.



  • Third Homework batch. Demand Shocks Due Wed Oct 9.
    1. Demand Shocks.

      12.A Use the model in this paper to estimate the contribution of shocks to preferences to movements in hours worked. To do this you have to pose shocks to the contribution of non tradables to utility or to the contribution of all consumption to utility or shocks to the search disutility. Then estimate an AR(1) for those shocks that replicates the linearly detrended Solow residual. Once you do that report the ratio of model hp-variances to data hp-variances for all the main aggregates. See the report on the class of Oct 2 to see more details about this homework.




  • Fourth Homework batch. A global approximation. Due Wed Oct 16.

    1. Global approximation.

      12.A Take a deterministic version of the growth model without leisure. Find the steady state and construct a 21 point grid from half to two times the steady state of capital. Do it in logs.

      12.B Write a f90 or f95 code that computes a piecewise linear approximation to the decision rule of capital for the optimal capital accumulation function. Use collocation (or the Dirac measures at the grid points) to weigh the errors. Plot it. If you insist, use some alternative global solution method.

      12.C Compare it with one that results from doing the same approximation with only 7 grid points over the same range. Was it worth to go from 7 to 21 grid points?

      12.D Use now the endogenous grid method to solve for the decision rule for capital (in case you did not use for parts B and C).

      12.E Do it now for a stochastic version of the growh model with leisure. Use this paper for details.



  • Fifth Homework batch. Data Sets Questions. Do one of the two. Due Oct 24.
    1. Read data sets: I. The Cross-Section data set Problem.

      Denote by i,g your own age plus 17 and your gender. Now take the CPS or the CEX and find out the average number of hours worked by people of type g, i plus/minus 2. Sort this group into dropouts, high school graduates and one year of college, 2 to 4 years of college, and some posgraduate education and report the average time worked and the average wage for those that work, the average time worked per person, the fraction that work, the fraction married, the number of children among those married and the number of children per female parent or single father, and the number of children per marriage. This for every five years starting 1980 and up to the latest available. Report an additional feature of this group that you may find interesting.

    2. Read data sets: II. The Panel-Data data sets question.

      Create a table describing the time series properties using PSID or HRS or NLYS data with information on household heads- their gender, marital status, number of other people in the household, hours worked by each member of the household and their wage rates. Use this data to think about a way to summarize hours worked and the labor force engagement per household over time (whole life for the PSID and after fifty or youth for the other 2). Also track the stability of households over time i.e. changes in marital status and number of household members. Do you notice any interesting features?




  • Sixth Homework batch. Transition in a Growth Economy Due Wed Oct 31.
    1. Transition.

      15.A Take your favorite version of the neclassical growth model. Calculate its steady state.

      15.B Now suppose that by surprise, TFP doubles. Compute the new steady state and the transition from the old to the new, assuming that it has completed in 200 periods. Compute such transition three ways and specify how long it takes to solve it each way. The first way is a system of 200 equations and unknowns, the second by guessing first period capital and hoping that the system gets the right capital in period 201, and by guessing capital in the period 200 hoping that if you moved backward you obtain the right initial capital.




  • Seventh Homework batch. The Aiyagari Economy I Due Wed Nov 7.
    1. The household problem

      Write fortran (or C, but better f95) code for the problem that a household solves in an Aiyagari economy without leisure and a Markov shock to earnings. Use the calibrations of say my paper with Antonia Diaz and Josep Pijoan, Tables 1 and 8 (or another is you prefer it). Make sure that in your parameterization of the problem you choose an arbitrary value for the wage and a value for the interest rate that is small (smaller than (1/beta)-1). Use the endogenous grid method with piecewise linear interpolations in the Euler equation.


    1. The Stationary Distribution

      Use the decision rules of the previous problem,

      17.A Compute the stationary distribution of this economy. Use both an approximation to the cdf. And a huge sample.

      17.B Compute and plot the Lorenz curve for wealth.

      17.C Compute the persistence of inequality in this economy. Choose a statistic, compute it and argue its usefulness.