Skip to content
All library documents

RSI Threshold Strategy with Trend Filters and a Basic Backtest

Article BigQuant

Summary

This guide presents a relative strength index strategy using overbought and oversold thresholds. It describes calculating RSI from rolling average gains and losses, generating short signals above 70 and long signals below 30, and optionally filtering trades based on the direction of a 50-period moving average. A basic backtest framework calculates log returns, cumulative strategy returns, and a Sharpe ratio. The example uses intraday futures data, while the article describes a broader set of potential markets.

The guide proposes parameter searches, combining signals across timeframes, ATR-based stops, and volatility-based position sizing as possible extensions. It reports no actual test results, despite including code to calculate performance metrics. It also notes that RSI can remain overbought or oversold during strong trends and that live trading must account for slippage and liquidity. The sample signal labels and trend filter logic appear inconsistent with the stated long and short rules, and the backtest’s position calculation warrants careful review before use.

Key ideas

  • The strategy uses RSI above 70 for short signals and below 30 for long signals.
  • A moving-average direction filter is proposed to screen trades against the prevailing trend.
  • The sample backtest calculates log returns, cumulative returns, and a Sharpe ratio but reports no results.
  • Suggested extensions include parameter searches, multiple timeframes, ATR stops, and volatility-based sizing.
  • The author warns that RSI may remain extreme in trending markets and that execution costs matter.
  • The sample signal and position logic contains inconsistencies that should be corrected before evaluation.

Tags

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