Tuesday, May 3, 2016

"Curve shifting??"




Monday, May 2, 2016

The trendline shows the shifting of the Phillips curve

My eyes popped right out my head when I saw George Lesica's graph of the Phillips curve. Here, take another look:

Source: https://lesica.com/exploring-the-phillips-curve.html
Copyright by George Lesica - Licensed CC BY-SA
Size reduced to fit my blog -- Click for larger image
The Phillips curve is no longer a meaningless cluster of dots. Lesica's graph shows "trade-off" curves in red and yellow and cyan and green and blue, all of them showing that inflation tends to be higher when unemployment is lower, and lower when unemployment is higher. That's what you're supposed to see in all those dots. Now, at last, I see it.

In the old PDF from 1958, where Bill Phillips introduced his curve to the world, he opened his remarks with these simple thoughts on supply and demand:
When the demand for a commodity or service is high relatively to the supply of it we expect the price to rise... Conversely when the demand is low relatively to the supply we expect the price to fall...

The supply and demand for labor works the same way, he said.

On the Phillips Curve graph, low unemployment is toward the left and high unemployment is toward the right. Low inflation is toward the bottom and high inflation is toward the top.

On the graph, "High inflation and low unemployment" is toward the upper-left. "Low inflation and high unemployment" is toward the lower-right. On the graph, a change from the the one state to the other produces a cluster of dots that is high on the left and low on the right. George Lesica's graph shows several of these clusters.

Time and time again I've seen people show a scatterplot with the dots all the same color. They put a straight-line trend on it, and point out that the trendline goes from low-on-the-left to high-on-the-right. That's not a Phillips curve, they say.

"As for inflation-unemployment “tradeoffs,” we should all be clear about what the data look like in practice..."
Source: Hussmann Funds

"If anything, [the trend line] suggests that higher unemployment and higher inflation in that very noisy data set go hand in hand."
Source: Illusion of Prosperity

"While playing with the data, a statistically significant relationship between inflation and employment growth emerges. 95 confidence interval on the slope returns (0.04, 0.22)."
Source: Synthenomics

"In English: there is no firm relationship here and the extremely weak relationship we do find runs in the opposite direction to what the Phillips Curve would predict."
Source: Fixing the Economists

"Indeed, if we do a reverse regression with the variable on the horizontal axis in the chart serving as the dependent variable, we can fit a long-run Phillips curve to the data, and that's the regression line in the chart."
Source: Stephen Williamson

"The Phillips curve is one of those 'regularities' that is more likely to exist in an economist mind than in reality."
Source: Naked Keynesianism

The trend line goes up-to-the-right, these people say, not down-to-the-right like the Phillips curve would. There is no Phillips curve, they say.

But the straight, upsloping trend line that these graphs show is not the Phillips curve. The trendline shows the shifting of the Phillips curve, not the shape of it.

Milton Friedman didn't say there's no Phillips curve. Friedman knew about supply and demand. He knew there is a tradeoff between inflation and unemployment.

What Friedman said was that the curve could shift to a different location, and we could end up with high inflation and high unemployment. High and high instead of high and low, he said.

He was right about that. When it happens, the scatterplot dots get more scattered on the graph. But if you have all the dots the same color, it doesn't look like different curves in different locations. It looks like there is no Phillips curve. But you can't really tell, because all the dots are the same color.

I wanted to duplicate George Lesica's graph. Duplicate it, because I never did manage to make a graph that shows the Phillips curve. Duplicate it, to learn how to make such a graph, and to make sure nobody's pulling my leg.

But there were things I didn't know. Was Lesica's data quarterly or monthly? I counted his blue dots and came up with way more than I should for quarterly data, so I went with monthly. Ended up with more than 800 rows of data in the spreadsheet. Would you guess there's 800 dots in the scatter above? I wouldn't.

