PyData Global 2025

Detecting Regime Shifts in Time Series with Python: Entropy-Based Change-Point Detection
2025-12-11 , Machine Learning & AI

Financial and other real-world time series often experience abrupt regime changes that can break assumptions and invalidate models. This talk shows how to use k-nearest neighbor entropy estimators combined with clustering algorithms, implemented entirely in Python, to detect these change-points early. We’ll explore practical examples with financial market data, discuss strengths and limitations, and provide reusable open-source code. Attendees will leave with tools to make their time series models more robust to sudden structural changes.


Time series data in finance, IoT, or sensor monitoring are rarely stationary — regime shifts happen suddenly, and failing to detect them early can lead to inaccurate predictions or large financial losses.

This talk presents a practical, Python-based approach to change-point detection in multivariate time series using k-nearest neighbor entropy estimators combined with clustering techniques. This method uses open-source libraries like NumPy, scikit-learn, and pandas, and can be adapted to various domains.

Takeaways:

  • How to implement entropy-based change-point detection with open-source Python tools.

  • How to identify and handle abrupt shifts in time series to make models more robust.

  • How to apply these techniques beyond finance to any time series with regime shifts.


Prior Knowledge Expected:

Yes

Sergei Nasibian is a Quantitative Strategist at Rothesay in London, where he designs and implements systematic trading and risk management models. He previously worked as a Data Scientist at McKinsey & Company and as a Senior Analyst at Yandex Eats, developing data-driven strategies across diverse domains. Sergei holds a degree with honors in Mathematics from Lomonosov Moscow State University, specializing in probability theory and stochastic processes. His research experience includes entropy-based change-point detection methods developed during a collaboration with Ulm University. Sergei is passionate about translating advanced mathematical concepts into practical, production-ready tools using open-source Python libraries, and he enjoys exploring intersections between machine learning, statistical modeling, and financial markets.