Agent skill

Mean Reversion

by Superior-Trade in Superior-Trade/superior-skills

A skill your agent uses 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…

MITAuto-check passedBusiness, Finance & HR

Install Mean Reversion

skills CLI
$ npx skills add Superior-Trade/superior-skills --skill mean-reversion -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Superior-Trade/superior-skills mean-reversion --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Superior-Trade/superior-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/mean-reversion .claude/skills/mean-reversion && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mean-reversion
GitHub stars
215
Token cost
~1.4k tokens
SKILL.md length
350 words
Files
1
Skills in repo
31
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses 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…

  • Writing a Bollinger-band mean-reversion strategy on Superior Trade — anything described as mean reversion
  • SKILL.md covers Backtest evidence, Thesis, Mechanics and Strategy code, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Oversold bounce

What it does

Mean Reversion is an agent skill from Superior-Trade/superior-skills. 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.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Business, Finance & HR, covering Trading and backtesting. It works with Circle USDC. The repository describes itself as: Open agent skills and tool schemas for Superior Trade — build, backtest, and deploy trading strategies on Hyperliquid. The licence is MIT.

When your agent uses it

  • Writing a Bollinger-band mean-reversion strategy on Superior Trade — anything described as mean reversion
  • Oversold bounce
  • Sigma extension

Example prompts

  • “/mean-reversion”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 9d41db5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python and json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Mean Reversion loads about 1.4k tokens when it runs. Until then it costs about 103 tokens; SKILL.md has 350 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~103
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Superior-Trade/superior-skills at commit 9d41db5, republished under its MIT licence (© Superior-Trade). 350 words, ~1,402 tokens.

Download SKILL.mdSave it as .claude/skills/mean-reversion/SKILL.md (or your agent's skills folder).
name
mean-reversion
description
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.
metadata.version
0.2.0
metadata.updated
2026-05-18

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

ConfigTradesWinProfitMax DD
BTC/USDC:USDC, 162d1872%+8.14%10%
BTC/USDC:USDC, range-regime sub-window (80d)8100%+9.88%0%
BTC/ETH/SOL/DOGE multi-pair, 162d8465.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

python
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 dataframe

Reference config (multi-pair)

json
{
  "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"}]
}
Show full SKILL.md (142 more words)Show less

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:

python
# 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.

© Superior-Trade, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/mean-reversion of Superior-Trade/superior-skills.

Open the folder on GitHubat commit 9d41db5

Compare with similar skills

Mean Reversion next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Mean Reversion compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mean Reversion this skillSuperior-Trade/superior-skills215—~1.4kAutomated safety check: PassMIT
Polymarket TradingBlockRunAI/ClawRouter6.6k—~1.4kAutomated safety check: PassMIT
Solana Payments Wallets Tradingnpc-live/clawfirm1561 repos~4.7kAutomated safety check: PassMIT
Nansen Tradingnansen-ai/nansen-cli139—~3.3kAutomated safety check: NotesMIT
Shipp Sports Datamoonpay/skills113—~1.4kAutomated safety check: PassMIT
Aomi Transactjeremylongshore/tons-of-skills-marketplace2.8k—~2.3kAutomated safety check: PassMIT

