Stock Market Cycles

Stock Market Cycles

Share this post

Stock Market Cycles
Stock Market Cycles
Hodrick Prescott Filter - Source Code
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

Share this post

Stock Market Cycles
Stock Market Cycles
Hodrick Prescott Filter - Source Code
Share

“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.

Already a paid subscriber? Sign in
© 2025 Lars von Thienen
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share