The turn of the month strategy is one of the most well-documented calendar anomalies in the stock market. During our recent StockLab course, we discussed the importance of ensuring that a strategy operates within the appropriate market regime. I’m now diving deeper into this topic — exploring how different market regimes influence our existing strategies, starting with the turn of the month strategy.
What Is the Turn-of-the-Month Strategy?
It’s widely believed that, after receiving their salaries, many investors allocate funds into ETFs like SPY, which tends to lift the market during the last few trading days of the month and the first few days of the next month. This recurring pattern is what traders call the turn of the month strategy — and it has been observed consistently across more than 50 years of market data.
I tested this behavior over 50 years of data and found that it produced positive returns most of the time. Below is a backtest in AlgoCloud using data starting in 1993.

Backtest of the turn of the month strategy — equity curve from 1993
Why Add a Volatility Regime Filter to the Turn of the Month Strategy?
Recently, the strategy suffered a sizable loss when it held a position during the announcement of President Trump’s large tariffs on U.S. imports. I wondered whether a market-regime filter could have mitigated that drawdown.
To explore this, I added a volatility filter designed to keep the turn of the month strategy out of the market during high-volatility periods. The idea is simple: if the market is already in panic mode, the usual salary-driven buying pressure may not be strong enough to push prices higher.
Volatility Filter Conditions for the Turn of the Month Strategy
- Entry Condition:

- Exit Condition:

Backtest Results: Turn of the Month Strategy With Volatility Filter
Since adding the filter, the overall stability of the turn of the month strategy has improved significantly:

Backtest of the turn of the month strategy with volatility filter

Statistics of the turn of the month strategy with volatility filter
Original Results Without Volatility Filter
For comparison, here are the original results of the turn of the month strategy without any regime filter applied:

Backtest of the original turn of the month strategy without volatility filter

Statistics of the original turn of the month strategy without volatility filter
Final Thoughts on the Turn of the Month Strategy
This study is purely exploratory, and the filter does not guarantee that the turn of the month strategy can’t incur large losses in the future. However, pairing a volatility filter with a known edge feels intuitively sound, and I plan to continue refining and testing this approach.
Market regime awareness is becoming an essential part of algorithmic trading strategy development. If you’re building strategies in AlgoCloud, consider testing how your entries perform across different volatility conditions — the results might surprise you.