File Exchange

image thumbnail

Hodrick-Prescott Filter

version 1.0.0.0 (2.04 KB) by Wilmer Henao
Finds the Hodrick-Prescott filter of a series.

12 Downloads

Updated 18 Sep 2003

View License

This m-file finds the Hodrick-Prescott filtered series of any trendy time series; H-P is widely known in econometrics and can be used to analyse the trends and volatility of the series.

This version uses sparse matrices, this approach increases speed and performance and allows working with several time series simultaneously. The option 'makeplot' plots every time series introduced against its filtered counterpart and the output desvabs gives a "measure" of the volatility.

Download and type Help hpfilter for more details

Inspired in hpfilter by Ivailo Izvorski and Gauss code by Ken Matheny

Comments and Ratings (12)

Can I use this code for daily time series?

with many thanks

Panty

Panty (view profile)

is there any available m-file which corrects for the end-of-sample problem that filters like this face? Thank you

amira sultan

excellent

amira sultan

excellent

HP Filter

There is also an online Hodrick-Prescott filter at http://ideas.repec.org/c/dge/qmrbcd/97.html

fatima zahra taouss

can I use excel to run Hodrik-Prescott filter?

Jürgen Raue

sehr gute verständliche arbeit. könnte nur noch durch ein wenig theoetischen hintergrund verbessert werden

Kurt Annen

Look at www.web-reg.de. There is an Add-In for the HP-Filter (freeware). Unfortunality it is in german language. a translation will follow.

Nadir Yigitcanoglu

Can I find a patch for excel to run Hodrick-Prescott filter?

Thanx

cristiano angelis

cristiano angelis

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired: Analyze FEX download data

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.


Learn About Live Editor