Technical analysis

Relative strength index (RSI)

Relative strength index (RSI) is a 0–100 momentum indicator that compares the average size of recent price gains with recent price losses over a chosen number of periods.

What it means

The relative strength index, or RSI, summarizes the balance of a stock’s recent upward and downward price moves. It is a technical analysis indicator, usually calculated from closing prices over 14 periods. A period can be a trading day, an hour or another consistent interval; a 14-day RSI and a 14-hour RSI answer different questions.

RSI ranges from 0 to 100. Readings above 70 are often called “overbought,” and readings below 30 “oversold.” These are conventions, not evidence that a price must reverse. RSI measures the stock’s own recent price changes; it does not compare its return with a market index, despite the word “relative.”

How it is calculated

For each period, find the change from the previous close. Count an upward change as a gain and a downward change as a loss of positive magnitude. An unchanged close contributes zero to both.

RS = average gain / average loss; RSI = 100 − 100 / (1 + RS)

  • RS is relative strength, a unitless ratio.
  • Average gain is the mean of gains over the chosen periods, including zeros when there was no gain, in price units such as US$ per share.
  • Average loss is the mean of loss magnitudes over those same periods, including zeros when there was no loss, in the same price units.
  • RSI is the resulting unitless reading on a 0–100 scale.

A common 14-period method starts with simple averages of gains and losses across the first 14 price changes. Later readings use Wilder’s smoothing: new average gain = (previous average gain × 13 + current gain) / 14, with the equivalent calculation for losses. A 14-period calculation therefore needs 15 closing prices to establish its first reading. If average loss is zero and average gain is positive, RSI is 100; if average gain is zero and average loss is positive, RSI is 0. If both are zero, the formula is undefined, so a display convention is needed.

Worked example

Suppose a hypothetical stock has 14 daily closing-price changes. Seven days rise by US$2 per share each; seven days fall by US$1 per share each. This is an illustration of the initial 14-day calculation, not a real stock or a forecast.

  1. Total gains are 7 × US$2 = US$14; total loss magnitudes are 7 × US$1 = US$7.
  2. Average gain is US$14 / 14 = US$1 per share per day. Average loss is US$7 / 14 = US$0.50 per share per day. Zero gains and losses on the opposite days remain in each average.
  3. RS = US$1 / US$0.50 = 2.
  4. RSI = 100 − 100 / (1 + 2) = 66.67, approximately.

That reading describes the relative size of gains and losses in this sample. It does not give a probability of a future gain.

Why it matters before you trade

RSI can make a recent price pattern easier to inspect, but it cannot establish whether a proposed order is affordable to execute or appropriately sized. A stock can remain above 70 or below 30 while its price continues in the same direction. The reading also depends on the lookback period and the price interval selected.

A pre-trade check addresses separate questions: expected spread, potential market impact, order size relative to trading volume, volatility and concentration in the proposed basket. Those factors can matter regardless of what RSI shows. RSI alone does not measure them or account for news and trading halts.

How PreTrAIde uses it

PreTrAIde’s stated quantitative inputs do not include RSI, so an RSI reading should not be treated as an input to its verdict. Its pre-trade analysis evaluates a user-built stock basket before an order is placed, using measures including estimated bid-ask spread, participation in daily volume, market impact and daily volatility. It returns a GO, NO-GO or MODIFY verdict with reasoning; that verdict is decision support, not a recommendation. PreTrAIde does not place the trade.

Common mistakes

  • Treating 70 or 30 as an automatic trading signal. Neither threshold predicts the timing or direction of the next move.
  • Mixing calculation methods. A simple rolling average and Wilder’s smoothed averages can produce different readings after the initial calculation.
  • Ignoring the chosen interval. A daily RSI and an hourly RSI summarize different sets of price changes.
  • Reading RSI as a measure of execution quality. It says nothing directly about the spread, available liquidity or the likely cost of an order.

Frequently asked questions

What does RSI above 70 mean?

It means recent average gains have been large relative to recent average losses under the chosen RSI calculation. The conventional “overbought” label does not mean a reversal is due.

How many closing prices do you need for a 14-day RSI?

You need 15 daily closing prices to obtain 14 day-to-day changes for the initial reading. Subsequent Wilder-smoothed readings also use the previous average gain and average loss.

Does RSI measure a stock’s strength against the market?

No. RSI compares that stock’s recent price gains and losses, not its performance against a benchmark index.

Related terms

Technical analysis

Moving average MACD Bollinger Bands Support and resistance Trend following Breakout Market sentiment analysis News trading All glossary terms →

Check your next trade before you place it

Build a basket, run a pre-trade analysis, and get a GO, NO-GO or MODIFY verdict with the cost, liquidity and risk behind it.

Start your free trial Try the free tools

Educational content, not investment advice. PreTrAIde is analysis software, not a broker: it never executes orders, and its verdicts are decision support, not recommendations to buy or sell.