Sunday, December 11, 2011

Confidence Bands for the H-P Filter: Correction!


In a post a couple of days ago I posted about constructing confidence bands for the trend that's extracted from a time-series using the Hodrick-Prescott (HP) filter. There was an error in my EViews program code that affected the last graph I showed in that post.

A GREAT BIG HT to Riccardo (Jack) Luccetti for pointing out the silly error in my earlier EViews program code, and for supplying gretl script that is now available on the Code page for this blog.

The EViews code has been corrected, of course, and I've modified the relevant part of the earlier post. I'll reproduce the changes here:

"Plugging all of this into equation (6) and pulling out the standard errors we get confidence bands that are a little wider than those based on the naive assumption that V(y) is scalar:

Notice that the confidence bands based on the AR(1) model are a little less informative than are those based on the assumption that V(y) is scalar. Of course, we can't presume that this relationship between the confidence bands will arise with other time-series or other time-periods."

I guess the positive aspect of this is that it illustrates the importance of transparency and replication!

Of course, if I'd coded everything up in gretl in the first place..........

© 2011, David E. Giles

No comments:

Post a Comment