Z-Score Mean Reversion with RSI, Volatility, and Trend Filters
Summary
The strategy measures how far the closing price is from its rolling mean in standard deviation units. It seeks longs when the z-score is sufficiently negative and shorts when it is sufficiently positive, with optional RSI confirmation, a minimum Bollinger Band width filter, and an EMA trend filter. A cooldown counter is intended to space out repeated signals, and entries can reverse an existing position.
Exits can use ATR-based stop and target levels or z-score reversion thresholds, depending on the exit setting. The code also plots the score and filters in a panel and includes a backtest enable switch. The supplied material describes implementation rules and adjustable parameters but gives no backtest results, asset specification, or evidence that mean reversion persists in any market. The exits and filters should be checked carefully in simulation: the documented logic makes z-score exits conditional on ATR exits being disabled, despite comments describing additional mean-reversion exits alongside ATR protection.
Key ideas
- The z-score expresses the close’s deviation from its rolling average in standard deviation units.
- Extreme negative and positive readings form candidate long and short signals.
- Optional RSI, Bollinger Band width, and EMA filters constrain entries by momentum, volatility, and trend context.
- A cooldown counter is used to separate signals, and an opposite signal can close an existing position.
- ATR stops and targets or z-score-based exits are available, but no performance evidence is supplied.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.