[Gretl-users] HP-filter

Riccardo Jack Lucchetti r.lucchetti at univpm.it
Tue Jun 13 17:07:56 EDT 2006


On Tue, June 13, 2006 22:40, Daniel wrote:
> Hi,
>
> Im a novice at this so my question might be kind of simple but does anyone
> know how to apply the HP-filter in gretl to alot of time series. I have like
> 200 series to filter so doing it manually is pretty time consuming...

Loops are your friends; try this in the console or, better still, in a script:

loop foreach i x y z
  series cyc_$i = hpfilt($i)
  series tre_$i = $i - cyc_$i
end loop

>
> Thanks!
>

You're welcome!


Riccardo "Jack" Lucchetti
Dipartimento di Economia
Facoltà di Economia "G. Fuà"
Ancona




More information about the Gretl-users mailing list