Hodrick Prescott Filter - Source Code
Detrending data series with the HP filter
“HP” Filter can be used to return either the detrended series or the trend component.
Source code is provided in C++ source code format:
Keep reading with a 7-day free trial
Subscribe to Stock Market Cycles to keep reading this post and get 7 days of free access to the full post archives.