<< hpfilter Business cycle tools spectral >>

Grocer >> Business cycle tools > hpofilter

hpofilter

Hodrick Prescott one-sided filter

CALLING SEQUENCE

hpy = hpofilter(y,q)

PARAMETERS

Input

* y = either

  - a time series, or

  - a real (nx1) vector, or

  - a string equal to the name of a time series or a (nx1) real vector between quotes

* q = relative variance of I(2) component (default values are 0.675*10^(-3) or 0.75*10^(-6) for quarterly or monthly data respectively)

 

Output

* hpy = the smoothed filtered series of the same type than y (if y is not a string) or evstr(y) (if y is a string)

DESCRIPTION

Applies to a series the one-sided Hodrick-Prescott filter, assuming the series is a white-noise + I(2) model (see A. C. Harvey and A. Jaeger (1993), "Detrending, Stylized Fact, and the Business Cycle", Journal of Applied Econometrics, 8, pp. 231-247).

EXAMPLE

load(GROCERDIR+'/data\Fra_GDP.dat')
Xf=hpofilter(Fra_GDP,1/1600)
 
// Provides the one-sided equivalent of the traditional Hodrick -Prescott filtering of a quarterly data x
// with parameter lambda=1600, whether x is a ts, a vector, or the name of such a variable between quotes.

AUTHOR

Emmanuel Michaux 2007

Report an issue
<< hpfilter Business cycle tools spectral >>