Similar skills

  • Polymarket Trading

    BlockRunAI/ClawRouter

    A skill your agent uses when the user wants to actually PLACE, manage, or redeem bets on Polymarket (not just read odds — that's the blockrunpredexon data tools).

    6.6k GitHub stars~1.4k tokensUpdated 5 days ago
    Business, Finance & HRAuto-check passed
  • Pay people in SOL or USDC, buy and sell tokens, check prices, discover trending and new tokens, create and manage Solana wallets, stake SOL, earn yield through lending and managed vaults, borrow…

    156 GitHub starsUsed in 1 repo~4.7k tokens
    Business, Finance & HRAuto-check passed
  • Nansen Trading

    nansen-ai/nansen-cli

    Execute DEX swaps on Solana or Base (including cross-chain bridges) and Hyperliquid perpetual trades.

    139 GitHub stars~3.3k tokensUpdated yesterday
    Business, Finance & HRAuto-check: notes
  • Shipp Sports Data

    moonpay/skills

    Real-time sports & events data for AI agents via Shipp. An agent skill from moonpay/skills.

    113 GitHub stars~1.4k tokensUpdated 1 mo ago
    Business, Finance & HRAuto-check passed
  • Aomi Transact

    jeremylongshore/tons-of-skills-marketplace

    Build natural-language crypto agents, web3 assistants, and trading bots that read and write EVM chain state.

    2.8k GitHub stars~2.3k tokensUpdated yesterday
    Business, Finance & HRAuto-check passed
  • Aero Stock Lp

    BankrBot/skills

    LP tokenized stocks onchain — range-LP Coinbase tokenized equities (NVDA, AAPL, GOOGL, META) and AERO/USDC on Aerodrome Slipstream (Base) for trading-fee + AERO emission yield.

    1.2k GitHub stars~5.8k tokensUpdated yesterday
    Business, Finance & HRAuto-check passed

More from Superior-Trade/superior-skills

All 31 skills in this repo
  • Superior Trade Auth

    Superior-Trade/superior-skills

    A skill your agent uses when an agent needs to register a Superior Trade account, verify an email OTP, configure x-api-key authentication, or recover from missing or invalid credentials before using…

    215 GitHub stars~950 tokensUpdated 1 mo ago
    Auto-check passed
  • Deposit Qr

    Superior-Trade/superior-skills

    A skill your agent uses when a user needs a QR code or wallet payment URI to fund a Superior-managed EVM wallet on a specific chain before using Lighter, Polymarket, Hyperliquid, or other Superior…

    215 GitHub stars~1.1k tokensUpdated 1 mo ago
    Auto-check passed
  • External Deposit

    Superior-Trade/superior-skills

    A skill your agent uses when a user wants to fund or bridge from an external wallet through a third-party UI such as Relay, especially when asking for MetaMask Mobile QR codes, bridge links…

    215 GitHub stars~1.7k tokensUpdated 1 mo ago
    Auto-check passed
  • Aerodrome

    Superior-Trade/superior-skills

    A skill your agent uses when creating, validating, backtesting, deploying, sizing, or troubleshooting Aerodrome/Base spot trading strategies through the Superior Trade API, especially Freqtrade…

    215 GitHub stars~2.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Polymarket

    Superior-Trade/superior-skills

    A skill your agent uses when the user wants to trade, research, or backtest Polymarket prediction markets through Superior Trade — finding markets by slug or event URL, placing a single immediate…

    215 GitHub stars~4.2k tokensUpdated 1 mo ago
    Auto-check passed
  • Backtesting

    Superior-Trade/superior-skills

    A skill your agent uses when running, interpreting, or designing backtests on Superior Trade — anything about backtest windows, trade-count thresholds, exit-reason mix, parameter sweeps…

    215 GitHub stars~2.9k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Mean Reversion

What does Mean Reversion do?

A skill your agent uses 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…. Mean Reversion is an agent skill from Superior-Trade/superior-skills. 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.

When should I use Mean Reversion?

Mean Reversion fits situations like: writing a Bollinger-band mean-reversion strategy on Superior Trade — anything described as mean reversion; oversold bounce; sigma extension.

How do I install Mean Reversion in Claude Code?

Run `npx skills add Superior-Trade/superior-skills --skill mean-reversion -a claude-code`. Or copy the skill folder (skills/mean-reversion in Superior-Trade/superior-skills) into .claude/skills/mean-reversion in your project. Claude Code loads it when a task matches its description.

How do I install Mean Reversion in Codex?

Run `npx skills add Superior-Trade/superior-skills --skill mean-reversion -a codex`. Or copy the skill folder (skills/mean-reversion in Superior-Trade/superior-skills) into .agents/skills/mean-reversion in your project. Codex loads it when a task matches its description.

Can I use Mean Reversion in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Superior-Trade/superior-skills --skill mean-reversion -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mean-reversion, .gemini/skills/mean-reversion, .github/skills/mean-reversion and .opencode/skills/mean-reversion in your project.

What does Mean Reversion need to run?

SKILL.md names no scripts, command-line tools or credentials: Mean Reversion is instructions for the agent only. Our summary lists: Python 3.

Does Mean Reversion access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Mean Reversion safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Mean Reversion use?

Mean Reversion is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Mean Reversion use?

About 1.4k tokens (SKILL.md is roughly 5.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Mean Reversion?

Skills that share tags, products or a category with Mean Reversion: Polymarket Trading (BlockRunAI/ClawRouter, 6.6k stars), Solana Payments Wallets Trading (npc-live/clawfirm, 156 stars), Nansen Trading (nansen-ai/nansen-cli, 139 stars) and Shipp Sports Data (moonpay/skills, 113 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mean Reversion?

Superior-Trade (a GitHub organization) maintains it in Superior-Trade/superior-skills, which has 215 GitHub stars. The repository holds 31 skills in this directory. The repository was last updated on September 10, 2026.

Source: Superior-Trade/superior-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.