mean-reversion
Skill17 starsChanged 4 months agoApache-2.0View on GitHub
Test whether a price or spread reverts toward a modeled center. Use when evaluating stationarity, half-life, z-score bands, regime breaks, time stops, and net execution costs.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- IngAs8/ClaudeSkilltheir own version, first seen Sep 28, 2026
- Serennity007/claude-trading-skills-67their own version, first seen Aug 25, 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★ 366same name
- brainbytes-dev/everything-claude-trading★ 16same name
- IngAs8/ClaudeSkill★ 0same name
- Serennity007/claude-trading-skills-67★ 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 repository56 other files it gives its agents.
- candlestick-patternsSkill
- channel-tradingSkill
- cup-and-handleSkill
- double-top-bottomSkill
- flag-pennantSkill
- head-and-shouldersSkill
- triangle-patternsSkill
- wedge-patternsSkill
- altcoin-rotationSkill
- arbitrage-tradingSkill
- dca-strategySkill
- funding-rate-tradingSkill
- on-chain-analysisSkill
- breakout-tradingSkill
- gap-tradingSkill
- momentum-tradingSkill
- news-tradingSkill
- pullback-tradingSkill
- range-tradingSkill
- scalping-strategySkill
- earnings-tradingSkill
- economic-calendar-tradingSkill
- insider-activity-tradingSkill
- market-correlation-tradingSkill
- sector-rotationSkill
- sentiment-analysisSkill
- breaker-blocksSkill
- fair-value-gapsSkill
- kill-zonesSkill
- liquidity-zonesSkill
- market-structure-shiftSkill
- optimal-trade-entrySkill
- order-blocksSkill
- premium-discountSkill
- correlation-riskSkill
- drawdown-managementSkill
- leverage-managementSkill
- partial-profit-takingSkill
- position-sizingSkill
- risk-reward-ratioSkill
- stop-loss-strategiesSkill
- trailing-stopSkill
- bollinger-bandsSkill
- divergence-tradingSkill
- fibonacci-tradingSkill
- ichimoku-cloudSkill
- macd-tradingSkill
- market-regime-detectionSkill
- moving-average-crossoverSkill
- multi-timeframe-analysisSkill
- rsi-divergenceSkill
- stochastic-tradingSkill
- supply-demand-zonesSkill
- volume-profile-tradingSkill
- vwap-tradingSkill
- skill-nameSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 8 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
8
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 29
Test band, RSI, and reversal features for incremental value.
- Distinctive: line 37
Use an objective, calibrated regime/stationarity gate.
- Distinctive: line 75
Treat the setup as a testable hypothesis, not a prediction.
- Distinctive: line 83
Never assume a series mean reverts.
- Distinctive: line 84
NEVER enter on BB touch alone.
- Distinctive: line 87
Do not count BB, RSI, and z-score as independent confirmation.
- Distinctive: line 88
Use a time stop tied to estimated half-life and exit on a stationarity/regime break.
- Distinctive: line 89
If price is at lower BB due to fundamental repricing (earnings, news), it is not "oversold"
“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
Mean reversion is a hypothesis that a specified price/spread process returns toward a modeled center fast enough to overcome costs. Verify stationarity or stable conditional behavior before trading; an individual price level may trend indefinitely.
Detection Methods
Z-Score
Z-Score = (Series - rolling mean) / rolling standard deviation. Select the series, lookback, entry/exit bands, and time stop in training data. A z-score is descriptive and is not normally distributed by assumption.
| Z-Score | Signal |
| Positive extreme | Candidate short only if reversion model passes |
| Near center | No new extreme under the chosen rule |
| Negative extreme | Candidate long only if reversion model passes |
Bollinger Band Method
- Band touch/pierce + reversal candle → trade toward middle band
- Test band, RSI, and reversal features for incremental value; they are correlated price transforms
RSI Extreme Method
Calibrate RSI percentiles/bands to the instrument and regime; no fixed threshold creates a buy or sell.
Regime and Stationarity Gate
Use an objective, calibrated regime/stationarity gate. ADX can be one feature but does not establish mean reversion or set size.
Workflow
- Check regime (must pass first):
Apply the frozen regime and stationarity gates; returnget_indicators(indicator_code="dmi", symbol=<symbol>, exchange=<exchange>, interval=<interval>)no tradewhen either fails. - Get BB and RSI:
get_indicators(indicator_code="bbands", symbol=<symbol>, exchange=<exchange>, interval=<interval>) get_indicators(indicator_code="rsi", symbol=<symbol>, exchange=<exchange>, interval=<interval>) get_indicators(indicator_code="ema", symbol=<symbol>, exchange=<exchange>, interval=<interval>) - Get candles for confirmation:
get_candles_around_date(symbol=<symbol>, exchange=<exchange>, interval=<interval>, date=<date>) - Mark setup:
draw_chart_analysis(action="create", drawing={ "type": "demand", "points": [ {"time": <extreme_time>, "price": <lower_bb>}, {"time": <current_time>, "price": <entry_zone>} ], "options": {"text": "Mean Reversion Buy (RSI: 22, Z: -2.3)"} }) - Exits: predeclare center, partial-center, opposite-band, stop, and maximum-holding-time variants; retain only net-positive held-out logic without universal win rates.
Evidence and Validation
- Treat the setup as a testable hypothesis, not a prediction. Define thresholds, entry, invalidation, and exit before evaluating outcomes.
- Calibrate on the same instrument, venue, session, and timeframe. Use closed candles and a held-out or walk-forward sample; record every variant tried.
- Include spread, fees, slippage, borrow or funding, partial fills, and latency. Reject the setup when net expectancy is not positive or depends on one narrow parameter.
- Return observed inputs, missing data, cost assumptions, entry, invalidation, exit, and a valid, watch, or no-trade status.
- Research basis: Mean reversion is a model assumption, not a universal property. Optimal mean-reversion research derives thresholds under an Ornstein–Uhlenbeck process; verify that the spread is stationary before applying them.
Key Rules
- Never assume a series mean reverts; verify the process and monitor parameter/stationarity breaks.
- NEVER enter on BB touch alone; require confirmation candle (engulfing, hammer, doji)
- Compare center and opposite-band exits rather than assigning realism beforehand.
- A squeeze is compression, not proof that a breakout is coming.
- Do not count BB, RSI, and z-score as independent confirmation.
- Use a time stop tied to estimated half-life and exit on a stationarity/regime break.
- If price is at lower BB due to fundamental repricing (earnings, news), it is not "oversold"
Related Skills
- bollinger-bands — BB touches are the primary visual mean reversion signal
- market-regime-detection — supply a calibrated regime feature and uncertainty state
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.

