Recursive one-sided HP filtered trend
Recursive one-sided HP filtered trend
Hi, does any one have an example of a one-sided Hodrick-Prescott filter for the purpose of calculating gaps/deviations from trend (e.g., credit to GDP ratio)? Thanks.
Re: Recursive one-sided HP filtered trend
Wouldn't that just be the state-space model in the HPFILTER.RPF
with TYPE=SMOOTH in
dlm(a=ahp,c=chp,f=fhp,sv=1.0,sw=1.0/lambda,presample=diffuse,$
type=smooth,var=concentrate,y=lgdp) / hpstates
replaced with TYPE=FILTER? You would have to adjust the LAMBDA value to the value specified. The trend itself can be pulled out as the series HPSTATES(t)(1).
with TYPE=SMOOTH in
dlm(a=ahp,c=chp,f=fhp,sv=1.0,sw=1.0/lambda,presample=diffuse,$
type=smooth,var=concentrate,y=lgdp) / hpstates
replaced with TYPE=FILTER? You would have to adjust the LAMBDA value to the value specified. The trend itself can be pulled out as the series HPSTATES(t)(1).
-
randal_verbrugge
- Posts: 14
- Joined: Mon Sep 23, 2013 10:43 am
Re: Recursive one-sided HP filtered trend
You are probably aware of this, but in case you aren't ... all filters like this have serious problems near the edges of the data.
The standard procedure to help minimize this is to augment the data with a forecast. (For example, see Ashley and Verbrugge, Econometric Reviews 2009). In quarterly data, I'd say 8 quarters.
The RATS proc for the Baxter-King filter actually does this automatically, both at the beginning and the end of the sample period.
The standard procedure to help minimize this is to augment the data with a forecast. (For example, see Ashley and Verbrugge, Econometric Reviews 2009). In quarterly data, I'd say 8 quarters.
The RATS proc for the Baxter-King filter actually does this automatically, both at the beginning and the end of the sample period.
Re: Recursive one-sided HP filtered trend
Dear randal_verbrugge,randal_verbrugge wrote:You are probably aware of this, but in case you aren't ... all filters like this have serious problems near the edges of the data.
The standard procedure to help minimize this is to augment the data with a forecast. (For example, see Ashley and Verbrugge, Econometric Reviews 2009). In quarterly data, I'd say 8 quarters.
The RATS proc for the Baxter-King filter actually does this automatically, both at the beginning and the end of the sample period.
Thank you for the insight - I obtained results using the state-space model in the HPFILTER.RPF (with trend extracted as the series HPSTATES(t)(1)) but will investigate your suggested approach and compare results. Thanks once again.