gretl 2026d, Windows 11 Pro 64-bit.
When λ is not given, hpfilt() uses "100 times the square of the periodicity" (Function Reference): 100 for annual data, 1600 for quarterly and 14,400 for monthly.
On 14 October 2016 Ignacio Díaz-Emparanza proposed on gretl-devel, in the thread "Hodrick-Prescott parameter" (the message), to use λ = 6.25·S⁴ instead, S the periodicity, which gives 6.25 for annual, 1600 for quarterly and 129,600 for monthly data. The message cites Maravall & del Río (2001), Ravn & Uhlig (2002) and de Jong & Sakarya (2016). In that thread:
The default is unchanged in 2026d, and the Function Reference names neither the rule nor the paper. Earlier, ticket [bugs:#30] (2008) raised the GUI's cap on λ, then 28,800, so that Ravn and Uhlig's 129,600 could be entered for monthly data.
Other programs now use or document the rule:
tsfilter hp uses the Ravn–Uhlig rule by default whenever the time unit is set: 6.25 for yearly, 100 for half-yearly and 129,600 for monthly data (Time-Series Reference Manual, tsfilter hp, pp. 693 and 699).hpfilter(x, lamb=1600) keeps 1600, but its docstring cites Ravn & Uhlig's 6.25 for annual and 129,600 for monthly data.A check on gretl's own data. The attached hpfilt-default-lambda.inp uses only fedstl.bin. As in Ravn & Uhlig's Figure 1, it compares each HP trend with the quarterly λ = 1600 trend averaged over each year or quarter:
A. annual real GDP (gdpc1), 1947-2000 default (100) lambda = 6.25
RMS gap to the quarterly trend, per cent 1.1323 0.0309
sd of the cycle, per cent 2.225 1.501 quarterly cycle averaged by year: 1.527
B. monthly industrial production (indpro), 1950-2019 default (14400) lambda = 129600
RMS gap to the quarterly trend, per cent 1.3160 0.0055
sd of the cycle averaged by quarter 2.492 3.308 quarterly cycle: 3.305
So on these series the defaults make the annual cycle 46 % more volatile, and the monthly one 25 % less volatile, than the quarterly benchmark. With 6.25 and 129,600 the annual and monthly results agree with the quarterly ones, and on a grid of 0.01 the annual λ closest to the quarterly trend is 6.63.
The suggestion:
If backward compatibility rules out the first, the second alone would help users who rely on the default.
We decided to switch to the formula for lambda recommended by Ravn-Uhlig (2002). This is now done and documented.