And then, I didn't know how to handle the inflation rate, calculated (Lesica says) for the "subsequent 12 month period". It sounds simple. But when you have to work it out in a spreadsheet, there are many ways to do it. I was trying to duplicate one particular way without knowing which one. Here's what I did: From the first row of data I took the January 1948 unemployment rate, and paired it up with a calculation for inflation: the Jan 1949 CPI over the Jan 1948 CPI, minus 1, formatted as a percent. (The CPI numbers come as index values, so I had to calculate the inflation rate myself anyway.) Then I copied the calculation down the 800 rows.

Then I took my VBA code and modified it to generate the data subsets and make all the dots round and color them to match what George Lesica had done. Working out the colors was the hardest part. Here's how my graph came out:

Graph #2
I'm happy.

"Series1"  in the legend is Excel's original plot of the whole dataset. (I just left it there. Those dots are all hidden by the subset dots in various colors.)

My data (from FRED) runs from 1948 to March 2016. My scatterplot stops at March 2015 so that I can calculate the subsequent twelve months' inflation. George Lesica's graph stops in 2012. I have extra years. I made them brown, my dots after 2012. Coulda made them yellow, they fit right in with the yellow curve.

You'll want to compare the two graphs. "Note, for instance," George Lesica says, "the dark blue cluster in the upper right, they appear to form a curve that is convex to the origin, just as the theory says they should." I got the same dark blue cluster, forming the same curve.

