Skip to content

CUSUM (Cumulative Sum) filter for detecting structural shifts in financial time series, implemented in Python

Notifications You must be signed in to change notification settings

muMAJJI/Trading---CUSUM-FILTER

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง  Trading: CUSUM Filter

Quantitative Researcher | Mustafa MAJJI


๐Ÿ“š Project Overview

This project presents an implementation of the CUSUM (Cumulative Sum) filter in Pythonโ€”an effective statistical technique for detecting structural breaks or regime shifts in financial time series. The CUSUM filter excels at identifying persistent changes in the mean level of a process, making it a powerful tool for event detection, trend analysis, and signal generation in quantitative trading.

By filtering out minor fluctuations, the CUSUM method helps reduce false or noisy signals commonly produced by strategies based on moving averages, thereby enhancing the reliability of trading decisions.

In practice, the CUSUM filter signals a position entry when the cumulative price change exceeds a predefined threshold:

  • A long position is triggered when the rate of price increase surpasses a positive threshold.
  • A short position is initiated when the rate of price decrease falls below a negative threshold.

๐Ÿš€ Repository Structure

  • Images: Contains all images used in the notebook.

  • CUSUM_FILTER.ipynb: A Jupyter Notebook that explains and implements the CUSUM filtering process.

๐Ÿ“ช Contact

For any information, feedback or questions, please contact me

About

CUSUM (Cumulative Sum) filter for detecting structural shifts in financial time series, implemented in Python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published