I see that gretl uses by default the value lambda=1600 for quarterly
data, lambda = 100 for annual data and lambda=14400 for monthly data.
For the quarterly case this was studied in the HP article and this value
has been adopted almost as a "convention" for obtaining a trend/cycle
decomposition.
The values for annual and monthly data has been during some time subject
to controversy. In particular, some papers consider the above values
inappropiate because the agregation(from monthly to quarterly or
quarterly to annual) of the trend gives very different results. But now,
based on this requirement of equivalence on agregation, it seems that
finally an agreement has been reached. It implies lambda(annual)=6.25
and lambda(monthly)=129600 or more generally
lambda(S)=6.25*S^4
being S the seasonal periodicity.
I suggest that gretl adopts these defaults.
In these papers we have different justifications for such a formula:
Maravall, A. y del Rı̀o, A. (2001), Time aggregation and the Hodrick-
Prescott filter, Working paper 0108, Banco de España.
Ravn, M. O. y Uhlig, H. (2002), ‘On adjusting the Hodrick-Prescott
filter for
the frequency of observations’, The Review of Economics and Statistics
84(2), 371–380.
de Jong, R. M. y Sakarya, N. (2016), ‘The econometrics of the Hodrick-
Prescott filter’, The Review of Economics and Statistics 98(2), 310–317.
--
Ignacio Díaz-Emparanza
Departamento de Economía Aplicada III (Econometría y Estadística)
Universidad del País Vasco - Euskalherriko Unibertsitatea, UPV/EHU
Tfno: (+34) 94 601 3732
http://www.ehu.eus/ea3