Saturday, March 17, 2012

A Glitch in the Matrix


You're gonna want to actually do this.

Go to FRED, in the search box type TCMDO, and press ENTER. // Not case-sensitive.

Just below the graph, under the FRED logo, it says EDIT GRAPH. Click that.

See how the blue line, the line showing the TCMDO values, starts two or three years after 1950? But if you read the "Observation Date Range" two or three lines down, it says the numbers start in 1949.

Actually it says they start in October of 1949. So, that might look like 1950 on the graph rather than 1949. But it shouldn't look like 1952 or 1953.

Maybe in the early years the numbers are just so low that we don't see them?

On the "Observation Date Range" line, click once in the box that states the end-date for the graph. FRED gives you a calendar. Click the drop-down for the year, scroll up a bit, and click 1960. Click Close to close the calendar.

A few lines down, click Redraw Graph to redraw the graph. FRED gives you a new picture, and we are now zoomed-in on the early years. You can see that the numbers start in 1952 or late 1951, not in 1949 or 1950.

That's not a glitch. The numbers for TCMDO start with 1949, but those are annual numbers. The quarterly numbers start a bit later.

Now, down below the "Redraw Graph" button, find the gray bar that says Add Data Series and click that. By default, the option is selected to give you a "new line". That's good. Click in the blank input box on the next line down (between the words "Search" and "Browse"), type TCMDO and press ENTER. Now you get a new picture, like the first one you had, except the line is red this time.

Up a little bit, click on the gray bar for Line 1: Total Credit Market Debt Owed (TCMDO). On the "Observation Date Range" line, click Copy to All Lines to copy the dates we're using for the blue line, to the red line. Click Redraw Graph.

Now you get the zoomed-in view, but only one line is visible, in red, because the red and blue lines are identical and the red one is on top.

We can change that.

