mean-reversion-engine

Identify mean-reversion opportunities in price data using Bollinger, RSI, and Z-score methods.

10|2|Updated Mar 8, 2026
One-click install
npx skills add https://github.com/mahmoud20138/Tradecraft --skill mean-reversion-engine
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mean-reversion-engine
Source: https://github.com/mahmoud20138/Tradecraft/tree/main/plugins/tradecraft/skills/mean-reversion-engine
Command: npx skills add https://github.com/mahmoud20138/Tradecraft --skill mean-reversion-engine

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides ready-to-use mean-reversion templates to identify and act on reversion opportunities in price data, helping traders exploit range-bound moves with structured signals.

Core Features & Use Cases

  • Bollinger bounce detection for range-bound assets.
  • RSI extreme fade with divergence checks to confirm reversals.
  • Z-score reversion signals with mean and distance-to-mean metrics.
  • Batch analysis via scan_all to generate a consolidated signal map for a given symbol.

Quick Start

Call MeanReversionEngine.scan_all on a price DataFrame named df to obtain signals.

Frequently Asked Questions about mean-reversion-engine

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I identify mean-reversion opportunities in ranging markets using Python?

To identify mean-reversion opportunities in ranging markets, you can apply Bollinger, RSI, and Z-score methods to price history DataFrames using pandas and numpy to generate structured trading signals.

What is the best way to detect Bollinger bounce signals for range-bound assets?

The best way to detect Bollinger bounce signals for range-bound assets is to run batch analysis on price data, which returns a consolidated signal map with target and risk metrics for the given symbol.

Can I use RSI extreme fade with divergence checks to confirm price reversals?

Yes, you can use RSI extreme fade with divergence checks to confirm price reversals, generating structured signal dictionaries that indicate when a ranging market asset is likely to revert to its mean.

How do I calculate Z-score reversion signals with distance-to-mean metrics?

You calculate Z-score reversion signals by analyzing price histories with numpy and pandas, which outputs structured dictionaries containing the signal, mean, and distance-to-mean metrics for the asset.

Does mean-reversion trading work with trending markets or only ranging regimes?

Mean-reversion trading is designed for ranging regimes and may underperform in trending markets. These templates exploit range-bound moves, so you should avoid applying them when price data shows a clear directional trend.

Do I need pandas and numpy to generate mean-reversion signals from price data?

Yes, you need pandas and numpy to generate mean-reversion signals, as the static methods processing price histories depend on these libraries to return structured dictionaries with signal and risk metrics.