Learn mean-reversion trading
Why does this work? Markets overshoot due to herd behavior and emotion. A bad earnings report causes panic selling below fair value. A hot product launch causes euphoric buying above fair value. The mean (average price) acts as gravity, pulling price back over time.
What is Mean-Reversion Trading?
Key Components:
- Mean (Average): Typically the moving average (MA) — e.g., 20-day MA, 50-day MA, or Bollinger Band midline.
- Deviation Measurement: How far price is from the mean (standard deviations, RSI, Bollinger Bands).
- Entry Signal: Price crosses below lower threshold → BUY. Price crosses above upper threshold → SELL/SHORT.
- Exit Signal: Price returns to the mean or crosses it.
WHY the mean? Historically, most stocks oscillate around a trend. If a stock normally trades at ₹100 and drops to ₹80 on no fundamental change, probability favors a return toward₹100.
Deriving the Mean-Reversion Logic
Step 1: Define the Mean
The mean is the expected value of price over a lookback period. For simplicity, use the Simple Moving Average (SMA):
where is price at time , and is the lookback period (e.g., 20 days).
Why SMA? It smooths out noise and represents the "fair value" consensus over days.
Step 2: Measure Deviation
How far is current price from the mean?
But absolute deviation depends on asset price (₹10 deviation matters more for₹50 stock than ₹500 stock). So normalize:
where is the standard deviation of price over days:
This is called the -score. It tells us how many standard deviations price is from the mean.
Why z-score?
- : Price at the mean (no trade).
- : Price is 2 std devs BELOW mean → oversold → BUY signal.
- : Price is 2 std devs ABOVE mean → overbought → SELL signal.
Step 3: Entry and Exit Rules
Entry: When (e.g., 2), enter opposite position:
- : BUY (expecting price to rise back to mean).
- : SELL/SHORT (expecting price to fall back to mean).
Exit: When price returns to mean () or crosses it.
Why these thresholds? In a normal distribution, ~95% of data lies within 2 standard deviations. When , price is in the extreme 5%, statistically likely to revert.
Indicators for Mean-Reversion
1. Bollinger Bands
where typically (can adjust to 2.5 or 3 for wider bands).
HOW to use:
- Price touches Lower Band → oversold → BUY.
- Price touches Upper Band → overbought → SELL.
- Price returns to Middle Band → EXIT.
WHY works? Bollinger Bands visualize the z-score concept. Bands expand during volatility (large ) and contract during consolidation.

