Skip to content
All library documents

Z-Score Mean Reversion with Threshold Exits and Fixed Stops

Article Strategy library · Author: XiaoboFu

Summary

This mean-reversion strategy measures how far the closing price deviates from a rolling simple moving average, dividing that difference by the rolling standard deviation. It enters long when the z-score falls below a negative threshold and short when it rises above a positive threshold. Positions close after the score moves back toward zero, with a fixed point-based stop loss as protection. The script provides a 14-period window and example thresholds of 2 for entry and 0.2 for exit, alongside a 50-point stop setting.

The accompanying discussion frames the approach as better suited to range-bound, stationary assets and cautions that many assets behave more like random walks than mean-reverting series; it names VIX as an exception. It mentions an assumed trading cost of 0.1%, but reports no backtest results. Some prose claims position scaling by deviation magnitude, while the code defines a scaling input without using it, and the introduction’s stop-loss figures differ from the script settings. These inconsistencies limit what can be inferred about actual behavior.

Key ideas

  • The strategy standardizes price distance from a rolling average using the rolling standard deviation.
  • Extreme negative and positive z-scores trigger long and short entries, respectively.
  • Positions exit as the z-score returns toward its central level or a fixed point stop is reached.
  • The author cautions that mean reversion is asset dependent and identifies random-walk behavior as a limitation.
  • The narrative and source disagree on some stop values and on whether position scaling is implemented.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.