One-sided HP filter

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

One-sided HP filter

Postby brasidas1 » Wed Jun 18, 2014 12:40 pm

Hi,

I hope I'm posting the question in the right part of the forum. Johannes Pfeifer discusses the one-sided HP filter in his guide to observation equations (thanks Johannes, I found it very useful) and mentions that the resulting de-trended variable will always have a mean of zero.
I have been using the add-in from Eviews to carry this out as well as the Matlab file from the file exchange and both yield identical, but not mean-zero, output. I could of course de-mean the result but it's somewhat puzzling.

Does anyone have any suggestions?
Many thanks
brasidas1
 
Posts: 5
Joined: Fri May 16, 2014 8:20 am

Re: One-sided HP filter

Postby jpfeifer » Wed Jun 18, 2014 1:32 pm

Which Matlab file are you talking about? Most HP filters provide the trend component as the first argument. This one is not mean zero. Only the cyclical component is mean zero.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: One-sided HP filter

Postby brasidas1 » Wed Jun 18, 2014 2:22 pm

Dear Johannes,

Thank you for your reply.
All I did was
[Ytrend, Yobs] = one_sided_hp_filter_serial(log(Y))

where Yobs gives the cyclical component. Alternatively, Yobs = 100*(log(Y)-Ytrend) still gives the same output, which has a non-zero mean.

The Matlab file came from (http://ideas.repec.org/c/dge/qmrbcd/181.html) and the Eviews add-in (from their website) gives identical results.
Attachments
us_gdp1.xls
GDP (unlogged) data
(33.5 KiB) Downloaded 634 times
one_sided_hp_filter_kalman.m
hp filter file
(5.38 KiB) Downloaded 414 times
brasidas1
 
Posts: 5
Joined: Fri May 16, 2014 8:20 am

Re: One-sided HP filter

Postby jpfeifer » Wed Jun 18, 2014 3:45 pm

Because of the Kalman filtering approach, the sample mean of the trend component is always approximately zero (and not exactly zero as for HP-filtering) and becomes closer to zero the longer the data series (asymptotically). I will update the guide accordingly. Thanks for pointing this out.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare User Guide

Who is online

Users browsing this forum: No registered users and 1 guest