Strategy briefing

Understand what this strategy is actually betting on before you touch the parameter panel.

01
Start with the intuition
02
Use category and difficulty as context
03
Compare before optimizing
01
Map the strategy to a regime thesis
02
Read the math as a constraint system
03
Use parameters to test fragility, not creativity
Learning linkup

Read the model brief like a skeptic

Open Learning Hub

The Intuition

The Relative Strength Index, developed by J. Welles Wilder in 1978, measures the velocity and magnitude of recent price changes to evaluate overbought or oversold conditions. Unlike simple price levels, RSI normalises momentum to a 0–100 scale, making it comparable across instruments and time periods.

The economic intuition: markets have a psychological component. When buyers aggressively push a price higher over a short period, RSI rises sharply. At extreme readings — say, above 70 — sentiment is stretched. Late buyers have entered, early buyers are sitting on large gains and may take profit, and there are few new buyers left to sustain the move. Mean reversion is then the expected path.

Wilder designed RSI using exponential moving averages of gains and losses, which gives more weight to recent price action. This makes it reactive to recent volatility without being as noisy as a simple momentum oscillator. The 14-period default was chosen empirically for daily data; shorter periods (7–9) suit faster traders, longer periods (21–28) suit swing traders.

Key assumptions: (1) Price momentum is bounded — extremes are self-correcting. (2) The 70/30 thresholds are meaningful cutoffs for the instrument being traded. (3) The series has no structural break or regime change within the lookback window. In strong trends, RSI can stay "overbought" for extended periods, making naive RSI shorts very painful.

The strategy performs best in range-bound, oscillating markets. In strong momentum regimes, RSI signals are systematically wrong: a stock in a strong uptrend keeps printing RSI > 70. Practitioners often combine RSI with a trend filter (e.g., only take RSI short signals when price is below the 200-day moving average) to mitigate this.

The Math

Read this as a compact model summary: what the signal sees, what it ignores, and where fragility can creep in.

RS(t)    = AvgGain(t, n) / AvgLoss(t, n)
RSI(t)   = 100 - 100 / (1 + RS(t))

Signal(t) = +1  if RSI(t) < oversold threshold
          = -1  if RSI(t) > overbought threshold
          =  0  otherwise

Parameters

ParameterTypeDefaultDescription
rsi_period int 14 RSI lookback period
oversold float 30.0 RSI threshold for long signal
overbought float 70.0 RSI threshold for short signal

Source Code

Live source — fetched from engine/strategies/rsi.py

Loading source…

Further Reading

  • Wilder, J.W. (1978). New Concepts in Technical Trading Systems. Trend Research.
  • Connors, L. & Alvarez, C. (2009). Short Term Trading Strategies That Work. TradingMarkets Publishing.
  • Chan, E. (2013). Algorithmic Trading, Ch. 2. Wiley.
Run This Strategy →

Related Mean Reversion Strategies

Use nearby strategies to compare the same market hypothesis under different signal constructions.