If you've been following along here, doing it at FRED, you're now looking at the "Line 1" information. A couple lines down from the "Observation Date Range", the "Frequency" line reports that the frequency is "Quarterly, End of Period". (Don't change that.)

At the bottom of the "Line 1" info is the "Redraw Graph" button, and just below that is the gray bar for Line 2: Total Credit Market Debt Owed (TCMDO). Click that.

Change the "Frequency" for Line 2 to Annual and click Redraw Graph.

Now you have two lines -- the blue one we couldn't see before, and a red one parallel to it, a bit higher and more to the left.

The red line is smoother because it shows annual rather than quarterly data. And the red line is more to the left because the annual numbers start in October, 1949.

On the "Frequency" line we're looking at, for Line 2, the frequency is given as "Annual" and to the right of that, the "Aggregation Method" is "Average".

Click the drop-down for "Aggregation Method", select Sum, and click Redraw Graph. The red line changes dramatically. It jumps way up as soon as the blue line starts, and rises faster than the blue line -- apparently because it adds each new value to the previous total. So that's "Sum".

Click once again the drop-down for "Aggregation Method" and this time select End of Period. Click Redraw Graph. The red line changes, and now looks like a smoother version of the blue line, again a bit higher and to the left.

But is it the same as the default, the aggregation method called "Average"?

Click on the gray bar for Add Data Series and on a new line put TCMDO once again. Click the gray bar for Line 1: Total Credit Market Debt Owed (TCMDO), on the "Observation Date Range" line click Copy to All Lines, and click Redraw Graph.

Now the new green line hides the original blue line, because both show quarterly data. We'll change the new line.

Click the gray bar for Line 3: Total Credit Market Debt Owed (TCMDO). Change the "Frequency" from "Quarterly, End of Period" to Annual.

To the right of that, the "Aggregation Method" appears, with the value "Average". That's fine, don't change it.

Click the Redraw Graph button.

Now you have three data lines, all pretty much parallel. The blue line is our original version of TCMDO, which shows quarterly data. The red line shows annual data using "End of Period" aggregation. And the green line shows annual data using the "Average" method.

Oh. In case you don't know: By default FRED uses blue for the first line you put on a graph, red for the second, and green for the third line. That's useful, because it helps you interpret the graph.

The next line we add will be orange, because it is line number four.

Now it gets interesting. Take another look at the graph before we continue: Three lines pretty much parallel, and a maximum value on the vertical axis of 800 -- 800 billion dollars.


Okay. Click the gray bar for Add Data Series and add one more new line, again TCMDO, same as before. When you hit ENTER, the graph is redrawn for you. But we have to fix the ending date again. Click the gray bar for Line 1 and (on the "Frequency" line) click Copy to All Lines. Click Redraw Graph.

Observe that Line 1 (the blue line which we can't see because the orange line covers it completely at the moment) has the frequency "Quarterly, End of Period". Change nothing.

Click the gray bar for Line 2 (the red line) and observe that it has "Annual" frequency and "End of Period" aggregation. Change nothing.

Click the gray bar for Line 3 (the green line) and observe that it has "Annual frequency" and "Average" aggregation. Change nothing.

Click the gray bar for Line 4 (the orange line). The frequency is quarterly, like the first line. (That's why the orange line hides the blue line.) I want to change the frequency and aggregation for the orange line.

Change the frequency to Annual.

The aggregation method, by default, is "Average". Leave it. Click Redraw Graph

I see four lines:


But I shouldn't see four lines. I should see three. The orange line shows "Annual" data and "Average" aggregation, exactly the same as the green line. The orange line should hide the green line. But it doesn't. This is a glitch, a FRED glitch. Wow.

Now, let's finish up. For Line 4 change the aggregation method to Sum and redraw the graph. I get spikes all over the place:


The green line has spikes. The orange line has spikes. And the red line has spikes. So, changing the aggregation method for Line 4 to "Sum" affected Line 4 and Line 3 and Line 2.

This is definitely a glitch.

Wow.

// UPDATE 21 March 2012

I notified the St. Louis Fed about this glitch. Monday they said they had replicated the error and were looking into it. Tuesday evening they said they got it fixed.

Your tax dollars interest-cost dollars at work. :)

4 comments:

Jazzbumpa said...

We all need to know, so thanks for the detective work.

Have you given this information to webmaster@research.stlouisfed.org?

That is who can do something about it.

Cheers!
JzB

The Arthurian said...

ya, have done. Thanks, Jazz.

I can't help but think... based on my experience with computers... that when there's a glitch it is usually my own glitch, not somebody like FRED or Microsoft. I don't have a team of guys checking my logic :)

But I can't see anything I did wrong, to get those crazy results.

Gene Hayward said...

Off point, a bit, and I don't know if you read Matt Iglesias, but he apparently is tying to "Go Arthurian". However, I think he is struggling... :)

http://www.slate.com/blogs/moneybox/2012/03/16/the_credit_bust.html

The Arthurian said...

Wow Gene, thanks! Yglesias links to the same Felix Salmon post that "anonymous" linked
here

Salmon links to Greg Ip.

In a comment on the Yglesias column, Peterinchicago says: Greg Ip and Felix Salmon are signing on to James Bullard's (of the St. Louis Fed) thesis that the output gap isn't as large as estimated.

And I did a few on Bullard not long ago.

Thanks for the link, Gene. It's part of a whole package of relevant stuff.

However, I have a problem with Yglesias right from the start. Here is his opening:
I was a little confused by this post from Felix Salmon since he has a chart that seems to compare a nominal quantity to an inflation-adjusted one...

He also points out that TCMDO is nominal.

Salmon's second graph compares TCMDO to the stuff in his first graph.

Since Yglesias says TCMDO is nominal, he must mean that something in Salmon's first graph is "inflation-adjusted" -- or what economists most often call "real".

But what is in Salmon's first graph? GDP, for one thing. And GDP, at FRED, is a nominal quantity.

The only other thing in Salmon's first graph is shown in the upper line of the top border on the graph:
GDPPOT*GDPDEF/100

Now, if somebody is ignorant or really really careless, they might see the GDPDEF in that line and figure the thing shows "real" numbers, inflation adjustment. But the extreme closeness of the two lines on Salmon's first graph makes it obvious that if the one line -- GDP -- is nominal, then so is the other one!

A glance at FRED confirms that GDPPOT is "Real Potential Gross Domestic Product" -- an inflation-adjusted number.

A glance at the formula line shows that GDPDEF is being MULTIPLIED IN to the inflation-adjusted number, NOT DIVIDED OUT of it.

As Salmon says: Don’t be confused by the weird formula: potential GDP is released in real 2005 dollars, so I’ve multiplied that data series by the GDP deflator to convert it to nominal dollars.

But Yglesias was confused nonetheless.

Sorry if this sounds like a rant, Gene. It's just an off-the-top-of-my-head reaction. Yglesias is a well-know, well-respected guy. But apparently he is ignorant, or really really careless. And he is most definitely struggling, as you say.

Never read the guy.