The Cycle as Equilibrium
Could booms and slumps be an economy's best response to shocks it cannot avoid?
The part opens on Kydland and Prescott's paper of 1982 and on two cycles side by side, America's and a frictionless model's. It defines the cycle by filters (Hodrick and Prescott against Hamilton, and the end-point problem), asks the viewer which of six series turns first before a recession (housing), and builds dynamic programming from a cake: the Bellman equation solved by hand, then by value function iteration, with the contraction drawn. It solves Brock and Mirman's stochastic growth model, builds shocks as Markov chains (Tauchen against Rouwenhorst), adds labour supply and Hansen and Rogerson's indivisible labour, calibrates the model, and solves it by counting the roots of the linearized system. After an intermission of America's cycle since 1947, it puts the model's impulse responses and moments beside the data's, shows what fails (hours against productivity, the Solow residual's recessions), re-estimates Gali's VAR in both specifications, scores Prescott's estimate, measures the labour wedge, and reads the Frisch elasticity dial.
What you need. Part 7: discounting; Part 20: the Solow model and the residual; Part 22: consumption smoothing; Part 28: rational expectations. Chapter 3 needs a derivative and a geometric series; chapter 4 the idea of a fixed point; chapter 8 eigenvalues of a 3-by-3 matrix; chapter 11 a vector autoregression.
- Hook
- Kydland and Prescott's provocation, 1982
- Ideas, models and mathematics
- business-cycle facts and filters, the Bellman equation, value function iteration, the stochastic growth model, calibration, log-linearization and the saddle-path condition, impulse responses, what the model misses
- Agora gains
- a dynamic programming solver; an RBC model
- Play it
- which series leads the cycle?
What you will be able to do
Principles and the major
- Explain how a business cycle is measured against a trend, and why the filter matters.
- Write a Bellman equation for the cake problem and solve it, and explain intertemporal substitution and indivisible labour.
- Explain what the real business cycle model gets right and wrong about the US cycle.
Graduate
- Solve a dynamic program by value function iteration and explain why it converges.
- Discretize an AR(1) by Tauchen's and Rouwenhorst's methods, and log-linearize and solve a model with the Blanchard-Kahn conditions.
Research
- Weigh the evidence on technology shocks and hours (long-run VARs, purified technology) and on the Frisch elasticity, micro against macro.
Practice
- Lay out the workflow of a structural model in a policy institution, from steady state to scenario.
Contents
Each chapter has a home level. Choose a track to see what to read and watch: Principles and the major 32 min · Graduate 45 min · Research 53 min · Practice 35 min.
- 0Could booms and slumps be an economy's best response to shocks?Principles and the major3 min
- 1What a cycle isPrinciples and the major5 min
- 2Play it: which one turns first?Principles and the major2 min
- 3Dynamic programming: the cakePrinciples and the major4 min
- 4Value function iterationGraduate3 min
- 5The stochastic growth modelGraduate3 min
- 6Why work more in a boom?Principles and the major3 min
- 7CalibrationPrinciples and the major3 min
- 8Solving the model: the saddle pathGraduate3 min
- Intermission: America's business cycle since 1947Principles and the major
- 9The model beside the dataPrinciples and the major3 min
- 10What fits and what does notPrinciples and the major4 min
- 11The criticsResearch5 min
- 12What survivedPrinciples and the major3 min
- 13The Dials: the Frisch elasticityResearch2 min
- 14In practice: the model in the institutionPractice3 min
- 15Frontier: beyond one household and one shockResearch2 min
- Recap, problems, and the road aheadAll tracks3 min
Also on this page: Lecture · Key results · Try it · Lab · Problems · Notes and sources · Build the film.
Lecture
The text of each chapter is the film's narration, as it is spoken, so you can read along or revise without the film. The pictures are in the film.
Could booms and slumps be an economy's best response to shocks?Principles and the major3 min
In November 1982, the journal Econometrica published a paper by Finn Kydland and Edward Prescott called Time to Build and Aggregate Fluctuations. They took the growth model of Part twenty, added random shocks to technology, and chose its numbers from the long-run facts of growth. The result, they said, looked like the American business cycle. If that was true, recessions were not failures at all. They were the economy's best response to bad luck, and policy had nothing to fix. That claim turned out to be mostly wrong. But the method they used to make it won completely, and it is the method this part teaches.
Here is what they meant. Two series of output, each measured as a percentage gap from its trend, two hundred quarters each. One of them is America's. The other is a model with no money, no unemployment, no monopolies and no market failures of any kind: a single household that saves and works as it pleases, hit by random changes in technology. Which is which? A is America, from 1970 to 2019. B is the Island's model, which you will build in this part. They are not the same, but at a glance they are hard to tell apart, and that resemblance changed macroeconomics.
This part's question: could booms and slumps be an economy's best response to shocks it cannot avoid? To answer it you need a tool for problems that never end: dynamic programming. Then a way to build an economy with shocks in it, choose its numbers, and solve it. And then the test: how close does it come to the data, and where exactly does it fail?
Economics, Built. Part twenty-nine: the cycle as equilibrium. Here is the plan. What a business cycle is, how a filter defines it, and a game: which series turns first? Dynamic programming from scratch, with a cake. The stochastic growth model, shocks as Markov chains, and why people work more in a boom. Calibration, and how to solve the whole model by counting the roots of a matrix. Then the model beside the data, its critics, what survived them, and a new dial: how much people change their hours when wages change.
What it does: Kydland and Prescott (1982); America's cycle beside the Island's, 200 quarters each; objectives
1What a cycle isPrinciples and the major5 min
First, what is a business cycle? In 1946, Arthur Burns and Wesley Mitchell defined it as expansions that happen at about the same time in many economic activities, followed by similarly general contractions: recurrent, but not periodic, and lasting from more than a year to ten or twelve years. Here is America's real output since 1947, on a log scale, so that a straight line is steady growth. The grey bands are the recessions dated by the committee of the National Bureau of Economic Research that Burns and Mitchell built: 12 of them. Look how small they are against the growth. The cycle is a wobble around a trend, and to measure the wobble you first need the trend.
The most used trend in macroeconomics was proposed by Robert Hodrick and Edward Prescott, in a paper circulated from 1980 and published in 1997. Choose a trend tau to make two things small at once: the gaps between the data and the trend, and the changes in the trend's slope. The first term keeps the trend close to the data. The second keeps it smooth. Lambda sets the balance, and for quarterly data everyone uses sixteen hundred, a convention rather than an estimate. Here is the trend through log output, in gold. Subtract it and what is left is the cycle: output's percentage gap from trend. Its standard deviation is 1.6 percent, and every recession shows as a dip.
Not everyone accepts the convention. In 2018 James Hamilton published a paper called Why You Should Never Use the Hodrick-Prescott Filter. He showed it can create cyclical patterns that are not in the data, and that its estimate near the end of the sample keeps changing as new data arrive. His alternative: define the cycle as the error you make when you forecast output two years ahead by a regression on its last four quarters. Whatever you could not have seen coming is the cycle. In red, Hamilton's cycle; in green, Hodrick and Prescott's. They agree about timing, with a correlation of 0.73, but Hamilton's swings are twice the size: 3.2 percent against 1.6. How big the cycle is depends on how you define the trend, and so does every number a model is asked to match.
Here is the end-point problem at work. In gold, the Hodrick-Prescott cycle for 2000 to 2008, computed with only the data available up to the third quarter of 2008. It puts that quarter 1.8 percent below trend: the trend carries on at the pace of the boom years, and output has fallen short of it. In green, the same quarters filtered with all the data we have today, including the recession and the slow recovery that followed. Now the same quarter is 1.3 percent above trend, because the trend has bent down to meet the years after. Near the end of a sample, the trend is a guess about data that have not arrived. So the most recent cycle, the one a policymaker cares about, is the one any filter measures worst; here even its sign flipped.
With a filter in hand, the cycle becomes a table of numbers, and this table is what any model of the cycle is asked to explain. America, 1948 to 2019, before the pandemic. Output's cycle has a standard deviation of 1.6 percent. Consumer spending moves less, 0.77 times as much, and that includes cars and other durables. Investment moves 4.6 times as much as output: it is where the cycle lives. Hours worked move almost as much as output, and with it. Output per hour moves about half as much, with a correlation of only 0.44. Hold on to these numbers: in chapter nine the model gets its own column.
What it does: Burns and Mitchell; 12 NBER recessions since 1947; the HP trend (\(\lambda = 1600\)), s.d. 1.6%; Hamilton's filter, s.d. 3.2%, correlation 0.73; the end point; the table of volatilities
2Play it: which one turns first?Principles and the major2 min
Your turn. Here are six American series around the peak of a business cycle, the quarter the NBER says the expansion ended, marked by the dashed line. Each is the average over the ten recessions from 1953 to 2007, measured as a percentage from where the series stood at the peak, with its normal growth taken out. They include real output, consumer spending, business investment, housing investment, hours worked and output per hour, in some order. Which one turns down first, well before the recession begins? Pause, and choose a letter.
The answer is C: housing investment. On average it reached its high about 7 quarters before the peak of the cycle, and fell 21 percent below that high within a year after it. Output, hours and business investment turn together, about two quarters before the peak, and business investment then falls furthest and longest. Consumer spending flattens a little earlier. And output per hour does something interesting: it stalls well before the peak, dips as the recession starts, and then recovers while hours are still falling.
In 2007, at the Federal Reserve's Jackson Hole symposium, Edward Leamer gave a paper with the title Housing Is the Business Cycle. Housing is the kind of spending most sensitive to interest rates and to credit. It turns first because monetary policy and credit conditions turn first. Keep that in mind, because the model this part builds is driven by technology alone, and in a world driven only by technology there is no reason for houses to lead. It is a clue, and it comes back in chapter eleven, and in the next two parts.
What it does: Six average paths around ten NBER peaks; housing investment peaks about 7 quarters before and is 21% lower a year after; Leamer (2007)
3Dynamic programming: the cakePrinciples and the major4 min
Before an economy with shocks, a much smaller problem, which contains the whole method. You have a cake of size one, and it has to last for ever. Each day you choose how much to eat, and you want to make the discounted sum of your enjoyment as large as possible, subject to never eating more cake than there is. Eat some today, and save the rest. Your patience is 0.9: a slice tomorrow is worth 0.9 of the same slice today. Enjoyment is the logarithm of what you eat, so the first bite of a day is worth the most, and a day with nothing at all is a disaster. Written like this, it is a choice of infinitely many numbers at once, far too many to search.
Richard Bellman's trick, from the 1950s, is to stop thinking about the whole path. Let V of w be the best you can do, in total, starting with a cake of size w. Then V of w is the best choice of today's slice, c, of today's enjoyment, plus beta times the best you can do from tomorrow on, starting with what is left, w minus c. That is the Bellman equation. It rests on what Bellman called the principle of optimality: whatever you do today, an optimal plan must behave optimally from tomorrow on, given where today left you. The infinite choice has become one choice and one number, at the price of an unknown function, V, that appears on both sides.
For this problem the unknown function can be found by hand. Guess that V is a constant plus some number b times the log of the cake. Then today's choice must balance the last bite eaten today, one over c, against the value of saving it, beta b over what is left. That gives c as w over one plus beta b. Put this back into the equation and match the terms in log w on both sides: b must equal one plus beta b, so b is one over one minus beta. And the rule is beautifully simple: eat one minus beta of whatever is left. With patience 0.9, eat 10 percent of the cake every day, for ever. The rule is a policy function: it tells you what to do in every state you could find yourself in, not just along one path.
Here is the plan in action. The pale bars are the cake at the start of each day. The bright ones are what you eat: 10 percent of it. After twenty days, 0.12 of the cake remains. It never runs out: it shrinks by a tenth a day, for ever, and consumption shrinks with it. Most problems in this part cannot be solved by hand, so the next chapter does it the way a computer does, and the cake is the test that the computer gets right.
What it does: \(\max \sum \beta^t \log c_t\); the Bellman equation; the principle of optimality; \(c = (1-\beta)w\); the cake over 20 days
4Value function iterationGraduate3 min
A computer cannot guess the shape of V. It does something simpler. Put the cake sizes on a grid, here 1,001 of them, and start from any guess at all, say V is zero everywhere. Then apply the Bellman equation as a recipe: today's best choice, valued with yesterday's guess, gives a new guess. The guesses have a meaning. V n is the best you can do if the world ends after n days. V one: eat everything today. V two, V five, V ten: each is lower, because the cake must stretch over more days. By V one hundred, nothing moves any more. And the dashed line is the exact answer found by hand. The iterations land on it, except at the smallest cakes, where a grid of thousandths is too coarse to cut.
Why must this work? Call the recipe T: it takes a guess V and returns a new one. Take any two guesses. After one application of T, the largest distance between them has shrunk by at least the factor beta. Here is the distance between successive guesses for the cake, on a log scale. It falls on a straight line, by a factor of 0.90 at each step, which is beta exactly. David Blackwell showed in 1965 that two plain properties are enough for this: more cake tomorrow is never worse, and the future is discounted. A map that shrinks distances like this is a contraction, and a contraction has exactly one fixed point, which the iterations reach from any starting guess. Here it takes 238 steps to agree to ten decimal places. That guarantee is why economists can solve problems with no pencil-and-paper answer at all.
The value function is only a means. What you want is the policy: how much to eat with each size of cake. The dots are the computer's policy, read off the grid as the best choice at each point. The line is the exact rule, one minus beta of the cake. On average the computer eats 10.4 percent instead of ten, because on this grid the cake can only be cut in thousandths. Finer grids, interpolation between grid points, or smarter methods close the gap. Value function iteration is slow but almost impossible to break, and it is the method the rest of this part builds on.
What it does: \(V_1, V_2, V_5, V_{10}, V_{30}, V_{100}\) on 1,001 sizes against the exact value; the gap falls by 0.900 a step; 238 steps; Blackwell (1965); the grid's policy eats 10.4%
5The stochastic growth modelGraduate3 min
Now replace the cake with an economy. Output is made from capital, k, with a technology level, z, that changes at random. Each year the economy splits output between eating and next year's capital, and the Bellman equation now has two states, capital and technology, and an expectation over next year's luck. William Brock and Leonard Mirman studied this model in 1972. With log utility and capital that is used up within the year, it has a closed form: save a share alpha beta of output, 0.35, whatever happens, and eat the rest. Here is a century of it on the Island. In red, technology. In green, output. A good year raises output, and because a fixed share is saved, it also raises next year's capital, so output's swings last longer than technology's. Capital is the model's propagation mechanism.
A computer cannot hold a continuous random variable, so technology is squeezed onto a few values, with a table of probabilities for moving between them: a Markov chain. Here are four such tables, each with seven states. A row is today's state, a column tomorrow's, and a brighter square a likelier move. The aim is to copy a process with persistence 0.95, whose true standard deviation is 2.24 percent. George Tauchen's method of 1986, the old standard, gets 2.77 percent and a persistence of 0.962: close, but off. The method of Geert Rouwenhorst, revived by Kopecky and Suen in 2010, matches both exactly. And when persistence is very high, at 0.995, Tauchen's chain breaks altogether: its states are so far apart that it never moves, while Rouwenhorst's is still exact. Small numerical choices like this decide whether a solved model means anything.
Now solve the growth model the way the computer solved the cake: a grid for capital, a chain for technology, and value function iteration. First the test. With capital used up each year, the grid's policy is within 0.44 percent of Brock and Mirman's formula, less than one step of the grid. Then the real case: capital lasts, with a tenth wearing out each year, and there is no formula. Here is how much capital grows, against how much there is, one line for each of five technology states, from bad in red to good in green. Each line crosses zero where capital would stay the same: with good luck the economy builds towards more capital, with bad luck it runs capital down towards less. The computer took 409 iterations and did not care that no formula exists. That is the power of the method.
What it does: Brock and Mirman: save 0.35; a century on the Island; Tauchen against Rouwenhorst at \(\rho = 0.95\) and \(0.995\); the grid within 0.44% of the formula; policies with depreciation of 10%
6Why work more in a boom?Principles and the major3 min
The model so far has no labour. But in the data, hours worked swing almost as much as output, so a model of the cycle must say why people work more in booms. Give the household a dislike of working, n hours, with a parameter phi that sets how strongly the dislike rises with hours. In a boom, productivity and so the wage are temporarily high. The smart response is to work now and rest later, when work pays less. Robert Lucas and Leonard Rapping proposed this in 1969: it is the logic of a fisherman who fishes hardest when the fish are running. Phi measures it: the percentage change in hours for a one percent change in a temporary wage, called the Frisch elasticity after Ragnar Frisch. A permanent rise does much less, because people who are richer for good also want more leisure, and the two pulls roughly cancel.
How big is phi? Here is the whole model of this part, solved again for each value. Across the bottom, the Frisch elasticity, on a log scale; up the side, how much hours move relative to output. In the data, hours move 0.90 times as much as output. Studies of individual workers find elasticities somewhere around a quarter to four fifths: the blue band. With phi at a half, the model's hours move only 0.24 times as much as output: a cycle in which hardly anyone changes how much they work. To get even halfway to the data, the model needs phi of about 2.1, far above what workers' own records show. This is the central weakness of the theory, and the next idea is the attempt to fix it.
Richard Rogerson and Gary Hansen found a way around the problem. Most jobs come as a full shift or nothing: you work forty hours a week or you do not work. So an economy adjusts mostly by changing how many people work, not how long each person works. Here are sixty people in a normal quarter. In a boom, a few more are at work; in a slump, a few fewer. Rogerson showed that if people can insure themselves against being the one who is not hired, the whole economy behaves as if a single household had an infinite Frisch elasticity. Hansen put this into the growth model in 1985, and hours now move 0.76 times as much as output, against 0.90 in the data. Each person's elasticity is zero, and the economy's is infinite. The Island uses Hansen's version from here on. Whether this is a solution or a trick is still argued, and it is this part's dial.
What it does: Lucas and Rapping; the Frisch elasticity; hours' relative volatility 0.14 to 0.59 as \(\varphi\) runs from 0.25 to 4; \(\varphi \approx 2.1\) for half the data's; Rogerson and Hansen: 0.76
7CalibrationPrinciples and the major3 min
The model has a handful of numbers to choose. Kydland and Prescott's rule was to take them from facts that have nothing to do with the cycle, and only then ask the model about the cycle. Capital's share alpha comes from the share of income paid to labour: in the Penn World Table it averaged 0.62 for America from 1950 to 2019, so alpha is about 0.38. The Island uses the classic 0.36. Patience comes from the real interest rate. At about four percent a year, beta is 0.99 a quarter. Depreciation is a choice about what counts as capital. The table's rate, 3.6 percent a year, includes houses and buildings that last a century; the Island takes the textbook two and a half percent a quarter, for machinery. Hours: Americans worked about 1,884 hours a year, roughly a third of their waking time. And technology's persistence and the size of its shocks come from the measured Solow residual, which chapter ten examines.
With the numbers chosen, the model's long-run state follows from three equations. In the steady state the Euler equation says the return on capital must just repay impatience and wear, which fixes the ratio of capital to output. Investment must replace what wears out. And the hours condition sets the weight on leisure, A, so that people work a third of their time. The Island holds 10.3 quarters of output as capital, 2.6 years, less than the table's 3.6 because its capital wears out faster. It invests 26 percent of output, close to the data's 24, and consumes the rest. The long-run facts are matched by construction. The test is whether the short-run facts, which were never targeted, come out right.
Calibration started a long argument. On one side, Kydland and Prescott, writing in 1996: every model is deliberately false, so it should not be judged by a statistical test it is bound to fail. Match the long-run facts, borrow numbers from studies of growth and of individuals, and judge the model on facts it was not built to match. On the other, Lars Peter Hansen and James Heckman, in the same issue of the same journal: without standard errors, a good fit may be luck; a number measured on individuals need not apply to a whole economy, as the Frisch elasticity shows; and the honest procedure is to choose all the numbers to fit all the data. The argument ended in a compromise. Modern models are estimated as a whole, by likelihood, with prior beliefs about the parameters that carry the calibrator's knowledge. Part fifty-five does it.
What it does: Labour's share 0.62, depreciation 3.6%, 1,884 hours a year; the Island's 0.36, 0.99, 2.5%; the steady state (10.3 quarters of capital, investment 25.6% of output); Kydland and Prescott against Hansen and Heckman
8Solving the model: the saddle pathGraduate3 min
Value function iteration works, but with capital, technology and hours it gets slow, and real models have many more variables. The standard alternative starts from the conditions an equilibrium must satisfy. First, saving: giving up a unit of consumption today must pay, in expectation, as much as it costs, through capital's return. Second, work: the wage an extra hour earns must buy exactly what the hour costs in leisure. Third, building: whatever is not eaten becomes next quarter's capital. Fourth, luck: technology wanders at random, drifting back towards normal. Four equations, holding for every quarter, with an expectation of the future inside.
Next, make the system linear. Measure every variable as its percentage gap from the steady state, the hats, and replace each equation by its first-order Taylor expansion. Near the steady state, the whole economy becomes one matrix equation. Here it is for the Island, with the numbers the computer found by differentiating the four conditions. Hours and output have been eliminated: given capital, technology and consumption, the labour condition pins them down. Notice the difference between the variables. Capital and technology are given at the start of each quarter: they are predetermined. Consumption is chosen, and can jump to anything. The solution must say how.
How does the matrix decide? Through its roots, the generalized eigenvalues of the two matrices, which say how fast each combination of gaps grows or shrinks. The Island's system has three. Two lie inside the unit circle: combinations that shrink each quarter, towards the steady state. One lies outside, at about one point oh seven: a combination that grows seven percent a quarter, for ever, if it is ever set off. Olivier Blanchard and Charles Kahn proved in 1980 that such a system has exactly one stable solution when the number of unstable roots equals the number of variables free to jump. Here there is one of each: one unstable root, and consumption. Consumption must jump to the one value that keeps the explosive combination at exactly zero. Counting roots tells you whether a model has an answer, and how many.
Here is what the unstable root means. Start the Island with capital twenty percent below normal, and try five different choices of consumption. Eat too little, and capital piles up past any sensible level, with consumption eventually collapsing. Eat too much, and capital runs out. Only one choice leads into the steady state: the saddle path. A rational household, looking ahead, chooses it. The computer finds it exactly. Consumption's gap is 0.53 times capital's gap plus 0.47 times technology's. And capital's gap shrinks by a factor of 0.942 a quarter, the stable root from before. Paul Klein's method of 2000 does this for any number of variables, using a matrix factorization called QZ, and it is inside every modern model-solving package.
What it does: Four conditions; the linear system with its matrices; roots 0.942, 0.950, 1.073; Blanchard and Kahn; five paths from capital 20% low; \(\hat c = 0.53\hat k + 0.47\hat z\)
Intermission: America's business cycle since 1947Principles and the major
This chapter has no narration to read.
9The model beside the dataPrinciples and the major3 min
Now the model's answer. Technology on the Island improves by one percent, and the improvement fades by five percent a quarter. Output jumps by 1.9 percent, almost twice the shock, because people also work more: hours rise 1.5 percent. Consumption rises only 0.47 percent at first, and keeps rising for three years, while the wage moves with it exactly. Investment takes the windfall: up 6.2 percent on impact. Every series moves together, and in the right order of size.
Each line has a reason. The household knows the good times will fade, so it does not spend the gain at once; it spreads it over years. That is consumption smoothing, from Part twenty-two. So the windfall goes into capital, and investment swings hardest. The wage is temporarily high, so now is the time to work: intertemporal substitution. With Hansen's indivisible labour, the labour condition says the wage equals A times consumption, so it can only move as slowly as consumption does. And the extra capital keeps output up after the shock has faded: capital peaks after 18 quarters.
Now the test Prescott proposed: simulate the Island for twenty thousand quarters, filter the result exactly as the data were filtered, and put its numbers beside America's. The size of the cycle: 1.8 percent against 1.6. Close, from shocks sized only by the Solow residual. Consumption: the model's is far too smooth, though the data here include cars and other durables. Investment: about three times as volatile as output, against four and a half. The right order. Hours: 0.76 against 0.90, thanks to Hansen. Output per hour: too smooth. And the worst miss: in the model, hours and output per hour move together, with a correlation of 0.76. In the data, there is no correlation at all. Persistence: close. A model with one shock and no frictions gets the broad shape of the cycle. That is what impressed people. The misses are where the next chapters dig.
What it does: Impulse responses; why each line looks as it does; the scorecard: output's s.d. 1.79 against 1.58, investment 3.2 against 4.6, hours 0.76 against 0.90, hours with productivity 0.76 against −0.07
10What fits and what does notPrinciples and the major4 min
Start with the worst miss. On the left, every quarter of American data: hours worked against output per hour, both as gaps from trend. On the right, the Island. In the model, the only shock is technology, which raises both the productivity of an hour and the desire to work, so the dots line up: a correlation of 0.76. In America, the cloud has no slope at all: minus 0.07. Lawrence Christiano and Martin Eichenbaum made this the central puzzle in 1992. Hours must also be moved by something that shifts labour supply, not demand: in their paper, government spending. A model with a single shock gets one line, and the data are a cloud.
The picture also changed over time. Split the sample in the mid-1980s. Before, output per hour rose and fell with output, with a correlation of 0.64, which is what Kydland and Prescott saw. Since then, the correlation with output is about zero, minus 0.10, and with hours it is strongly negative, minus 0.59. At the same time the whole cycle calmed: output's standard deviation fell from 2.0 to 1.0 percent, the Great Moderation. In recent recessions, firms cut hours hard and kept their most productive work, so productivity held up as hours fell. A theory in which productivity drives the cycle fitted the data it was built on better than the data that came after.
Now the shocks themselves. The model's technology is measured by the Solow residual of Part twenty: output growth minus the growth that capital and hours account for, weighted by their shares of income. Here it is for America, year by year, from the Penn World Table. And output's growth, in green. They move together: the cycles have a correlation of 0.80. This was Prescott's evidence that technology drives the cycle. But look at the red bars: 6 years in which measured technology went backwards. In 1982, it fell 1.6 percent. Did America forget how to make things in 1982, in the middle of a recession caused, by almost every account, by the Federal Reserve's high interest rates?
The residual measures more than technology. In a slump, firms hold on to workers they do not fully use, because hiring and training are costly: labour hoarding. Machines run fewer shifts, but the measured capital stock does not fall. So measured productivity falls whenever demand falls, whatever happens to technology, and its correlation with output proves little. The pattern can even reverse: in 2009, output fell, but the residual rose 0.5 percent, because firms shed workers faster than output fell. Susanto Basu, John Fernald and Miles Kimball built a measure of technology corrected for utilization and published it in 2006. In their corrected series, when technology improves, hours and investment fall at first, and output barely moves: the opposite of the model's prediction. The shocks the theory needed were partly an artefact of measurement.
What it does: The two clouds; 1948–84 against 1985–2019 (productivity's correlation with output 0.64 and −0.10); the Solow residual, correlation 0.80; six negative years; 2009's +0.5%; hoarding and utilization
11The criticsResearch5 min
The first sharp critique came in 1986, in the same issue of the Minneapolis Fed's Quarterly Review that carried Prescott's case. Lawrence Summers called it some skeptical observations. The parameters: the labour-supply response the theory needs is far larger than what studies of workers find, as chapter six showed. The shocks: what are they? Where is the evidence that technology goes backwards in recessions? Prices: the theory predicts how wages and interest rates should move, and those predictions had not been checked. And exchange: in the Depression, markets and banks broke down, and a theory without money, credit or failures has nothing to say about that. Prescott's reply, in the same issue, was that theory was ahead of measurement: better data would come round.
The decisive test came from Jordi Galí in 1999. Instead of measuring technology with the Solow residual, let the data say what a technology shock is. Fit a statistical model to two series together, the growth of output per hour and hours worked: a vector autoregression. Then call a technology shock whatever moves productivity for ever. This is Blanchard and Quah's long-run restriction, from 1989. The logic: a fall in demand can lower measured productivity for a while, as firms hoard labour, but only technology can change it permanently. Having found the technology shock that way, ask what it does to hours.
Here is that test, run in this film on American data from 1948 to 2019. With hours entered in growth rates, as Galí did, a technology improvement lowers hours, by 0.28 percent on impact, and the band of plausible answers is below zero throughout the first year. 100 percent of resampled histories agree. That is the opposite of the model. But in 2003 Lawrence Christiano, Martin Eichenbaum and Robert Vigfusson entered hours in levels instead, and hours rise: +0.15 percent on impact, climbing for a year, though with a band that reaches below zero. The two specifications disagree about everything that matters. In the first, technology explains about 9 percent of output's variance two years out; in the second, about 69. Which is right depends on whether hours have a trend that never reverses, which twenty years of argument have not settled. John Fernald showed in 2007 that allowing for breaks in productivity's trend growth pulls the levels result towards Galí's, and the corrected technology series of Basu, Fernald and Kimball also says hours fall.
The third front was money. The model has no money, so in it the central bank cannot matter at all. But Milton Friedman and Anna Schwartz had shown that America's money supply fell by about a third between 1929 and 1933. Christina and David Romer, in 1989, read the Federal Reserve's own records to find the dates when it deliberately tightened to fight inflation, and found that output fell after each one. The recession of 1981 and 1982, the one where measured technology fell, was chosen by the central bank to end inflation. And housing, the spending most sensitive to interest rates, turns first. All of this says money and interest rates move output, and the next two parts build models in which they do.
Time for this part's forecast. Called it? In the autumn of 1986, Prescott wrote that technology shocks account for more than half of America's postwar fluctuations, with a best estimate near seventy-five percent, and in his theory a technology improvement raises output, investment and hours together. What happened: the measured shocks turned out to be partly not technology at all. Corrected for utilization, technology improvements cut hours at first. Long-run VARs split, as you just saw, depending on how hours enter. Partly right. Few economists now put technology's share near three quarters, and the mechanism through hours is in doubt. But technology does move the economy, and the way Prescott asked the question became the way everyone asks it.
What it does: Summers (1986); Galí's VAR in two specifications with bootstrap bands; technology's share of output's variance at two years, 9% against 69%; Fernald (2007); money; Called it? on Prescott (partly right)
12What survivedPrinciples and the major3 min
So why did the method win? Because of what it left behind. Households and firms that optimize and look ahead, so that their behaviour does not change arbitrarily when policy does: Lucas's critique, answered. The whole economy solved at once, in equilibrium, with shocks inside. A computer to solve it, and the habit of comparing a model's simulated moments and impulse responses with the data's. And a place to put frictions when the data demand them: sticky prices, money, credit, search. The result is called a dynamic stochastic general equilibrium model, and every central bank runs one. Kydland and Prescott shared the Nobel Prize in 2004, for this and for their work on time consistency.
The model also became a measuring instrument. In 2007, V. V. Chari, Patrick Kehoe and Ellen McGrattan proposed business cycle accounting. Keep the growth model, and let four wedges absorb everything it gets wrong. An efficiency wedge: how much output comes from given inputs. A labour wedge: a gap between what an hour is worth to the worker and to the firm, like a tax on work. An investment wedge: a gap between what savers want and what capital returns. And government spending. Measure the wedges from the data, feed them back one at a time, and see which one made each recession. Each wedge points to the kind of friction a better model needs.
Here is the labour wedge, computed in this film from three American series. It compares what an hour is worth to a worker in this model, set by consumption, with what an hour produces. If labour markets worked as the model says, the two would be equal, and the wedge would be zero. In pink, the wedge's gap from trend. In green, output's. They move against each other, with a correlation of minus 0.63. In every recession it is as if a tax on work suddenly rose. Robert Shimer set it out in 2009 as a challenge for every theory of the labour market. Wherever that friction lives, in wages that do not adjust or in the slow search of Part twenty-four, the growth model alone does not have it.
Other shocks joined technology. News: Paul Beaudry and Franck Portier showed in 2006 that stock prices jump on news about technology years before it arrives, and spending moves at once, so a boom can begin on expectations alone. Uncertainty: Nicholas Bloom showed in 2009 that when uncertainty jumps, firms pause hiring and investing, then rebound once it passes. Investment shocks: changes in how cheaply saving turns into capital, which in estimated models account for a large share of the cycle. The lesson is not one shock but many, with frictions, inside the framework Kydland and Prescott built.
What it does: DSGE; business cycle accounting; the labour wedge (correlation −0.63); news, uncertainty and investment shocks
13The Dials: the Frisch elasticityResearch2 min
This part's new dial is the Frisch elasticity: how much people change their hours when the wage changes for a while. Raj Chetty, Adam Guren, Day Manoli and Andrea Weber gathered the evidence in 2011. For people who already work, changing how many hours they work: about point five four. For the decision whether to work at all: about point two eight. The two margins together, for hours in the whole economy: about point eight two. Against that, the value typical in macroeconomic models, as the same review reports it: about two point eight four. And this film's number: to make the Island's hours even half as volatile as its output, the elasticity must be about 2.1. The status: contested. Part of the gap closes by counting people who move in and out of work, and part remains. It decides whether a recession can be read as people choosing more leisure.
Why can the two numbers differ so much? Studies of individuals watch people whose wages change for a reason they can see, for a while, and measure how their hours respond. But in a whole economy, most of the movement in hours is people starting and losing jobs. Rogerson and Hansen showed that when jobs come in shifts, the economy's elasticity can be far larger than any single person's. The trouble is that people who lose their jobs in a recession say they did not choose to: unemployment is not leisure taken because wages fell for a while. That is why the parts on search and on sticky prices put frictions into the labour market instead.
What it does: The Frisch elasticity (contested): Chetty, Guren, Manoli and Weber 0.54, 0.28, 0.82 and 2.84; this film 2.14; why micro and macro differ
14In practice: the model in the institutionPractice3 min
Two of the series' facts now get Agora's column. Investment is about three times as volatile as output, consumption less. In American data, investment moves 4.6 times as much as output, and consumption 0.77 times, durables included. The theory: households smooth consumption, spreading a temporary gain over years, so capital absorbs the swings. On the Island, investment moves 3.2 times as much as output and consumption 0.29: the right order, too smooth on both counts.
Hours rise in booms and fall in recessions: in the data they move 0.90 times as much as business output, with a correlation of 0.86. The theory: people work when work pays best. The Island gets the size, 0.76, with Hansen's help, but its hours move in lockstep with productivity, and America's do not. A fact can be matched for the wrong reason.
Where does this live now? In central banks. The Federal Reserve Bank of New York publishes the forecasts of its DSGE model; the European Central Bank, the Bank of England and Sweden's Riksbank run their own. Each is this part's model at its core, with sticky prices and wages, money, credit, and many shocks added. They are used for forecasts whose pieces add up, for a story behind each forecast, and for asking what would happen under a different policy. And they are solved with software like Dynare, free and open: you write down the equilibrium conditions, and it linearizes, solves and simulates exactly as chapter eight did by hand.
The modeller's job follows this part step by step. Write down the conditions: optimality, market clearing, and the shocks. Find the steady state, and make it match the long-run facts. Calibrate or estimate the parameters. Solve, by linearizing and counting the roots. Test the model's moments and responses against the data's, honestly, misses included. And only then use it: for a forecast, a scenario, or a policy question.
What it does: The volatility and hours Facts; DSGE models at central banks; Dynare; the modeller's six steps
15Frontier: beyond one household and one shockResearch2 min
This part's model made three assumptions to stay solvable. One household stands for everyone. The economy stays close to its steady state, so a straight-line approximation will do. And there are only a few state variables. The frontier is dropping each of them.
First, many households. In 1998, Per Krusell and Anthony Smith put a whole distribution of wealth inside the growth model, with households facing their own risks. To general relief, the aggregate behaved almost as if there were one household. Twenty years later, Greg Kaplan, Benjamin Moll and Giovanni Violante gave the model realistic wealth, including the many households who spend what they earn, and found that how monetary policy works changes: most of its effect runs through income, not interest rates. Part fifty-two builds these economies.
Second, solving what has no formula. Global methods find the whole policy function, not a straight line near the steady state, which matters when the economy is far from normal. Some limits bind only sometimes, like the zero lower bound on interest rates or a borrowing limit, and a linear solution cannot see them. New tools, continuous time, sparse grids, and neural networks trained to be policy functions, handle models with many states. And every method faces the cake's question: is the answer right? Part fifty-one answers with Euler-equation errors. That part, Computing Economies, takes this chapter's tools to their limits.
What it does: Krusell and Smith (1998); Kaplan, Moll and Violante (2018); global solutions, occasionally binding limits, deep solvers; Parts 51 and 52
Recap, problems, and the road aheadAll tracks3 min
So: could booms and slumps be an economy's best response to shocks it cannot avoid? In a model with one household, no money and no frictions, yes. The Island's booms and slumps are its best response to luck, and they look a lot like America's. But the shocks were partly mismeasured, hours and productivity do not move together the way the model says, and money and housing lead the cycle. The claim failed. The method, optimizing households and firms, equilibrium, computation and an honest comparison with the data, became the way all of macroeconomics is done.
Part twenty-nine in twelve lines. Kydland and Prescott added random technology to the growth model. A cycle is a gap from a trend, and the filter decides its size and, near the end, even its sign. Housing turns first. Dynamic programming turns an infinite plan into one equation, and iterating it converges because it is a contraction. Brock and Mirman's economy saves a fixed share, and shocks become Markov chains, some better built than others. Hours barely move with the elasticity workers show; Hansen's shifts fix that. Calibration fought estimation. Solving the model is counting roots. The scorecard gets the size and order of the cycle right, and hours with productivity completely wrong. The measured shocks were partly not technology, and the evidence on hours is split. The method survived, with wedges, news and uncertainty. And the Frisch dial, half in people and near three in models, with Prescott's forecast partly right.
The problems. The finite cake; the cake with a different utility; Blackwell's contraction; Brock and Mirman's closed form; the steady state; Hansen's labour condition; a saddle path by hand; and a starred problem on Rouwenhorst's chain. Full solutions are in the part's notes.
The reading: Stokey, Lucas and Prescott's Recursive Methods for dynamic programming; Ljungqvist and Sargent's Recursive Macroeconomic Theory; Romer's chapter on real business cycles, which this part follows; and King and Rebelo's survey, Resuscitating Real Business Cycles. Then the papers, from Kydland and Prescott to the review behind the dial.
This part built a cycle with no money in it. The next puts money back. In 2004, Mark Bils and Peter Klenow opened the records of the price collectors behind America's consumer price index and counted how often each price changes: every few months, far more often than economists had assumed, and yet not often enough for money to be neutral. Part thirty: sticky prices. Why does money move the real economy, and what is the best a central bank can do?
Where it goes next. Part 30 puts money and sticky prices into this framework; Part 31 the central bank; Part 51 solves economies without formulas; Part 52 gives them many households; Part 55 estimates them.
Key results
The part's results in one place, for revision.
Try it
Lab 29 · The cycle as equilibrium: dynamic programming and the real business cycle
Measure the American business cycle with two filters; solve the cake by value function iteration and watch the contraction; discretize a persistent AR(1); solve the stochastic growth model on a grid and check it against Brock and Mirman's formula; solve the Island's real business cycle by linearization, simulate it, and compare its moments with FRED's data; and re-estimate Gali's VAR with hours in growth rates and in levels.
python -m videos.economics.labs 29
needs numpy, scipy, matplotlib · download lab29.py ·
source on GitHubUS real GDP: the cycle's s.d., HP and Hamilton 1.61%, 3.24%
the cake: iterations, the contraction's ratio, and the share eaten (exact 1 - beta) 237, 0.9000, 0.114
Tauchen, rho = 0.95: s.d. and autocorrelation (truth 0.0224, 0.95); least chance of staying put 0.0277, 0.9622; 0.8688
Rouwenhorst, rho = 0.95: s.d. and autocorrelation (truth 0.0224, 0.95); least chance of staying put 0.0224, 0.9500; 0.8591
Tauchen, rho = 0.995: s.d. and autocorrelation (truth 0.0701, 0.995); least chance of staying put 0.0935, 1.0000; 1.0000
Rouwenhorst, rho = 0.995: s.d. and autocorrelation (truth 0.0701, 0.995); least chance of staying put 0.0701, 0.9950; 0.9851
growth on a grid with full depreciation: largest error against Brock and Mirman 0.68%
the Island's linear system: roots (moduli); Blanchard-Kahn satisfied 0.9418, 0.9500, 1.0725; True
a 1% technology shock on impact: output, hours, consumption, investment 1.94%, 1.47%, 0.47%, 6.21%
the Island, HP-filtered: s.d. of output; relative s.d. of consumption, investment, hours 1.79%; 0.29, 3.19, 0.76
US 1948-2019, HP-filtered: s.d. of output; relative s.d. of consumption, investment; hours relative to business output 1.58%; 0.77, 4.56; 0.90
hours with output per hour: correlation in the data and on the Island -0.07, 0.76
Frisch elasticity 0.5: hours' s.d. relative to output 0.24
Frisch elasticity 2.0: hours' s.d. relative to output 0.49
Gali's VAR: hours on impact of a technology shock, hours in growth rates and in levels -0.28%, +0.15%
A cycle is a gap from a trend, and its size depends on the filter. Value function iteration converges because the Bellman operator is a contraction with modulus beta. Tauchen's chain fails for very persistent shocks; Rouwenhorst's does not. The Island's real business cycle, with one technology shock and Hansen's indivisible labour, gets the size of the cycle and the order of volatilities right, but moves hours and productivity together where the data do not; with a Frisch elasticity like those measured on workers, hours hardly move at all. Whether a technology shock raises hours in the data depends on how hours enter the VAR.
The code (130 lines; it asserts its own result)
"""Lab 29: the cycle as equilibrium: the business cycle by two filters, the cake by value function iteration with
its contraction, Markov chains by Tauchen and Rouwenhorst, Brock and Mirman's growth model on a grid, the Island's
real business cycle solved by the QZ decomposition with its impulse responses and simulated moments beside the data's,
the Frisch elasticity's effect on hours, and Gali's long-run VAR in two specifications."""
import numpy as np
from videos.coursekit import labs
from explainer.economics import data
from explainer.economics.agora import dp, rbc
from explainer.economics.island import truths
TITLE = "The cycle as equilibrium: dynamic programming and the real business cycle"
GOAL = ("Measure the American business cycle with two filters; solve the cake by value function iteration and "
"watch the contraction; discretize a persistent AR(1); solve the stochastic growth model on a grid and check "
"it against Brock and Mirman's formula; solve the Island's real business cycle by linearization, simulate "
"it, and compare its moments with FRED's data; and re-estimate Gali's VAR with hours in growth rates and in "
"levels.")
TASKS = [
"The cake: set beta = 0.99. How many iterations does value function iteration need to reach 1e-10, and why?",
"Rouwenhorst against Tauchen: with rho = 0.99 and 5 states, how far is Tauchen's chain from the true variance?",
"Hansen: give the Island a Frisch elasticity of 1. Which moments get closer to the data, and which further?",
]
def _q(key):
d = data.fred(key)
return {x: v for x, v in zip(d["date"], d["value"]) if np.isfinite(v)}
def run(seed=0):
lab = labs.Lab()
T = truths(29)
y = _q("GDPC1")
ds = sorted(y)
ly = np.log([y[d] for d in ds])
hp = np.array(dp.hp_filter(ly)["cycle"])
ham = np.array(dp.hamilton_filter(ly)["cycle"])
lab.row("US real GDP: the cycle's s.d., HP and Hamilton", f"{100 * hp.std():.2f}%, {100 * ham.std():.2f}%")
c = T["cake"]
k = dp.cake(beta=c["beta"], n=301, iters=c["iters"])
g = np.array(k["gaps"])
ratio = float(np.median(g[5:60] / g[4:59]))
assert abs(ratio - c["beta"]) < 1e-6
w = np.array(k["w"])
share = float(np.median((np.array(k["c"]) / w)[len(w) // 5:]))
lab.row("the cake: iterations, the contraction's ratio, and the share eaten (exact 1 - beta)",
f"{k['iterations']}, {ratio:.4f}, {share:.3f}")
ch = T["chains"]
for rho in (ch["rho"], ch["rho_high"]):
for name, f in (("Tauchen", dp.tauchen), ("Rouwenhorst", dp.rouwenhorst)):
m = dp.chain_moments(**f(ch["n"], rho, ch["sigma"]))
stay = float(np.min(np.diag(np.array(f(ch["n"], rho, ch["sigma"])["P"]))))
lab.row(f"{name}, rho = {rho}: s.d. and autocorrelation (truth "
f"{ch['sigma'] / np.sqrt(1 - rho ** 2):.4f}, {rho}); least chance of staying put",
f"{m['sd']:.4f}, {m['rho']:.4f}; {stay:.4f}")
gr = T["growth"]
full = rbc.growth_vfi(alpha=gr["alpha"], beta=gr["beta"], delta=1.0, rho=gr["rho"], sigma=gr["sigma"], nk=101,
nz=gr["nz"])
kk, zz = np.array(full["k"]), np.array(full["z"])
exact = gr["alpha"] * gr["beta"] * zz[:, None] * kk[None, :] ** gr["alpha"]
err = float(np.max(np.abs(np.array(full["kprime"]) - exact) / exact))
lab.row("growth on a grid with full depreciation: largest error against Brock and Mirman", f"{100 * err:.2f}%")
r = T["rbc"]
m = rbc.RBC(alpha=r["alpha"], beta=r["beta"], delta=r["delta"], rho=r["rho"], sigma=r["sigma"], n_ss=r["n_ss"])
sol = m.solve()
assert sol["bk_ok"]
lab.row("the Island's linear system: roots (moduli); Blanchard-Kahn satisfied",
", ".join(f"{x:.4f}" for x in sol["moduli"]) + f"; {sol['bk_ok']}")
irf = m.irf(12, 0.01)
lab.row("a 1% technology shock on impact: output, hours, consumption, investment",
f"{irf['y'][0]:.2f}%, {irf['n'][0]:.2f}%, {irf['c'][0]:.2f}%, {irf['i'][0]:.2f}%")
sim = m.simulate(r["T"], r["seed"] + seed)
mo = rbc.moments(sim)
lab.row("the Island, HP-filtered: s.d. of output; relative s.d. of consumption, investment, hours",
f"{mo['y']['sd']:.2f}%; {mo['c']['rel']:.2f}, {mo['i']['rel']:.2f}, {mo['n']['rel']:.2f}")
keys = {"y": "GDPC1", "c": "PCECC96", "i": "GPDIC1", "n": "HOANBS", "w": "OPHNFB"}
S = {k_: _q(v) for k_, v in keys.items()}
dd = sorted(d for d in S["y"] if all(d in S[k_] for k_ in S) and "1948-01-01" <= d <= "2019-10-01")
md = rbc.moments({k_: np.log([S[k_][d] for d in dd]) for k_ in S})
cn = np.array(dp.hp_filter(np.log([S["n"][d] for d in dd]))["cycle"])
cw = np.array(dp.hp_filter(np.log([S["w"][d] for d in dd]))["cycle"])
cb = np.array(dp.hp_filter(np.log([S["n"][d] * S["w"][d] for d in dd]))["cycle"]) # business output
lab.row("US 1948-2019, HP-filtered: s.d. of output; relative s.d. of consumption, investment; hours relative "
"to business output", f"{md['y']['sd']:.2f}%; {md['c']['rel']:.2f}, {md['i']['rel']:.2f}; "
f"{cn.std() / cb.std():.2f}")
sn = {k_: np.array(dp.hp_filter(np.array(v))["cycle"]) for k_, v in sim.items()}
lab.row("hours with output per hour: correlation in the data and on the Island",
f"{np.corrcoef(cn, cw)[0, 1]:.2f}, {np.corrcoef(sn['n'], sn['w'])[0, 1]:.2f}")
for f in (0.5, 2.0):
mf = rbc.RBC(alpha=r["alpha"], beta=r["beta"], delta=r["delta"], rho=r["rho"], sigma=r["sigma"],
n_ss=r["n_ss"], frisch=f)
mf.solve()
lab.row(f"Frisch elasticity {f}: hours' s.d. relative to output",
f"{rbc.moments(mf.simulate(r['T'], r['seed'] + seed))['n']['rel']:.2f}")
lp = np.log([S["w"][d] for d in dd])
lh = np.log([S["n"][d] for d in dd])
t = np.arange(len(lh))
dg = rbc.gali(np.diff(lp), np.diff(lh), reps=200, seed=seed)
lv = rbc.gali(np.diff(lp), (lh - np.polyval(np.polyfit(t, lh, 1), t))[1:], differenced=False, reps=200,
seed=seed)
lab.row("Gali's VAR: hours on impact of a technology shock, hours in growth rates and in levels",
f"{dg['hours'][0]:+.2f}%, {lv['hours'][0]:+.2f}%")
lab.note = ("A cycle is a gap from a trend, and its size depends on the filter. Value function iteration "
"converges because the Bellman operator is a contraction with modulus beta. Tauchen's chain fails "
"for very persistent shocks; Rouwenhorst's does not. The Island's real business cycle, with one "
"technology shock and Hansen's indivisible labour, gets the size of the cycle and the order of "
"volatilities right, but moves hours and productivity together where the data do not; with a "
"Frisch elasticity like those measured on workers, hours hardly move at all. Whether a technology "
"shock raises hours in the data depends on how hours enter the VAR.")
fig, ax = labs.figure(2, size=(11, 4.4))
ax[0].semilogy(np.arange(1, len(g) + 1), g, color=labs.BLUE)
ax[0].set(title="The cake: the contraction", xlabel="iteration", ylabel="largest change")
q = np.arange(len(irf["y"]))
for key, col, nm in (("y", labs.BLUE, "output"), ("n", labs.ORANGE, "hours"), ("c", "grey", "consumption")):
ax[1].plot(q, irf[key], color=col, label=nm)
ax[1].set(title="A 1% technology shock on the Island", xlabel="quarter", ylabel="% from steady state")
ax[1].legend()
lab.fig = fig
return lab
Now change it
- The cake: set beta = 0.99. How many iterations does value function iteration need to reach 1e-10, and why?
- Rouwenhorst against Tauchen: with rho = 0.99 and 5 states, how far is Tauchen's chain from the true variance?
- Hansen: give the Island a Frisch elasticity of 1. Which moments get closer to the data, and which further?
Problems, with solutions
Try each problem before opening its solution.
1. The finite cake: with \(T\) days left and \(u = \log c\), show \(c_t = w_t / (1 + \beta + \dots + \beta^{T-t})\); let \(T \to \infty\).
Solution
Giving up a little cake today to eat it tomorrow must not help, so \(1/c_t = \beta / c_{t+1}\), that is, \(c_{t+1} = \beta c_t\), and \(c_s = \beta^{s-t} c_t\). All the cake is eaten by the last day, so \(\sum_{s=t}^{T} c_s = c_t(1 + \beta + \dots + \beta^{T-t}) = w_t\). As \(T \to \infty\) the sum tends to \(1/(1-\beta)\) and \(c_t = (1-\beta)w_t\): the infinite-horizon rule is the limit of the finite ones, which is what value function iteration computes, one more day at a time.
2. Guess and verify with \(u = c^{1-\sigma}/(1-\sigma)\): show \(c = (1 - \beta^{1/\sigma})\, w\).
Solution
Guess that a constant share \(s\) is eaten, \(c_t = s w_t\), so \(w_{t+1} = (1-s) w_t\) and \(c_{t+1}/c_t = 1 - s\). The Euler equation \(c_t^{-\sigma} = \beta c_{t+1}^{-\sigma}\) gives \(c_{t+1}/c_t = \beta^{1/\sigma}\), so \(s = 1 - \beta^{1/\sigma}\). With \(\sigma = 1\) (log utility) this is \(1 - \beta\). A larger \(\sigma\), a stronger wish for smooth consumption, makes \(\beta^{1/\sigma}\) closer to 1 and the share smaller: the cake is stretched more evenly.
3. Blackwell: show that the cake's Bellman operator \(T\) satisfies \(\|TV - TW\| \le \beta \|V - W\|\).
Solution
\(T\) is monotone: if \(V \le W\) everywhere, then \(\log c + \beta V(w-c) \le \log c + \beta W(w-c)\) for every \(c\), so \(TV \le TW\). It discounts: \(T(V + a) = TV + \beta a\) for any constant \(a\). Let \(d = \|V - W\|\); then \(V \le W + d\), so \(TV \le T(W + d) = TW + \beta d\), and by symmetry \(TW \le TV + \beta d\). Hence \(|TV - TW| \le \beta d\) everywhere. By the contraction mapping theorem \(T\) has one fixed point, and iterating from any start converges to it, with the error shrinking by \(\beta\) each step.
4. Brock–Mirman: verify \(V = a + \frac{\alpha}{1-\alpha\beta}\log k + \frac{1}{(1-\alpha\beta)(1-\beta\rho)}\log z\) and \(k' = \alpha\beta z k^\alpha\).
Solution
Write \(V = a + b\log k + d\log z\) with \(\log z' = \rho\log z + \varepsilon\). The choice of \(k'\) solves \(\max \log(zk^\alpha - k') + \beta b\log k'\), so \(1/(zk^\alpha - k') = \beta b/k'\) and \(k' = \frac{\beta b}{1+\beta b} zk^\alpha\). Substituting, the coefficient on \(\log k\) is \(\alpha(1 + \beta b)\), which must equal \(b\), so \(b = \alpha/(1-\alpha\beta)\) and \(\beta b/(1+\beta b) = \alpha\beta\). The coefficient on \(\log z\) is \(1 + \beta b + \beta\rho d = d\), so \(d = (1+\beta b)/(1-\beta\rho) = 1/((1-\alpha\beta)(1-\beta\rho))\).
5. The steady state: with \(\alpha = 0.36\), \(\beta = 0.99\), \(\delta = 0.025\), find \(\bar k/\bar y\) and \(\bar\imath/\bar y\).
Solution
The steady-state Euler equation \(1 = \beta(\alpha\bar y/\bar k + 1 - \delta)\) gives \(\bar k/\bar y = \alpha/(1/\beta - 1 + \delta) = 0.36/(0.0101 + 0.025) = 10.26\) quarters, about 2.6 years of output. Investment replaces depreciation, \(\bar\imath = \delta\bar k\), so \(\bar\imath/\bar y = 0.025 \times 10.26 = 0.256\), and consumption is the remaining 74.4% of output.
6. Hansen: with \(u = \log c - A n\), show the wage is \(A c\) and \(\hat n = (\hat z + \alpha \hat k - \hat c)/\alpha\).
Solution
The household's conditions are \(1/c = \lambda\) for consumption and \(A = \lambda w\) for hours, so \(w = A c\). Firms pay the marginal product, \(w = (1-\alpha)y/n = (1-\alpha) z k^\alpha n^{-\alpha}\). Setting the two equal and taking logs, \(\log A + \log c = \log(1-\alpha) + \log z + \alpha\log k - \alpha\log n\); in deviations from the steady state, \(\hat c = \hat z + \alpha\hat k - \alpha\hat n\), which rearranges to the result. Hours rise with technology and capital and fall with consumption: the wealth effect.
7. The saddle: \(x_{t+1} = M x_t\) with roots \(0.9\) and \(1.1\), \(k\) predetermined, \(c\) free; find the unique stable path.
Solution
Diagonalize \(M = Q\Lambda Q^{-1}\) and let \(q_t = Q^{-1}x_t\), so \(q_{1,t+1} = 0.9\,q_{1,t}\) and \(q_{2,t+1} = 1.1\,q_{2,t}\). Any \(q_2 \ne 0\) explodes, so the path is stable only if \(q_{2,t} = 0\), that is, if \((Q^{-1})_{21}k_t + (Q^{-1})_{22}c_t = 0\): \(c_t = -\big((Q^{-1})_{21}/(Q^{-1})_{22}\big)k_t\). This line is the saddle path, the eigenvector of the stable root; along it \(k\) converges at the rate 0.9. One unstable root and one free variable give exactly one solution (Blanchard and Kahn).
8. \(\bigstar\) Rouwenhorst: for two states \(\pm\psi\) and \(p = (1+\rho)/2\), show the autocorrelation is \(\rho\); choose \(\psi\).
Solution
With \(P = \begin{pmatrix} p & 1-p \\ 1-p & p \end{pmatrix}\) the stationary distribution is \((\tfrac12, \tfrac12)\), so the mean is 0 and the variance \(\psi^2\). Then \(\mathbb{E}[z_t z_{t+1}] = \psi^2\big(p - (1-p)\big) = \psi^2(2p - 1) = \psi^2\rho\), and the autocorrelation is \(\rho\) exactly. To match the variance of \(z' = \rho z + \varepsilon\), choose \(\psi = \sigma/\sqrt{1-\rho^2}\). The method builds \(n\) states from this two-state chain recursively, and the first two moments stay exact for any \(\rho\), which is why it survives persistence that breaks Tauchen's grid.
Notes and sources
Sources
The studies the film states are listed with what each shows in dials.SHOWN[29]; the Frisch elasticity is a dial
(explainer/economics/dials.py); Prescott's estimate is a Called it? entry (explainer/economics/calls.py). FRED's
series were retrieved on 2026-11-20; residential and nonresidential investment are BEA's chain-type quantity indexes,
because FRED's chained-dollar series for them begin only in 2007. The Penn World Table is version 11.0. Galí's,
Christiano, Eichenbaum and Vigfusson's, and Basu, Fernald and Kimball's findings are stated from their papers; the VAR
responses shown are the film's own estimates on the data above, not their published figures. The Island's parameters
are the standard quarterly calibration of the 1980s textbooks.
About this partfrom its README
Part 29 of a sixty-eight-part course in economics (see the series plan and the syllabus), the fifth of Act VI, Money and the Cycle. It asks whether booms and slumps could be an economy's best response to shocks it cannot avoid. Its answer: in a model with one household, no money and no frictions, yes. The Island's booms and slumps are its best response to luck, and they look a lot like America's. But the measured shocks were partly not technology, hours and productivity do not move together the way the model says, and money and housing lead the cycle. The claim failed. The method won: optimizing households and firms, equilibrium, computation and an honest comparison with the data became the way macroeconomics is done.
It opens on Finn Kydland and Edward Prescott's Time to Build and Aggregate Fluctuations (Econometrica, November 1982) and on two cycles side by side, America's and a frictionless model's. From there it covers:
- what a cycle is: Burns and Mitchell (1946); the Hodrick–Prescott trend (a cycle with a standard deviation of 1.6% of output) against Hamilton's regression filter (3.2%, correlation 0.73); the end-point problem, which flips the sign of 2008's third quarter (−1.8% from trend with the data of the time, +1.3% with today's); the table of volatilities and comovements;
- a game: six series around the NBER's peaks, 1953–2007; which turns first? Housing investment, about 7 quarters ahead (Leamer 2007);
- dynamic programming from a cake: the Bellman equation, the principle of optimality, the rule \(c = (1-\beta)w\) by guess and verify; value function iteration on 1,001 cake sizes, the contraction (the gap shrinks by exactly 0.9 a step; 238 steps to \(10^{-10}\)), Blackwell's conditions;
- Brock and Mirman's stochastic growth model (save \(\alpha\beta = 0.35\) of output); Markov chains for shocks (Tauchen's chain is 24% too volatile at \(\rho = 0.95\) and never moves at \(\rho = 0.995\); Rouwenhorst's is exact); the general model on a grid;
- labour: intertemporal substitution and the Frisch elasticity (with \(\varphi = 0.5\) hours move 0.24 times as much as output, against 0.90 in the data); Rogerson's lotteries and Hansen's indivisible labour (0.76);
- calibration from the Penn World Table and the argument with estimation (Kydland and Prescott against Hansen and Heckman, 1996);
- log-linearization, the roots of the Island's system (0.942, 0.950 and 1.073), Blanchard and Kahn's count, the saddle path drawn, and Klein's QZ solution;
- an intermission without narration: America's business cycle quarter by quarter since 1947, as a tune;
- impulse responses to a 1% technology shock (output +1.94%, hours +1.47%, investment +6.2%, consumption +0.47%) and the scorecard against the data;
- what fails: hours against productivity (correlation 0.76 in the model, −0.07 in the data; Christiano and Eichenbaum 1992), the change after 1985, the Solow residual's six years of "technical regress" (1982: −1.6%), labour hoarding and utilization (Basu, Fernald and Kimball 2006);
- the critics: Summers (1986); Galí's long-run VAR re-estimated (hours −0.28% on impact with hours in growth rates; +0.15% in levels, as Christiano, Eichenbaum and Vigfusson found); money (Friedman and Schwartz; Romer and Romer) and Called it? on Prescott's 75 percent (partly right);
- what survived: DSGE models, business cycle accounting (the labour wedge, correlation −0.63 with output), news and uncertainty shocks;
- the Frisch elasticity dial (new), the volatility and hours Facts, the model in central banks, and a frontier chapter on many households and global solutions.
What is computed and built
Everything plotted is computed by compute.py from Agora's dynamic programming (explainer.economics.agora.dp) and
real business cycle (explainer.economics.agora.rbc) with the Island's Part 29 truths, or from the Data Room; the
narration states the cached numbers.
- Cycles. Logs of quarterly series, Hodrick–Prescott with \(\lambda = 1600\) (annual Penn World Table series: \(\lambda = 100\)); Hamilton's cycle is the residual of \(y_{t+8}\) on a constant and \(y_t, \dots, y_{t-3}\). Moments use 1948–2019; hours and output per hour are the nonfarm business sector's, compared with its output (output per hour times hours).
- Play it. For each NBER peak from 1953 to 2007 (the quarter containing the peak month), log levels from 8 quarters before to 8 after, relative to the peak quarter, less the series' average quarterly growth over 1950–2019; averaged over the ten recessions.
- The cake. \(\beta = 0.9\), 1,001 sizes from 0.001 to 1, \(V_0 = 0\); the smallest cake can only be carried.
- Growth. \(\alpha = 0.36\), \(\beta = 0.96\), TFP with \(\rho = 0.9\) and \(\sigma = 0.02\) on a five-state Rouwenhorst chain; 151 capital points from half to one and a half times the steady state.
- The Island's RBC. Quarterly: \(\alpha = 0.36\), \(\beta = 0.99\), \(\delta = 0.025\), \(\rho = 0.95\), \(\sigma = 0.007\), hours of one third; utility \(\log c - A n\) (or \(- A n^{1+1/\varphi}/(1+1/\varphi)\) for a finite Frisch elasticity). The conditions are linearized by central differences and solved by the ordered QZ decomposition; moments are from 20,000 simulated quarters filtered as the data are.
- The Solow residual. Penn World Table: \(\Delta\log A = \Delta\log Y - (1-\bar s_L)\Delta\log K - \bar s_L\Delta\log L\) with \(Y\) = real GDP at national prices, \(K\) = the capital stock, \(L\) = employment times average hours, \(\bar s_L\) the two-year average labour share.
- Galí's VAR. Output per hour's growth and hours (growth, or the log level less a linear trend), four lags, 1948–2019; the technology shock is the only one with a long-run effect on productivity (Blanchard–Quah); bands are the 16th and 84th percentiles of 500 residual-bootstrap replications.
- The labour wedge. With \(u = \log c - An\), \(1 - \tau = A c n/((1-\alpha)y)\); its cycle is minus the HP cycle of \(\log(c\,n/y)\) from real consumption, the hours index and real GDP.
Chapter notes
| # | Chapter | What it does |
|---|---|---|
| 0 | Could booms and slumps be an economy's best response to shocks? | Kydland and Prescott (1982); America's cycle beside the Island's, 200 quarters each; objectives |
| 1 | What a cycle is | Burns and Mitchell; 12 NBER recessions since 1947; the HP trend (\(\lambda = 1600\)), s.d. 1.6%; Hamilton's filter, s.d. 3.2%, correlation 0.73; the end point; the table of volatilities |
| 2 | Play it: which one turns first? | Six average paths around ten NBER peaks; housing investment peaks about 7 quarters before and is 21% lower a year after; Leamer (2007) |
| 3 | Dynamic programming: the cake | \(\max \sum \beta^t \log c_t\); the Bellman equation; the principle of optimality; \(c = (1-\beta)w\); the cake over 20 days |
| 4 | Value function iteration | \(V_1, V_2, V_5, V_{10}, V_{30}, V_{100}\) on 1,001 sizes against the exact value; the gap falls by 0.900 a step; 238 steps; Blackwell (1965); the grid's policy eats 10.4% |
| 5 | The stochastic growth model | Brock and Mirman: save 0.35; a century on the Island; Tauchen against Rouwenhorst at \(\rho = 0.95\) and \(0.995\); the grid within 0.44% of the formula; policies with depreciation of 10% |
| 6 | Why work more in a boom? | Lucas and Rapping; the Frisch elasticity; hours' relative volatility 0.14 to 0.59 as \(\varphi\) runs from 0.25 to 4; \(\varphi \approx 2.1\) for half the data's; Rogerson and Hansen: 0.76 |
| 7 | Calibration | Labour's share 0.62, depreciation 3.6%, 1,884 hours a year; the Island's 0.36, 0.99, 2.5%; the steady state (10.3 quarters of capital, investment 25.6% of output); Kydland and Prescott against Hansen and Heckman |
| 8 | Solving the model: the saddle path | Four conditions; the linear system with its matrices; roots 0.942, 0.950, 1.073; Blanchard and Kahn; five paths from capital 20% low; \(\hat c = 0.53\hat k + 0.47\hat z\) |
| — | Intermission | America's cycle since 1947 with the recessions; the story so far |
| 9 | The model beside the data | Impulse responses; why each line looks as it does; the scorecard: output's s.d. 1.79 against 1.58, investment 3.2 against 4.6, hours 0.76 against 0.90, hours with productivity 0.76 against −0.07 |
| 10 | What fits and what does not | The two clouds; 1948–84 against 1985–2019 (productivity's correlation with output 0.64 and −0.10); the Solow residual, correlation 0.80; six negative years; 2009's +0.5%; hoarding and utilization |
| 11 | The critics | Summers (1986); Galí's VAR in two specifications with bootstrap bands; technology's share of output's variance at two years, 9% against 69%; Fernald (2007); money; Called it? on Prescott (partly right) |
| 12 | What survived | DSGE; business cycle accounting; the labour wedge (correlation −0.63); news, uncertainty and investment shocks |
| 13 | The Dials | The Frisch elasticity (contested): Chetty, Guren, Manoli and Weber 0.54, 0.28, 0.82 and 2.84; this film 2.14; why micro and macro differ |
| 14 | In practice | The volatility and hours Facts; DSGE models at central banks; Dynare; the modeller's six steps |
| 15 | Frontier | Krusell and Smith (1998); Kaplan, Moll and Violante (2018); global solutions, occasionally binding limits, deep solvers; Parts 51 and 52 |
| — | Outro | The answer; twelve lines; problems; reading; next, Part 30, Sticky Prices |
Notes
python -m videos.economics.labs 29: measure the American cycle with two filters, solve the cake and watch the contraction, compare Tauchen's and Rouwenhorst's chains, check the growth model's grid against Brock and Mirman, solve and simulate the Island's RBC beside FRED's data, vary the Frisch elasticity, and re-estimate Galí's VAR in both specifications.- The interactive (course site): eat the cake by iteration. The reader sets patience, the grid and the number of iterations, and watches the value function approach the exact answer and the change between iterations shrink by a factor of beta.
Companion material in this repository
- Agora's dynamic programming
- Agora's real business cycle
- The Island's planted truths
- The Data Room's sources
The syllabus's plan for this partfrom SYLLABUS.md, the plan of record
- Hook: the claim; the question; objectives.
- What a cycle is: Burns and Mitchell (1946); trends and filters (Hodrick–Prescott, band-pass, Hamilton's objection); the table of volatilities and comovements.
- Play it: six unlabelled series around a recession: which one leads?
- Dynamic programming from scratch: the cake-eating problem; the Bellman equation; the principle of optimality.
- Value function iteration, shown converging; the policy function; why it is a contraction.
- The stochastic growth model (Brock and Mirman 1972): a closed form, and the general case on a grid.
- Labour supply in the model: intertemporal substitution; indivisible labour (Hansen 1985; Rogerson 1988).
- Calibration: choosing parameters from growth facts and micro evidence; the argument with estimation.
- Log-linearization; the system in matrix form; the saddle-path (Blanchard–Kahn) condition as counting eigenvalues.
- Impulse responses and simulated moments beside the data's.
- What fits and what does not: hours and productivity; the Solow residual as a measure of shocks.
- The critics: Summers's sceptical observations (1986); technology shocks that lower hours (Galí 1999); money's non-neutrality.
- What survived: the method, wedges (Chari, Kehoe and McGrattan 2007), news and uncertainty shocks.
- Dials. 14. In practice: every structural model in a policy institution. 15. Frontier: a pointer to Parts 51–52.
Agora: dp (value and policy iteration on grids, Markov chains by Tauchen and Rouwenhorst) and rbc (the model
solved globally and by linearization; moments and impulse responses). The Island gets a cycle.
Dials: the Frisch elasticity of labour supply (micro against macro). Facts: the relative volatilities of
consumption, investment and hours.
Called it? the RBC prediction for hours after a technology shock.
Reading: Kydland & Prescott 1982; Long & Plosser 1983; King & Rebelo 1999; Prescott 1986; Summers 1986;
Galí 1999; Stokey, Lucas & Prescott chs 1–4; Ljungqvist & Sargent chs 3–4, 12; Romer ch 5.
Build the film
python -m videos.economics.econ29.compute # the part's numbers, into .cache/econ29
python tools/build.py econ29 # render and assemble the film
EXPLAINER_TTS=silent python tools/qa_scene.py econ29 Hook # one chapter, silent, with a contact sheet
Scenes: videos/economics/econ29. Setup: see the course page. Source of these notes: the README and the scenes' narration.
Build it
python -m videos.economics.econ29.compute # every number (twenty seconds), into .cache/econ29/
python tools/qa_scene.py econ29 Linear # one chapter, silent, at 480p, with a contact sheet
EXPLAINER_TTS=silent python tools/build.py econ29 -q l # the whole part, silent preview
python tools/build.py econ29 # 1080p30 with narration and the series' computed score
python -m videos.economics.labs 29 # the lab
The data are in explainer/economics/data/, registered in
SOURCES.md: from FRED, real GDP, consumption and investment (with the
chain-type quantity indexes of residential and nonresidential fixed investment), hours and output per hour in the
nonfarm business sector, and the NBER's recession indicator; and the Penn World Table 11.0 for the United States.