Saturday, September 8, 2012

On Trends

Slide your mouse pointer along the Number Bar below the graph to see different trend lines fitted to the plot of real GDP growth.

Suppose you take a good long series of numbers, graph it, and then go looking for trends. It is easy to use turning points that suit one's own point of view. Where you place a turning point can make a downtrend look like Reagan's fault, for example, or make it look like a problem that Reagan fixed! Or Obama, even.

I happened to remark to Jerry that

sometimes I try to think of a way to let the computer compare short ranges and longer ranges, and let it search for turning-points in trends. I would have to set parameters, like a five-year or N-year minimum period length. And maybe use least squares to compare various ranges.

A few days later he got back to me:

This turns out to be surprisingly hard to do.

Jerry is the same who created the "Stimulus Watch" gadget on my sidebar, one of the "Debt Accumulation" models, and the "Random Eyes" browser for FRED graphs.

Recently, he got back to me again, with a "gui" version that was so simple even I could use it. Below is a "hover craft" display of trends on FRED data for real GDP growth.

Slide your mouse pointer back and forth on the number-bar below the graph to see computer-generated breakpoints and trends.

Graph #1: Real GDP Growth and Computer-Generated Trend Lines

1 Trend Line2 Trend Lines 3 Trend Lines 4 Trend Lines 5 Trend Lines 6 Trend Lines 7 Trend Lines 8 Trend Lines 9 Trend Lines 10 Trend Lines 11 Trend Lines 12 Trend Lines

1 comment:

Jazzbumpa said...

Of course, this is very near and dear to me.

Lines 6 and 8 are very similar.

Ditto 7 and 9.

I like to put trends in channels. Project a line through the top two peaks (ca 1950 and '84,) because it is a declining channel, and drop a parallel touching that 3 min cluster at the left to define the bottom.

Within that, you can discern shorter length channels trending either with or against the higher level trend. It's quasi Elliott wave. These might contain excursions from one channel boundary to the other.

I put a Clinton channel in this post.

Still, defining a turning point, even in retrospect, is going to be inexact. One shot is to put midlines in the interior channels, and see where they intersect. The nearest extreme value is the end pon of the previous channel. That's a pretty decent estimate, and it's a data driven protocol.

Of course, a dramatic breakthough is also significant.