Relative Strength Index (RSI)

Returns the Relative Strength Index, a momentum oscillator that measures the speed and magnitude of recent price changes to evaluate overbought or oversold conditions.

How RSI Works

RSI oscillates between 0 and 100:

  • RSI > 70: Generally considered overbought (potential sell signal)
  • RSI < 30: Generally considered oversold (potential buy signal)
  • RSI = 50: Neutral momentum

Parameters

Parameter Description Default
Symbol Stock ticker symbol Required
Days Number of periods for calculation 14
StartDate Calculate RSI as of this date Today

Calculation

RSI = 100 - (100 / (1 + RS))

Where RS = Average Gain / Average Loss over the period.

Examples

14-day RSI for Apple
=RelativeStrengthIndex("AAPL", "14")
Explicitly 14-day RSI
=RelativeStrengthIndex("MSFT", "21")
21-day RSI for Microsoft
=RelativeStrengthIndex("SPY", "9")
9-day RSI for SPY
=RelativeStrengthIndex("AAPL", "14", DATE(2024,1,15))
Historical RSI
Symbol from cell reference

When to Use

  • Identify overbought and oversold conditions
  • Confirm trend strength and potential reversals
  • Generate buy/sell signals based on RSI thresholds
  • Compare momentum across multiple stocks
  • Technical analysis and trading strategies

When NOT to Use

Scenario Use Instead
Need moving averages SimpleMovingAverage() or ExponentialMovingAverage()
Need volume-weighted indicator MoneyFlowIndex()
Need trend direction PlusDirectionalIndicator() or MinusDirectionalIndicator()
Need volatility measure AverageTrueRange() or StandardDeviationOnClosePrice()

Common Issues & FAQ

Q: Why is RSI returning "NA"? A: Check that:

  • The symbol is valid and actively traded
  • There is sufficient historical data for the period
  • The date format is correct (YYYY-MM-DD)

Q: What period should I use? A: The default 14-day period is most common. Shorter periods (7-9) are more sensitive, longer periods (21-25) are smoother.

Q: How do I interpret RSI divergence? A: When price makes new highs but RSI doesn't (bearish divergence) or price makes new lows but RSI doesn't (bullish divergence), it may signal a reversal.

Get Access to 1 Billion Usable Market data points IN YOUR EXCEL SHEETS WITH EASY TO USE EXCEL FUNCTIONS

Get started today
MarketXLS Excel Add-in Tutorial - How to Use Relative Strength Index (RSI) and Other Financial Formulas
How does MarketXLS work?