Understand statistical arbitrage basics
What is Statistical Arbitrage?
The Three Pillars
WHY these matter:
- Pair Selection — wrong pairs = no mean reversion = losses
- Spread Calculation — defines entry/exit signals
- Position Sizing — controls risk per trade
Derivation: The Statistical Arbitrage Spread
Step 1: Define the Spread
For two assets A and B with prices and , the spread is:
WHY subtract β·P_B? We want a stationary series. Raw price difference trends if one grows faster. The hedge ratio β neutralizes that trend.
HOW to find β? Linear regression of on :
Why this step? Minimizes variance of — makes spread oscillate around constant mean instead of drifting.
Step 2: Standardize the Spread (Z-Score)
Raw spread has arbitrary units. Convert to z-score:
where:
- (mean spread over lookback window)
- (standard deviation)
WHY z-score? Dimensionless units let us set universal thresholds: "Enter when |z| > 2" works for any pair. Also measures how "extreme" current divergence is.
Why 2? Assuming normal distribution, |z| > 2 happens ~5% of time — rare enough to signal mispricing, common enough for liquidity.
Step 3: Trading Logic
Entry signals:
- : Spread too high → Short A, Long B (bet spread falls)
- : Spread too low → Long A, Short B (bet spread rises)
Exit signals:
- : Close position (mean reversion complete)
- : Stop-loss (relationship may have broken)
Why this step? High |z| signals temporary dislocation. Closing at z=0 captures mean reversion profit. Stop-loss prevents holding through structural breaks.
Worked Example 1: Coca-Cola vs. Pepsi
Setup
- Historical data: 250 trading days
- KO prices: mean 3
- PEP prices: mean 6
- Correlation: 0.85
- Calculate β:
Why this step? β = ρ·(σ_A/σ_B) from regression theory. KO moves ~0.43 dollars per dollar PEP moves.
Day 251: Entry
- KO = 150
- Spread:
- Historical: ,
- Z-score:
Interpretation: Spread is 2.67 SD above mean (KO overpriced relative to PEP).
Action: Short 100 shares KO, Long 42.5 shares PEP (β·100 = 42.5 for dollar neutrality).
Why this step? Position sizes create equal dollar exposure: vs. (close enough with rounding).
Day 260: Exit
- KO = 148
- New spread:
- New z-score:
Why exit? z dropped from 2.67 → 1.23 (substantial mean reversion). Lock in profit.
Profit calculation:
- KO short: Sold 59 → +$300
- PEP long: Bought 148 → -$85
- Net: 215** (before costs)
Why profitable? Spread narrowed (mean reverted) as predicted. Market-neutral: both stocks could've fallen — we'd still profit if spread converged.

