Fully Modified HP Filter Function

This function estimates trend & cycle of a time series using Fully Modified Hodrick Prescott Filter
167 Downloads
Updated 31 May 2017

View License

Hodrick-Prescott (1997) filter, (or HP filter), is the most popular tool to extract cycle from a time series. There are certain issues with HP filter including fixed value of lambda across the series/countries and end points bias (EPB). Modified HP filter (MHP) of McDermott (1997) attempted to address the first issue. Bloechl (2014) introduced a loss function minimization approach to address the EPB issue but keeping lambda fixed (as in HP filter). Hanif, Iqbal and Choudhary (2017) marry the endogenous lambda approach of McDermott (1997) with loss function minimization approach of Bloechl (2014) to analyze EPB in HP filter, while intuitively changing the weighting scheme used in the latter. Hanif et al (2017) names it “fully modified HP filter”. FMHP filter outperforms a variety of conventional filters in a power comparison (simulation) study as well as in observed real data (univariate and multivariate) analytics for a large set of countries.

Cite As

Muhammad Nadim Hanif (2026). Fully Modified HP Filter Function (https://www.mathworks.com/matlabcentral/fileexchange/63198-fully-modified-hp-filter-function), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2016a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Data Preprocessing in Help Center and MATLAB Answers
Version Published Release Notes
1.0.0.0