2. Relative Strength Index (RSI)
Typical days.
Interpretation:
- RSI < 30 → oversold → BUY.
- RSI > 70 → overbought → SELL.
- RSI = 50 → neutral (no mean-reversion signal).
WHY? RSI compares upward vs downward momentum. Extreme RSI means one-sided pressure that exhausts itself, triggering reversal.
3. Z-Score (Direct Calculation)
As derived above. More flexible than RSI/Bollinger Bands because you control lookback period and threshold.
Worked Example 1: Bollinger Band Trade
Setup: Stock ABC trades at ₹100.20-day SMA = ₹100, 20-day = ₹5. Bollinger Bands with :
- Upper Band = 100 + 2(5) = ₹110.
- Lower Band = 100 - 2(5) = ₹90.
Day 1: Price drops to ₹88(below Lower Band).
- Why this step? Price at ₹88 is 2.4 std devs below mean (z = (88-100)/5 = -2.4). This is extreme. Historical data shows price returns to mean 90%+ of the time from here.
- Action: BUY 100 shares at ₹88. Risk: ₹2 per share (stop-loss at ₹86 if breakdown continues).
Day 5: Price rises to ₹98 (near Middle Band).
- Why exit? Mean-reversion assumes return to mean, not continuation. At ₹98, the rubber band has snapped back. Probability of further rise without new catalyst is lower.
- Action: SELL 100 shares at ₹98. Profit = (98-88) × 100 = ₹1,000.
Why not wait for₹110? Mean-reversion is not momentum. Target is the mean (₹100), not the opposite extreme. Overstaying invites reversal risk.
Worked Example 2: RSI Mean-Reversion
Setup: Stock XYZ at ₹200. RSI(14) = 25 (oversold).
Logic:
- RSI = 25 means recent losses outweigh gains heavily. Sellers exhausted.
- Why this step? When RSI < 30, historically 70% of the time price rebounds within 5-10 days (in ranging markets).
- Action: BUY at ₹200. Set target at ₹210 (where RSI returns to 50, the neutral zone).
3Days Later: RSI climbs to 52, price at ₹208.
- Why exit? RSI back to neutral = mean-reversion complete. No edge to hold longer.
- Action: SELL at ₹208. Profit = ₹8 per share.
Risk Management: If RSI drops further (e.g., to 15), it signals a breakdown, not mean-reversion. Stop-loss at ₹195 (if price makes new low despite oversold RSI).
When Mean-Reversion FAILS
Why this feels right: In a ranging market, oversold = opportunity. So you trained yourself: "Oversold = buy."
The Fix: Mean-reversion works in range-bound markets (sideways price action). In trending markets (strong uptrend or downtrend), "oversold" can stay oversold for months. Example: A stock drops from ₹500 to ₹400(RSI = 25). You buy. It drops to ₹300 (RSI still 25). You buy more. It drops to ₹200. You're wiped out.
How to avoid:
- Check the trend first. Use 200-day MA: If price is below200-day MA and falling, trend is DOWN. Don't fight it with mean-reversion longs.
- Use ADX (Average Directional Index). ADX > 25 = trending market. Skip mean-reversion. ADX < 20 = ranging market, safe for mean-reversion.
- Set hard stop-losses. If price makes a new extreme LOW after you bought an oversold signal, exit. Don't double down.
When to Use Mean-Reversion Trading
Best Conditions:
- Range-bound markets: Price oscillates between support and resistance with no strong trend.
- High volatility: Large swings create frequent overbought/oversold extremes.
- Liquid stocks/indices: Tight spreads, low slippage. Examples: Nifty 50 stocks, large-cap US stocks.
Avoid When:
- Strong trends (up or down): Trend traders make money; mean-reversion traders lose.
- Low volatility: Small swings → infrequent signals → opportunity cost.
- News-driven moves: Fundamental change (merger, bankruptcy) → new mean; old mean irrelevant.
Mean-Reversion vs. Momentum Trading
| Mean-Reversion | Momentum |
|---|---|
| Buy low, sell high | Buy high, sell higher |
| Bet on reversal | Bet on continuation |
| Works in ranges | Works in trends |
| Contrarian | Follow-the-crowd |
| Shorter holding periods (days) | Longer holding periods (weeks/months) |
Key Insight: They are opposite strategies. Use the right one for the market regime. In a bull market (momentum regime), don't mean-revert; ride the trend. In a chopy market (range regime), don't chase momentum; trade the bounces.
Example Trade Setup Checklist
- Identify the mean: Plot20-day SMA or Bollinger Bands.
- Measure extremes: Calculate z-score or check RSI.
- Confirm range-bound market: Price between stable support/resistance, no strong trend, ADX < 20.
- Entry: Price at extreme (z< -2, RSI < 30, or at lower Bollinger Band).
- Position size: Risk 1-2% of capital (calculate from stop-loss distance).
- Stop-loss: Below recent low (for longs) or above recent high (for shorts). If price breaks to new extreme, exit.
- Target: The mean (SMA, middle Bollinger Band, or RSI = 50).
- Exit: At target or if market regime changes (trend emerges).
Recall Feynman Explanation (ELI12)
Imagine you're playing with a yo-yo. When you throw it down really hard, it goes super low, but then the string pulls it back up to your hand, right? That's mean-reversion!
Stock prices are like the yo-yo. Sometimes people panic and sell stock way too cheap (yo-yo goes too low). Sometimes people get excited and buy it way too expensive (yo-yo flies too high). But the "string" is the average price, and the stock usually comes back to that average.
Mean-reversion traders are like kids who catch the yo-yo at the bottom and sell it when it comes back to the middle. They don't wait for it to go to the top — that's risky! They just want the easy bounce back to normal.
The trick? Make sure the yo-yo is attached to a string! If the company is actually going bankrupt, there's no string — the yo-yo just falls and never comes back. So you check: Is this a normal bounce, or is something really broken?
"Don't Fight the Trend, Trade the Range"
- If ADX > 25, trend is boss. No mean-reversion.
- If ADX < 20, range is king. Mean-revert away!
Connections
Related Notes:
- 4.1.01-Trading-vs-investing-core-difference — Mean-reversion is a trading strategy (short-term), not investing.
- 4.1.05-Learn-momentum-trading — The opposite of mean-reversion; know when to switch strategies.
- 4.1.08-Learn-technical-indicators — RSI, Bollinger Bands, ADX all used in mean-reversion.
- 4.2.01-Risk-management-position-sizing — Crucial for mean-reversion: tight stops because you're betting against the current move.
- 3.2.04-Support-and-resistance-levels — Mean-reversion works best when price bounces off support/resistance in a range.
Broader Context:
- Mean-reversion is a statistical edge, not a certainty. Markets are mean-reverting 60-70% of the time in ranges, not 100%.
- Combines well with options strategies (e.g., sell puts when stock oversold, collect premium as it reverts).
#flashcards/stock-market
What is the core assumption of mean-reversion trading? :: Asset prices fluctuate around a long-term average (mean), and extreme deviations are temporary. Prices tend to return to the mean over time.
Why does mean-reversion work in markets?
What is a z-score in mean-reversion?
Bollinger Bands formula for upper and lower bands?
When is RSI considered oversold and overbought?
What is the RSI formula?
What is the biggest mistake in mean-reversion trading?
How do you know if a market is range-bound vs trending for mean-reversion?
What is your exit target in mean-reversion trading?
Where should you set stop-loss in a mean-reversion long trade?
Mean-reversion vs momentum trading key difference?
What indicators are best for mean-reversion trading? :: Bollinger Bands, RSI, z-score (direct calculation), and ADX (to confirm ranging market). All measure deviation from mean and identify extremes.
Concept Map
Hinglish (regional understanding)
Intuition Hinglish mein samjho
Mean-reversion trading ka matlab hai ki jab stock ka price bahut zyada upar ya neeche chala jata hai, toh wapas apne average (matlab normal level) par aa jaata hai. Sochiye ek rubber band — jitna zyada ap khenchoge, utna hi zyada woh wapas snap karega. Market mein bhi yahi hota hai. Jab log dar ke mare panic selling karte hain, toh stock sasta ho jaata hai (oversold). Jab log greed mein pagal hokar khareedne lagte hain, toh stock mahanga ho jaata hai (overbought). Paragar company fundamentally thek hai, toh price wapas normal par aa jaata hai.
Mean-reversion traders yeh kaam karte hain: jab stock bahut neeche gir jaaye (jaise Bollinger Band ke lower band ko touch kare ya RSI 30 se neeche ho), tab khareed lo. Phir jab price wapas average (SMA ya middle band) par pahunche, tab bech do. Simple profit! Par ek badi warning hai — agar market trending hai (matlab continuously up ya down ja raha hai), toh mean-reversion kaam nahi karega. Aise mein ap oversold stock khareedoge aur woh aur bhi gir jaayega. Isliye pehle confirm karo ki market range-bound hai (sideways chal raha hai, koi strong trend nahi hai).
Yeh strategy short-term traders ke liye hai jo daily ya weekly trades karte hain. Long-term investors ke liye nahi. Aur risk management bahut zaroori hai — tight stop-loss rakho, kyunki agar price new low bana de, matlab trend badal gaya hai. Tab turant exit karna padega, warna portfolio dub jayega!