Factors Directory

Quantitative Trading Factors

Relative Strength Index (RSI)

Technical Factors

factor.formula

Calculate Relative Strength (RS):

Relative Strength (RS) is the ratio of the average of all price increases to the average of all price decreases over a specified period. The Average Gain and Average Loss are usually calculated using an Exponential Moving Average (EMA) or a Simple Moving Average (SMA). The initial average can be calculated using a simple average, and subsequent averages are updated using a moving average to reflect the impact of recent price changes.

Calculate the Relative Strength Index (RSI):

The Relative Strength Index (RSI) is obtained by converting the Relative Strength (RS) to a normalized value between 0 and 100. This conversion makes the indicator easier to understand and apply. The formula maps the RS value to a range of 0 to 100, making the fluctuation range of the RSI indicator more clear.

Key parameters in the formula and their explanations:

  • :

    The average value of the price increase within a specified period. Usually calculated using the exponential moving average (EMA) or simple moving average (SMA). When calculating, only the price increase is considered, and the price decrease is treated as 0.

  • :

    The average of the price declines within a specified period. Usually calculated using the exponential moving average (EMA) or simple moving average (SMA). When calculating, only the price declines are considered, and the rises are treated as 0. Note that this value is usually a positive number, even though it represents the price decline.

  • :

    Relative strength is the ratio of the average increase to the average decrease, which reflects the relative strength of the force of price increases and decreases.

  • :

    The relative strength index is a normalized momentum indicator with a value between 0 and 100 that is used to assess the strength and speed of price changes.

factor.explanation

The RSI ranges from 0 to 100. Generally, when the RSI value is close to 70 or higher, it means that the asset may be overbought, that is, the price may be overvalued and there is a risk of a pullback; when the RSI value is close to 30 or lower, it means that the asset may be oversold, that is, the price may be undervalued and there is a chance of a rebound. However, it should be noted that the threshold of RSI is not absolute, and different assets or markets may have different applicable ranges. At the same time, RSI should be used in conjunction with other technical indicators and fundamental analysis to more accurately determine market trends and trading opportunities. Multiple samples (multiple stocks) and backtesting are needed to verify the effectiveness of the indicator under different parameter and threshold settings. In addition, the divergence phenomenon of RSI (the price reaches a new high/low, but the RSI indicator does not reach a new high/low at the same time) is also an important signal, which may indicate a reversal of the trend.

Related Factors