mean-reversion
Skill214 starsChanged 3 months agoMITView on GitHub
Use when writing a Bollinger-band mean-reversion strategy on Superior Trade — anything described as mean reversion, BB bands, oversold bounce, fade, range trade, ADX low, sigma extension. Upgraded 2026-05-18 from the prior 1h/2.5σ variant to the validated 4h/2σ/ADX<25 version (+8.77% multi-pair, 65.5% win over 162d). Prior 1h variant is preserved at the end of the file as an archived reference.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- IngAs8/ClaudeSkilltheir own version, first seen Sep 28, 2026
- SKE-Labs/agent-trading-skillstheir own version, first seen Jul 18, 2026
- brainbytes-dev/everything-claude-tradingtheir own version, first seen Mar 14, 2026
- agiprolabs/claude-trading-skillstheir own version, first seen Mar 11, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- agiprolabs/claude-trading-skills★ 408same name
- brainbytes-dev/everything-claude-trading★ 19same name
- SKE-Labs/agent-trading-skills★ 17same name
- IngAs8/ClaudeSkill★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository30 other files it gives its agents.
- superior-trade-authSkill
- aerodromeSkill
- backtestingSkill
- basis-arbSkill
- bollinger-reverter-4hSkill
- breakoutSkill
- catalyst-confirmationSkill
- dca-weeklySkill
- deadline-driftSkill
- deposit-qrSkill
- donchian-strong-regimeSkill
- dsl-exit-engineSkill
- external-depositSkill
- fees-optimizationsSkill
- funding-rate-arbitrageSkill
- funding-squeezeSkill
- grid-tradingSkill
- hyperliquidSkill
- intelligenceSkill
- large-fill-pressureSkill
- lighter-robinhoodSkill
- lighterSkill
- polymarketSkill
- probability-mean-reversionSkill
- probability-momentumSkill
- regime-overlaySkill
- related-market-spreadSkill
- scalpingSkill
- superior-tradeSkill
- trade-thesisSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
When the market is range-bound (ADX < 25), price touching the upper or lower Bollinger Band reliably reverts to the midline.
- Distinctive: line 38
No trailing stop (band reversion targets are small.
- Distinctive: line 144
If you prefer the rarer-but-deeper setup, restore the 1h timeframe and 2.5σ.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Mean Reversion — Bollinger Reverter 4h
Note: This template was upgraded from the prior 1h / 2.5σ / ADX<30 version to the 4h / 2σ / ADX<25 version after backtesting showed the 4h variant produces meaningfully more trades with comparable risk and validated multi-pair edge. The prior 1h version is preserved at the end for reference.
Symmetric mean-reversion strategy on the 4h timeframe. Long-or-short on Bollinger band touches, gated to range regimes via ADX. Validated across BTC/ETH/SOL/DOGE over 162 days.
Backtest evidence
| Config | Trades | Win | Profit | Max DD |
| BTC/USDC:USDC, 162d | 18 | 72% | +8.14% | 10% |
| BTC/USDC:USDC, range-regime sub-window (80d) | 8 | 100% | +9.88% | 0% |
| BTC/ETH/SOL/DOGE multi-pair, 162d | 84 | 65.5% | +8.77% | 18.5% |
Thesis
When the market is range-bound (ADX < 25), price touching the upper or lower Bollinger Band reliably reverts to the midline. Tight ROI takes profit fast since mean-reversion targets are small; tight stop closes positions that turn into trend breaks rather than reversions.
Mechanics
- Timeframe: 4h
- 20-bar Bollinger Bands at 2σ
- Entry short:
close > bb_upper AND rsi > 65 AND adx < 25 - Entry long:
close < bb_lower AND rsi < 35 AND adx < 25 - Exit: close crosses the band midline
- Stop: -2%
- ROI ladder: 2.5% → 1.5% → 0.5% → breakeven over 24h
- No trailing stop (band reversion targets are small; ROI ladder handles take-profit)
Strategy code
from freqtrade.strategy import IStrategy
import pandas as pd
import talib.abstract as ta
class MeanReversionStrategy(IStrategy):
INTERFACE_VERSION = 3
timeframe = "4h"
can_short = True
stoploss = -0.02
trailing_stop = False
minimal_roi = {
"0": 0.025,
"240": 0.015,
"720": 0.005,
"1440": 0,
}
process_only_new_candles = True
startup_candle_count = 60
use_exit_signal = True
def populate_indicators(self, dataframe: pd.DataFrame, metadata: dict) -> pd.DataFrame:
bb = ta.BBANDS(dataframe, timeperiod=20, nbdevup=2.0, nbdevdn=2.0)
dataframe["bb_upper"] = bb["upperband"]
dataframe["bb_mid"] = bb["middleband"]
dataframe["bb_lower"] = bb["lowerband"]
dataframe["rsi"] = ta.RSI(dataframe, timeperiod=14)
dataframe["adx"] = ta.ADX(dataframe, timeperiod=14)
return dataframe
def populate_entry_trend(self, dataframe: pd.DataFrame, metadata: dict) -> pd.DataFrame:
cond_short = (
(dataframe["close"] > dataframe["bb_upper"])
& (dataframe["rsi"] > 65)
& (dataframe["adx"] < 25)
)
dataframe.loc[cond_short, "enter_short"] = 1
dataframe.loc[cond_short, "enter_tag"] = "bb_upper_revert"
cond_long = (
(dataframe["close"] < dataframe["bb_lower"])
& (dataframe["rsi"] < 35)
& (dataframe["adx"] < 25)
)
dataframe.loc[cond_long, "enter_long"] = 1
dataframe.loc[cond_long, "enter_tag"] = "bb_lower_revert"
return dataframe
def populate_exit_trend(self, dataframe: pd.DataFrame, metadata: dict) -> pd.DataFrame:
dataframe.loc[dataframe["close"] < dataframe["bb_mid"], "exit_short"] = 1
dataframe.loc[dataframe["close"] > dataframe["bb_mid"], "exit_long"] = 1
return dataframeReference config (multi-pair)
{
"exchange": {
"name": "hyperliquid",
"pair_whitelist": ["BTC/USDC:USDC", "ETH/USDC:USDC", "SOL/USDC:USDC", "DOGE/USDC:USDC"]
},
"stake_currency": "USDC",
"stake_amount": 75,
"dry_run_wallet": {"USDC": 350},
"timeframe": "4h",
"max_open_trades": 4,
"minimal_roi": {"0": 100.0},
"stoploss": -0.02,
"trading_mode": "futures",
"margin_mode": "isolated",
"entry_pricing": {"price_side": "same", "price_last_balance": 0.0},
"exit_pricing": {"price_side": "same", "price_last_balance": 0.0},
"pairlists": [{"method": "StaticPairList"}]
}Honest framing
In strong-trend windows the strategy loses small (-1.75% on BTC during the first-half strong bear). In rangy windows it shines (+9.88% on BTC second-half). The mixed-regime full-period multi-pair number (+8.77% in 162d on $350 wallet) is the credible expectation.
DOGE was the negative pair (-0.65%) — meme volatility breaks more bands than reverts to them. Use this strategy on majors.
Pair with donchian-strong-regime for full-regime coverage.
Prior version (1h, 2.5σ, archived)
The previous version was tighter (2.5σ bands, ADX<30) on a 1h timeframe. Its own honest framing noted "5 trades in 4 months" — too rare to be useful. The 4h version produces ~3× the signal density with the same risk profile. The 1h version is preserved here for users who want a deeper-fade variant:
# Archived 1h variant — fewer, deeper signals
timeframe = "1h"
# bb = ta.BBANDS(dataframe, timeperiod=100, nbdevup=2.5, nbdevdn=2.5)
# rsi gates same; adx < 30 (looser)If you prefer the rarer-but-deeper setup, restore the 1h timeframe and 2.5σ. The exit logic is unchanged.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

