Sunday, April 12, 2015

Inflexible Trends


When you make a graph at FRED, the first series you use establishes the start- and end-dates for the default display.

Maybe you start with a series that runs from 1947 to 2014. Then you add another series and divide the one by the other. But the new one you added only starts in 1967 maybe. So the computer cannot figure the first 20 years anymore, because it's a number you have, divided by a number you don't have. So they just leave that out.

But the default dates don't change. (That's probably a good thing.) So you are left with a plot area that starts at 1947, and a plotted line that only starts in 1967. The first 20 years of your graph show blank white space.

If you look at FRED graphs people have made, you'll often find those big white spaces in the starting years. You can find it on a lot of my FRED graphs, for sure. Maybe you never noticed. But now that you know about it, you'll see it all the time.


I started with a FRED graph showing Total Financial Assets (FRED's TFAABSHNO). The data runs from 1949 to 2014. Then I added the M1ADJ series (M1 Adjusted for Retail Sweeps) which runs from 1967 to 2013. So of course the plot area was blank for the years 1949-1966. Then I added a trend line to the graph. That's a new feature at FRED. Here's what I got:

Graph #1
The blue line, showing my calculated data, starts at 1967. But the red line, FRED's trend line, is shown on the graph starting at 1949.

What happened? The guys that added the trend line routine to the FRED code forgot to check where the data starts. They just went with the default start-date. And so that's what the graph shows.

This is funny stuff.

I knew about the reverse-order thing that I described above. So I created the graph again, from scratch. But this time I started with the series that starts in 1967, then added the series that starts in 1949. So by default, there is no blank white space. The years before 1967 are simply not shown.

Then I added the trend line again, and here's what I got:

Graph #2
I had a good laugh at that. Then I noticed that the red line is exactly the same on both graphs, and had another good laugh.

Then I noticed that the trend line is good for maybe the first dozen years and for the last few, and otherwise it is way the hell off from where it should be.

And then I noticed that they don't even do a trend calculation. The red line starts at the first value of the blue line, and ends at the last value of the blue line. And what they call a "trend line" is really just a straight line from the first blue point to the last blue point.

That's embarrassingly bad, I think.


But hey, don't take my word for it. Let's see what Excel gives us.


That's more like it.

Cross Posted at On the Death of FRED

No comments: