Stock Market Cycles

Stock Market Cycles

Code, Scripts & Indicators

Hodrick Prescott Filter - Source Code

Detrending data series with the HP filter

Lars von Thienen's avatar
Lars von Thienen
Nov 14, 2023
∙ Paid

“HP” Filter can be used to return either the detrended series or the trend component.

Source code is provided in C++ source code format:

User's avatar

Continue reading this post for free, courtesy of Lars von Thienen.

Or purchase a paid subscription.
© 2025 Lars von Thienen · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture