Brian C Jenkins | Posts


Animation of unemployment and inflation data

March 7, 2016

In Figure 1.5 from the first chapter of his 1999 book The Conquest of American Inflation, Thomas Sargent presents a plot of the business cycle components of the inflation rate and the unemployment rate for the US from 1960 to 1982. The figure is intriguing for a couple of reasons. First, it reveals the downward-sloping relationship between inflation and unemployment over the business cycle. And second, it depicts Phillips loops; clockwise movements in the unemployment-inflation plane.

The video below is an animation of Sargent's Figure 1.5 constructed using Python and updated to include the most recently available data.



I constructed the video using data from FRED. Following Sargent, the unemployment rate is measured as the unemployment rate for white men age 20 and over. The inflation rate is a 13-month two-sided moving average of the annualized monthly percentage change in the CPI. The unemployment and inflation rate data are both monthly. The business cycle components of the data are isolated using the bandpass filter of Baxter and King (1995).

The Python programs for constructing the figure are available here. Note that you must have ffmpeg installed in addition to the requisite Python packages called by the program.