Skip to main content
Any Framework

RSI Mean Reversion Strategy (Python)

Published
Aug 7, 2025
1y ago
Total Downloads
1.5K
1,495

Install

dotnet add package StockSharp.Strategies.0236_RSI_Mean_Reversion.py --version 5.0.1

No framework information available.

README

RSI Mean Reversion Strategy (Python Version)

This strategy tracks the relative strength index and measures its distance from an average level. When RSI deviates by more than a multiple of its recent standard deviation, the algorithm expects a snap back toward the mean.

Testing indicates an average annual return of about 61%. It performs best in the crypto market.

A long trade is opened when RSI falls below the lower band defined by the average minus Multiplier times the standard deviation. A short trade is taken when RSI rises above the upper band. Exits occur when RSI returns to its moving average.

The method suits traders looking for objective oversold and overbought signals. Using a volatility-based band adapts the thresholds to current market conditions while a stop-loss keeps losses limited.

Details

  • Entry Criteria:
    • Long: RSI < Avg - Multiplier * StdDev
    • Short: RSI > Avg + Multiplier * StdDev
  • Long/Short: Both sides.
  • Exit Criteria:
    • Long: Exit when RSI > Avg
    • Short: Exit when RSI < Avg
  • Stops: Yes, percent stop-loss.
  • Default Values:
    • RsiPeriod = 14
    • AveragePeriod = 20
    • Multiplier = 2.0m
    • CandleType = TimeSpan.FromMinutes(5)
  • Filters:
    • Category: Mean Reversion
    • Direction: Both
    • Indicators: RSI
    • Stops: Yes
    • Complexity: Intermediate
    • Timeframe: Intraday
    • Seasonality: No
    • Neural networks: No
    • Divergence: No
    • Risk Level: Medium

Changes from Previous Version

No structural changes between v5.0.0 and v5.0.1.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.