Name

hpfilter — Hodrick Prescott filter

CALLING SEQUENCE

[hpy]=hpfilter(y,lambda)

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

• lambda = the smoothing parameter

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

Hodrick Prescott filter.

EXAMPLE


load(GROCERDIR+'data\Fra_GDP.dat')
Xf=hpfilter('Fra_GDP',1600)
 
// This example provides the traditional Hodrick Prescott filtering of a the French quarterly GD0 with parameter lambda=1600.

               

AUTHOR

Eric Dubois 2003