Capitulation Stretch Reversion [Jayadev Rana] — Strategy by bluealgocapital
By bluealgocapital
Performance Metrics
- Author: bluealgocapital
- Symbol: AMEX:SPY
- Timeframe: 1 day
- Win Rate: 67.7%
- Profit Factor: 1.668
Description
OVERVIEWCapitulation Stretch Reversion is a long-biased, price-action mean-reversion strategy. Its thesis is simple: in an established uptrend, sharp multi-bar pullbacks that stretch price well below its short-term mean tend to snap back. The strategy waits for that stretched, capitulating condition, enters on the first sign of a turn, and exits when price reverts to the mean.Everything is derived from raw price and range (EMAs of price and Average True Range) - there are no oscillators or external data.HOW IT WORKS1. Regime filter. A long EMA (default 200) defines the regime. Long trades are only permitted while price is above it, keeping every entry aligned with the prevailing drift. A symmetric short side exists but is OFF by default (see Direction).2. Stretch + capitulation. A setup can only arm when price has extended at least a set number of ATRs below a short reversion mean (default 0.5 x ATR from a 5-EMA) AND has printed a run of consecutive lower closes (default 2). This is the "capitulation" filter - it avoids buying shallow noise and waits for a genuine flush.3. Entry. When the stretched, capitulating condition is met and the current bar closes back up (a reversal bar), a long is taken on the confirmed bar.4. Exit - three ways. The target is a reversion to the mean: the position is closed once price closes back at or above the reversion EMA. A protective stop sits a wide, volatility-based distance below entry (default 3 x ATR). A time stop closes any trade that has neither hit target nor stop within N bars (default 10).WHY THE STOP IS WIDEMean reversion trades a high hit-rate against an unfavourable reward-to-risk: the target (a snap back to the mean) is near, while the protective stop is deliberately wide so normal wobble does not knock you out. This produces frequent winners but occasional losers that are larger than a typical win. That trade-off is intentional and is shown honestly in the results below - read the LIMITATIONS section carefully.BACKTEST (defaults, on the loaded history)Tested on SPY daily with the default inputs and the properties set in the script (10,000 initial capital, 100% of equity per trade, 0.03% commission, 2 ticks slippage). On the sample available in the Strategy Tester this produced roughly a 67% win rate with a profit factor near 1.67, a max drawdown around 10%, and no margin calls, modestly ahead of buy-and-hold over the same window. This is a limited in-sample backtest, not a forward result - your own data window, symbol, fees and fills will differ.SETTINGSRegime EMA Length - trend filter that gates entries.Reversion Mean Length - the EMA used as the snap-back target.Stretch (ATR from mean) - how far price must extend before a setup arms.Capitulation Bars - consecutive closes required to confirm exhaustion.Protective Stop (ATR) and Time Stop (bars) - the exit envelope.Direction - Trade Longs (on) and Trade Shorts (off by default; counter-trend shorts on up-drifting index ETFs have a much lower hit-rate).Dashboard - live regime, position, win rate, profit factor and net profit.LIMITATIONSSignals are evaluated on bar close, not intraday. The reported win rate is in-sample on a finite history and will not persist unchanged out of sample. Because winners are small and losers wide, a cluster of stopped trades can still produce a meaningful drawdown despite a high win rate - position size accordingly. Percent-of-equity sizing at 100% is for demonstration; use realistic risk-based sizing in practice. Mean reversion underperforms in strong, one-directional trends where price never stretches, and can suffer if a pullback turns into a full regime change. This script is a research and educational tool, not financial advice or a guarantee of future performance.ORIGINALITYThe contribution is the specific combination: an ATR-normalised "stretch" distance from a fast mean, gated by a consecutive-lower-close capitulation count and a regime filter, with a mean-touch target against a wide ATR stop and a time stop. It is built from first principles on price and range, not a wrapper around a built-in indicator.