Momentum indicators

Relative Strength Index

Momentum oscillator that compares recent gains and losses.

Engine
TA-Lib
Function
RSI
Input series
close
Outputs
1

How it works

RSI compares the magnitude of recent upward and downward close changes over the configured period and returns an oscillator value. TA-Lib marks RSI as having an unstable period.

Use case

Use RSI as a normalized momentum feature for detecting stretched or weakening price movement in a dataset.

Parameters

ParameterTypeDefaultBounds or optionsDescription
Time Periodinteger142…100000Number of bars used to compare recent gains and losses.

Outputs

OutputTypeDescription
RSInumberRelative Strength Index value for the bar.

Reading the result

RSI summarizes the balance of recent upward and downward closes on a bounded scale. High and low regions describe persistent directional pressure over the configured horizon; they do not prove that price must reverse next.

The same level can mean different things in a range, a strong trend, or a market with frequent gaps. Use changes, persistence, and regime context rather than relying on one universal threshold.

Common mistakes

  1. Treating overbought as an automatic short signal or oversold as an automatic long signal.
  2. Comparing RSI from different source histories before warmup has stabilized.
  3. Ignoring timeframe: the same period count represents different elapsed time on different bars.
  4. Converting warmup or unavailable values to a neutral midpoint without recording that transformation.

DataCat workflow notes

For ML features, the continuous value, distance from a chosen threshold, and recent change can be more informative than a single Boolean flag. Preserve the output quality state alongside any downstream transformation.

Resources

Search documentation

Search across 46 documentation pages.