Worked Example 2: Failed Trade (Learning Opportunity)
Setup
- Gold miners: GDX vs. individual stock GOLD
- Entry z = -2.5 (GOLD underpriced vs. GDX)
- Action: Long GOLD, Short GDX
Outcome
- Gold price crashes 15% industry-wide
- GOLD falls 18%, GDX falls 14%
- Spread widens further: z → -3.8
- Stop-loss triggered at z = -3.0
- Loss: -$450
Why did this fail?
- Structural break: Cointegration assumed stable relationship, but GOLD announced poor earnings
- Beta instability: During crashes, correlations spike toward 1 (everything falls together)
- Liquidity: Widening spreads in illiquid conditions
Key lesson: StatArb assumes stationarity. Check for cointegration (Engle-Granger test) and monitor news for structural changes.
Key Formulas
The Realistic Picture
Win Rate vs. Profit Factor
Typical StatArb performance:
- Win rate: 55–65% (barely better than coin flip!)
- Avg win: $150
- Avg loss: $100
- Profit factor: (0.60 × 150) / (0.40 × 100) = 2.25
Why low win rate works: Asymetric payoff. Mean reversion gives small consistent wins; stop-loss caps large losses. It's about expectancy, not accuracy.
For above: (0.6 \times 150) - (0.4 \times 100) = 90 - 40 = +\50 per trade.
Risk: The Half-Life of Mean Reversion
Half-life = time for spread to decay50% toward mean. Calculate from AR(1) model:
Why it matters: Short half-life (minutes–hours) = fast profit/loss. Long half-life (weeks) = capital tied up, opportunity cost. Typical pairs trading: half-life 2–10 days.
Example: If (90% of previous value persists), half-life = periods.
Recall Feynman Explanation (ELI12)
Imagine you have two lemonade stands across the street from each other. Usually, Stand A charges50¢ and Stand B charges 45¢ — there's a consistent 5¢ difference because Stand A has better location.
One hot day, Stand A panics and raises prices to 70¢ while Stand B stays at 45¢. Now the difference is 25¢ — way more than usual! You know customers will flock to Stand B until Stand A lowers prices or Stand B raises them.
StatArb is like: "I'll bet Stand A's price will come down." So you promise to sell someone Stand A lemonade (short) at today's high price, while buying Stand B lemonade (long) at normal price. When prices normalize back to 5¢ difference, you pocket the change.
The "statistical" part means you're betting on the pattern (5¢ difference), not guaranteed profit. Sometimes the pattern breaks (Stand A closes!), so you set a "stop-loss" — maximum loss you'll accept before admitting the pattern changed.
Connections
- 6.1.01-Introduction-to-algorithmic-trading — StatArb is a quantitative strategy requiring algos for execution
- 6.1.04-Mean-reversion-strategies — StatArb is the pairs-trading implementation of mean reversion
- 6.2.03-Correlation-vs-cointegration — Critical to distinguish for pair selection
- 6.2.05-Backtesting-trading-strategies — Must backtest for stationarity, costs, and slippage
- 5.3.02-Beta-and-systematic-risk — β here is hedge ratio; related to CAPM β but different context
- 7.1.03-Value-at-Risk-VaR — StatArb uses VaR for position-level risk management
#flashcards/stock-market
What is statistical arbitrage? :: A market-neutral strategy that profits from mean reversion of spreads between cointegrated asset pairs by taking simultaneous long/short positions when spread deviates >N standard deviations.
What is the hedge ratio β in pairs trading?
Why use z-score instead of raw spread for entry signals?
What is the key difference between correlation and cointegration?
How do you calculate position sizes for dollar neutrality?
What is half-life in mean reversion and why does it matter?
Why can StatArb be profitable with only 55-60% win rate?
What are typical entry and exit z-score thresholds?
Concept Map
Hinglish (regional understanding)
Intuition Hinglish mein samjho
Statistical arbitrage ek smart trading technique hai jisme hum do aisi companies ke stockslete hain jo historicallyek-dusre ke sath move karte hain — jaise Coke aur Pepsi, ya Australia aur Canada ke ETFs. Jab inki price relationship temporarily bigad jati hai (matlab ek stockzyada badh gaya aur dusra peeche reh gaya), tab hum bet lagate hain ki yeh wapas normal ho jayenge.
Iska magic yeh hai ki hum "market-neutral" rehte hain —agar pora market crash bhi ho jaye, humein farak nahi padta kyunki hum simultaneously ek stock long (khareed rahe) aur dusra short (bech rahe) kar rahe hain. Hum direction pe bet nahi kar rahe, hum sirf relationship ki correction pe bet kar rahe hain. Jaise agar normally Coke 100 rehta hai (ratio 1:2), lekin aj Coke 100 hai, toh hum Coke ko short karenge expecting ki wapas $50 ayega.
Yeh strategy statistical hai matlab100% guaranteed nahi — kabhi-kabhi relationship permanently badal jati hai (jaise ek company bankrupt ho gayi). Isliye hum z-score use karte hain jo bata hai spread kitna "extreme" hai (2 standard deviations se zyada = rare event = trade karo). Aur stop-loss zaroor rakhte hain agar pattern toot gaya. Real institutionsisme milliseconds mein trade karte hain automated algos se, aur transaction costs ko minimize karke chhote-chhote profits repeatedly kamate hain. Retail traders ke liye challenge hai ki brokerage fees zyada hain, toh larger moves ki zaroorat padti hai profitability ke liye.