Learn about slippage assumptions
What is Slippage?
WHY it exists: Markets are not infinitely liquid. Large orders consume available liquidity at each price level, forcing subsequent fills at worse prices. Even small orders face the bid-ask spread—a guaranteed minimum slippage.
HOW it manifests: You decide to buy when price is 50.05. You get filled at 0.05 = 10 basis points.
Deriving Slippage Models from First Principles
1. Fixed Slippage Model
Assumption: Every trade pays a constant slippage (in basis points or absolute dollars).
Derivation:
- Expected fill price when buying:
- Expected fill price when selling:
WHY this form? It's the simplest model: assumes average market conditions and ignores volatility, order size, and liquidity variations.
Example: Buy 100 shares at s = 0.001$ (10 bps)
- Expected fill:
- Slippage cost: 100 \times 50 \times 0.001 = \5$
Why this step? Multiplying by price converts basis points to dollars. The absolute value ensures slippage is always a cost, never a gain. Watch the conversion: 5 bps is (not )—a factor-of-10 slip here silently inflates your costs tenfold.
2. Volume-Dependent Slippage Model
Assumption: Larger orders relative to average volume experience worse slippage.
Derivation from market microstructure:
- The order book has depth at each price level
- Your order walks up the book, consuming liquidity
- Average fill price is the volume-weighted average of levels consumed
For a market order of size in a market with average volume :
WHY the square root? This is the empirical "square-root law" of market impact, documented across many later microstructure studies (e.g., Almgren, Toth, Bouchaud). Note: Kyle's original 1985 lambda model implies linear impact (); the scaling is an empirical regularity observed in real trade data, not a direct consequence of Kyle's model. Intuitively, the square root captures diminishing marginal impact—informed traders splitting orders can't extract unlimited profit.
Example: , ,
- bps
- On a 1000 \times 50 \times 0.01 = $500$
Why this step? The square root captures diminishing returns—doubling order size doesn't double impact. Dividing by volume normalizes across different liquidity regimes.
3. Volatility-Adjusted Slippage
Assumption: High volatility → prices move faster → more slippage.
Derivation:
- During latency (time to execution), price follows random walk with volatility
- Expected price move:
- Worst-case (directional): against you
Unit convention for : Since is annualized, must be expressed as a fraction of a year. Examples:
- Half a trading day: years
- One full trading day: years
- A few seconds of latency: is essentially on this scale, so intraday HFT models often use per-second volatility instead.
Example (half-day latency): (30% annual), years
- bps
Why this step? We use because price diffusion scales with square root of time (Brownian motion). The factor acknowledges you won't always get hit by the worst-case move.
4. Combined Slippage Model
Real-world: All effects occur together.
Example: Trade 500 shares, , , years (~a quarter trading day)
- Fixed: bps
- Volume: bps
- Volatility: bps
- Total: bps
Why this step? Note carefully: the volume term equals bps (since bps, and ), not 10 bps. A 500-share order that is 1% of daily volume already generates significant impact—another reminder to keep bps conversions straight ().
Implementing Slippage in a Backtest
Step-by-step:
-
Choose your model based on strategy frequency:
- High-frequency (seconds): use volatility + volume model
- Medium-frequency (minutes-hours): use volume + fixed
- Low-frequency (daily+): fixed slippage often sufficient
-
Calibrate parameters from real execution data:
- Measure actual fill prices vs. decision prices over 100+ trades
- Fit , , to minimize error
- If no real data: use conservative estimates (10-20 bps for retail, 2-5 bps for institutional)
-
Apply on every trade:
# Pseudocode for backtest engine def execute_order(decision_price, quantity, volume, volatility): s_fixed = 0.0005 # 5 bps (recall: 1 bp = 0.0001) s_volume = 0.1 * sqrt(abs(quantity) / volume) s_volatility = 0.5 * volatility * sqrt(latency_in_years) total_slippage = s_fixed + s_volume + s_volatility if quantity > 0: # Buy fill_price = decision_price * (1 + total_slippage) else: # Sell fill_price = decision_price * (1 - total_slippage) return fill_price
Why this structure? Slippage is directional—always hurts you. Buys get worse fills (higher price), sells get worse fills (lower price).
Recall Explain to a 12-Year-Old
Imagine you're at a lemonade stand that posts prices every minute. You see "Lemonade: 1.10" because five other kids bought first and now there's less lemonade left. You have to pay $1.10 because you already committed. That extra 10¢ is slippage.
Big buyers have it worse: if you want 10 lemonades and the stand only has 3 at 1.20, and the last 4 cost 1. That's market impact.
In stock trading, this happens thousands of times. If you forget to account for it when testing your strategy, your backtest thinks you're making money, but in real life, you're paying extra on every trade. It's like forgetting to count the delivery fee when budgeting for pizza!
Connections
- Transaction costs and their impact – slippage is one component of total transaction costs
- Realistic order execution modeling – extends slippage with partial fills and fill probability
- Market microstructure basics – order book dynamics explain why slippage exists
- Look-ahead bias – ignoring slippage is a form of look-ahead bias (assumes perfect execution)
- Position sizing – slippage costs scale with position size, affecting optimal sizing
#flashcards/stock-market
What is slippage in trading?
What are the four main sources of slippage?
What is 1 basis point as a decimal, and what is 5 bps?
Is the √(Q/V) market-impact law derived from Kyle's 1985 model?
What is the minimum slippage you pay even on small orders?
Fixed slippage formula for total cost?
Why does volatility increase slippage?
Why must τ be expressed in years in the volatility slippage formula?
Combined slippage model formula?
Why do backtests dramatically overestimate returns when ignoring slippage?
What is the "adverse selection" problem with limit orders?
Why is using average volatility for slippage modeling a mistake?
Concept Map
Hinglish (regional understanding)
Intuition Hinglish mein samjho
Dekho, slippage ka simple funda ye hai ki jab tum backtest me strategy chalate ho, tumhara code bolta hai "buy at 100 pe fill nahi hote, tum $100.15 pe fill hote ho. Ye chota sa 15 cent ka difference chota lagta hai, par jab tum hazaaron trades karte ho, to ye chota tax milke tumhari profitable strategy ko loss-making bana deta hai. Isiliye slippage ko ignore karna sabse khatarnaak galti hai — tumhe lagta hai strategy jeet rahi hai, par real trading me ye har trade pe paisa kha jaata hai.
Ab slippage aata kahan se hai? Char main reasons hain — market impact (tumhara bada order khud price ko against move kara deta hai), latency (decision aur execution ke beech price hil jaati hai), liquidity constraint (tumhare target price pe itna volume hi nahi hota), aur spread crossing (buy karte waqt ask pay karo, sell karte waqt bid milega). Isko model karne ke liye do main tarike hain: Fixed slippage jisme har trade pe constant rate s lagta hai (jaise 10 bps = 0.001), aur Volume-dependent slippage jisme bada order zyada slippage khaata hai. Yahan ek zaroori cheez — square-root law: impact √(Q/V) ke proportion me badhta hai, matlab order double karne se impact double nahi hota, uss se kam badhta hai. Ye diminishing returns ka concept real trade data se observe hua hai.
Kyun matter karta hai ye tumhare liye? Kyunki ek realistic backtest wahi hai jo slippage ko sahi se add kare. Ek chhoti si mistake — jaise 5 bps ko 0.0005 ki jagah 0.005 likh dena — tumhare cost ko 10 guna galat bana deti hai aur tumhara pura analysis jhooth ho jaata hai. Toh jab bhi tum apna strategy test karo, hamesha realistic slippage assumption daalo, taaki paper pe jo profit dikh raha hai wo real trading me bhi tikke. Warna overconfidence me tum real paise se loss maar loge.