Skip to content
All library documents

Stochastic Z-Score Mean-Reversion Strategy with Zero-Cross Exits

Article TradingView scripts

Summary

This strategy combines a rolling price z-score with a smoothed stochastic oscillator rescaled to the z-score's range. It averages the two measures and signals short positions when that composite exceeds a positive threshold, or long positions when it falls below a negative threshold. Separate cooldown counters are intended to limit repeated signals. The described exits occur when the z-score crosses back through zero, closing longs above zero and shorts below it.

The accompanying explanation presents the approach as a mean-reversion method suited in theory to stable, sideways markets, and suggests correlated instruments as candidates. It discusses how the rolling window and threshold affect signal frequency and cites normal-distribution interpretations of z-scores. However, it supplies no detailed performance results; its claimed improvements over an earlier version are not substantiated here. The script also combines raw price levels with a stochastic measure, and the author notes that the stochastic contribution may be small, so calibration and out-of-sample validation matter.

Key ideas

  • The strategy combines a rolling z-score of closing prices with a smoothed, rescaled stochastic oscillator.
  • Extreme positive composite readings trigger shorts, while extreme negative readings trigger longs.
  • Positions are closed when the z-score returns across zero, and cooldown counters space signals.
  • The explanation frames the method for sideways conditions and recommends careful instrument and parameter selection.
  • No detailed performance evidence is provided, and the author notes that the stochastic component may have limited influence.

Tags

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