If you go dot by dot, the two graphs still match up. Take the highest group, looks like five of those dark blue dots. The pattern of those five dots is almost identical on the two graphs. Below that group, a single dot (on both graphs) and to the right of it another group -- again with very similar arrangement on the two graphs. The slight variations could be due to data revisions or to different data sources (Did Lesica use the Consumer Price Index, or something else? I'm not sure) or to my choice of the calculation for the inflation rate.

But the slight variations don't concern me. I got curves, Phillips trade-off curves, identifiable by color. These curves correspond to those on the graph from George Lesica. Now I'm confident in his work and happy with mine, and I've finally managed to plot a Phillips curve that actually looks like a Phillips curve.

All in all, a good day.

// The Excel file.

Sunday, May 1, 2016

Two Views of the Phillips Curve

On the one hand we have David Andolfatto, who thinks this PowerPoint presentation makes a great statement. I think it entirely misses the point.

On the other hand we have George Lesica, who created this absolutely spectacular image for a data visualization class:

Source: https://lesica.com/exploring-the-phillips-curve.html
Copyright by George Lesica - Licensed CC BY-SA
Size reduced to fit my blog -- Click for larger image

Saturday, April 30, 2016

Looking for weakness

Trump? Cruz? Clinton? Sanders? Whose boom will it be? No one will credit Obama, surely.

I marked up a graph of commercial loans:

Graph #1

Last time, the increase started around mid-2003. There was that awful low there just around 2006, related to the housing slump. And there were a couple feeble attempts at increase, indicated by my black arrows.

This time, the increase started in early 2010. It is a steeper climb, faster increase. There are no awful lows, and no feeble attempts at increase. No signs of trouble. I don't see recession in the cards.


Making predictions makes me nervous, so I have to say "this isn't investment advice".

Also, yeah, I'm the guy who says we have too much debt already, yeah. But as long as we base economic policy on the idea that "using credit is good for growth", increased lending is a sign growth is improving.

Increased lending doesn't solve the too-much-debt problem. To solve that problem we have to change the idea that guides economic policy.

Friday, April 29, 2016

Disorganized Writer Offers Follow-Up to 'Scatterplot Trends' Story

On the 27th I took a scatterplot -- the private-debt-to-public-debt (P2P) ratio versus inflation-adjusted GDP growth -- and tweaked the hell out of it. Ended up with the data not chronological but sorted on the P2P values, with both the x and y values expressed as moving averages of the sorted data, and with a series of short trendlines describing the path of the scatterplot trend.

That was fun to do. But the conclusion I came to, after all the fun, was

Not sure about sorting the values.

Not much of a conclusion, is it? I want to go back and get sure about sorting the values. How would it look if I put the data back in chronological order? That was my question.

Here is the last graph from the 27th:

Graph #1: 8Q subsets with 6Q Overlap, Data Sorted on X Values
You can see that the black line -- imagine the series of short black trendlines is one long line describing the pattern of dots -- the black line moves consistently rightward from lower to higher ratio values. That's because the data is sorted on those values.

When I put the data back in chronological order, the ratio values tend to get higher over time but there is some backtracking along the way. And a lot of the ratio values fall between 3½ and 5, so that we end up with a lot of dots and a lot of black trendline in that part of the graph:

Graph #2: 8Q subsets with 6Q Overlap, Data in Chronological Order
Quite a difference from the first graph. Quite a difference sorting makes.

Quite a difference, too, from my scatterplot of the unmolested data:

Graph #3: Unsorted Data, No Moving Averages, One Overall Trendline
No conclusion this time. Just pictures.

Thursday, April 28, 2016

Hamilton's find and the Phillips Curve

James Hamilton recently looked at Macrofinancial History and the New Business Cycle Facts (PDF, 55 pages). According to Hamilton,

Source: James Hamilton, from
Jorda, Schularick & Taylor
The authors find that as economies have become more leveraged, the standard deviation of output growth has become smaller, consistent with a phenomenon that has been described as the Great Moderation in the United States since 1985.

Well that's sort of a big deal. It implies that as debt grew, debt influenced GDP growth and resulted in the Great Moderation. Furthermore,

They also find that the skewness of GDP has become more negative– big movements up have become more subdued relative to downturns.

In other words, the Great Moderation wasn't really so "great". The volatility ("standard deviation") of GDP was less simply because we stopped getting the "big movements up".

Graph #1: The Great Moderation -- Output Growth No Longer Breaks the 5¼% Barrier
I think everybody knew as much. Still, it is nice to see it documented.

Remember Okun's law? When output growth doesn't go up, employment doesn't go up:

Graph #2: The Great Moderation -- Employment Growth No Longer Breaks the 3% Barrier
So Hamilton's find tells us that debt growth pushed unemployment up. Think of the effect of this on the original Phillips curve: Debt growth caused a change in the horizontal axis values. It pushed unemployment higher and farther from the origin. It shifted the curve and it raised the "natural" rate of unemployment.

To be sure, I'm the one describing a cause-and-effect relation. Hamilton quotes from the PDF that

as economies have become more leveraged, the standard deviation of output growth has become smaller

They describe correlation, not causation. And again when Hamilton quotes from the conclusion:

our core result– that higher leverage goes hand in hand with less volatility

Higher leverage only goes "hand in hand" with reduced volatility and lower growth, they say. They don't claim that excessive debt "caused" the changes.

So I'll say it: Excessive accumulated debt caused the changes: The lower growth. The reduced volatility. The increase in "house prices" since 1950. The "more severe tail events". And the shift in the Phillips curve.

Wednesday, April 27, 2016

Scatterplot Trends

"Learn to program" -- Bill Gates

I had some trouble determining the trends shown by scatterplots. Looked at that on 21 April ...

Graph #1: Five-Year Subsets of Annual Data

... and again on 23 April.

Graph #2: 12-Quarter Subsets of Quarterly Data
For the second of those two graphs I used Excel VBA to automate creating the trendlines.

Neither of the above graphs satisfied me. Wanting to improve the result as painlessly as possible, I decided to tweak the VBA code.

I added a couple variables, one to hold the start row, and one to hold the end row of the data. Since my habit is to put dates in Column A and data in Columns B and C, the start-row and end-row values are enough so that my code knows where to find the data on the spreadsheet.

Then I added a couple more variables, one for the number of data points to include in each trendline, and one for how much of an "overlap" I want from one set of data points to the next. I wanted these as variables because I wouldn't know what the graph looked like until it was done. And I wanted it to be easy to make the trendlines longer or shorter, and overlap them more or less, based on how the graphs looked.

I put all four variables together, near the top of the code. I have to go in and change the values, then run the code to change how the graph looks. But if I was doing it by hand I'd have to go into the Select Data Source form to subset the data, and then go into the Format Trendline form to finesse the trendline. I just put all the finessing in my code instead.

On both graphs above, some of the trendlines are long and some are short. It depends on the values, the RGDP growth values and the debt ratio values. On both graphs above, the data is in chronological order even though the dates are not shown on the graph. I thought I might get trendlines more equal in length if I sorted the data by the debt ratio values.

Graph #3: 8-Quarter Trend Lines with 6-Quarter Overlap, Sorted on X Values
Eh, lots of the lines are still short and lots of them are still quite long. Sorting didn't help.

Still, sorting the data for a scatterplot is an interesting idea. I wouldn't want to do it for a Phillips curve, say, where there is a trade-off between x-axis values and y-axis values. But on these debt-and-growth graphs, where I'm looking at the debt ratio as cause and RGDP growth as effect, I think sorting might make sense.

If I was looking at RGDP growth over time, for example, the x values -- dates -- would be in chronological order. Why shouldn't the x values be in order even when those values are not dates? Especially if you have "cause" on the x-axis and "effect" on the y-axis.

But sorting didn't make my trendlines all the same length. Oh, well. It's the leftmost lines that strike me as long -- from the early years, when the business cycle pushed RGDP values up and down without any great "moderation". (Of course, you wouldn't know it's the early years, as there are no time values on Graph #3.) I thought I might condense the data variation by using a five-quarter moving average of the RGDP values:

Graph #4: 8Q Subsets with 6Q Overlap, Sorted on X Values
Well, the lines still look long where the ratio is low, but between 5 and 6.5 on the x-axis the dots clustered nicely, and the trendlines too. Hm. I like it.

I increased the moving average from 5 to 9 quarters for the y-axis, and changed the ratio values to a 5-quarter moving average for the x-axis. Moving averages on both axes now. And now I'm starting to see a shape in those dots:

Graph #5: 8Q subsets with 6Q Overlap, Sorted on X Values
I like it!

Summary: Not sure about sorting the values. But using moving averages on both the x- and the y-axis sure did make a pattern stand out.

// The Excel file. Don't believe the Google Drive preview. Download the file & open it in Excel and the graphs will be fine.

Tuesday, April 26, 2016


Ran across this graph from December of 2013:

Graph #1: PGDP from 2005 (blue) and 2013 (red)
The graph shows the growth rates for two estimates of Potential GDP, the January 2005 estimate and the February 2013 estimate. Eight years separate the estimates.

Two years and some have passed. Time to update the graph.

Graph #2: PGDP from 2005 (blue), 2013 (red), and 2016 (green)
Red and blue as the same as above. Green is new. Potential GDP is still falling.

Graph #1 shows the older FREDGraph output, before the revision of March 2014. Graph #2 shows the newer output, from after the revision. The new default background color is faint, and the left margin label overwrites the vertical axis.

The economy's not getting any better, and the graphs ain't, either.

US. Congressional Budget Office, Real Potential Gross Domestic Product [GDPPOT], retrieved from ALFRED, Federal Reserve Bank of St. Louis https://alfred.stlouisfed.org/series?seid=GDPPOT, April 25, 2016.

Monday, April 25, 2016

April Update: We are at the bottom ...

From mine of 3 March 2016:
We are at the bottom now, ready to go up.

Graph #4: DPD with Trend out to 2030
We're right there right now. DPD is ready to go up right now.

Remember: When the downtrend turns and an uptrend begins the economy for a while is very, very good. This is not going to be your typical anemic recovery. This is going to be the full tilt, rapid output growth, rapid productivity growth, high performance boom.

I can't promise you it'll last long, because the level of debt is already very high. But it'll be a good one while it lasts.

Cheese, I gotta make a better graph!


There are a few people who might see things as I do...

... and a few headlines that suggest such things...

... but for the most part, projections look like this month's New York Fed Staff Forecast: RGDP growth slowing from 2½% in 2014 to 2% in 2015, holding at 2% in 2016, and slowing to 1¾% in 2017. Sluggishness on top of sluggishness.

They predict no improvement. They are assuming that the existing state of affairs will continue indefinitely. Not me. I have specific reasons to expect a change: I have my Debt-per-Dollar graph. I predict strong growth to develop over the next three years, and to last perhaps five years.

// see also: A Pictorial History: Private and Public Debt