RussellSB/pytrendy: Trend Detection in Python. Applicable for real-world industry use cases in time series.

| For the past year, l've been building PyTrendy, an open-source Python package that fills a specific, often overlooked gap in time series analysis: Automated Trend Detection. Why PyTrendy? Most tools either give you a "trend component" (via decomposition) or "changepoints" (the moments of shift). PyTrendy is built for labelled segment analysis. I built this out of a direct need to improve on existing methods: - Beyond Step Changes: While ruptures is the gold standard for abrupt shifts, I needed to also handle gradual slope changes - the kind often seen in digital marketing activity, stock trends, and energy time series. - The Flat/Noise Problem: Previous tools such as pytrendseries, trendet, & tstrends are closest in function to what PyTrendy targets. But I found that they often over-fit trends on flat or noisy periods, expecting users to set up their own labour-intensive workarounds to avoid this. My approach uses signal-processing and post-processing logic under the hood to ensure the algorithm identifies trends that are precise and valid. In a complex business ecosystem where dozens of time series interact, knowing exactly how they align or confound each other at specific points in time is invaluable. Especially for experiment design. Without understanding the DGP process well enough and how it varies across time, experiments could fly blind and generate misleading indications. Explore the project Let me know what you think! Hope other practitioners benefit from this for their own time series use cases. - Documentation: https://russellsb.github.io/ [link] [comments] |
Want to read more?
Check out the full article on the original site