Advanced Slippage Modeling
PROModel real-world execution costs for accurate backtests
Why This Matters: Basic backtests assume fixed slippage (e.g., 0.1% per trade). But real slippage varies based on order size, time of day, and market volatility. Professional quant firms use dynamic slippage models - now you can too.
What is Slippage?
Slippage is the difference between the price you expect to get and the price you actually get when executing a trade. It's one of the biggest "hidden costs" that can erode your trading profits.
Real World Example
Why Fixed Slippage is Misleading
Most backtesting tools use a fixed slippage percentage (like 0.1%). But slippage isn't constant - it changes dramatically based on market conditions:
High Slippage Conditions
- • Market open (9:30-10:00 AM)
- • Market close (3:30-4:00 PM)
- • Large orders relative to volume
- • High volatility periods
- • Low liquidity stocks
Low Slippage Conditions
- • Midday trading (10:30 AM-3:00 PM)
- • Small orders in liquid stocks
- • Low volatility periods
- • High-volume stocks
- • Limit orders vs market orders
Our Dynamic Slippage Model
Our system uses a multi-factor slippage model that accounts for real market dynamics. This gives you more realistic backtest results.
Volume Impact
Order size relative to market volumeLarge orders move the market. If you're buying 10,000 shares and the average minute volume is only 5,000, you'll push the price up as you buy. Our model scales slippage based on your order size versus typical trading volume.
Time of Day
Market open/close have wider spreadsMarkets are most volatile at open and close. Bid-ask spreads widen, and prices jump around more. Our model applies time-based multipliers to reflect these conditions.
Volatility Impact
Recent price swings affect executionWhen prices are swinging wildly, market makers widen spreads to protect themselves. Our model tracks recent volatility and increases slippage during turbulent periods.
Combined Formula
Impact on Your Backtests
Using dynamic slippage can significantly change your backtest results, especially for strategies that trade frequently or during volatile periods.
| Scenario | Fixed (0.1%) | Dynamic | Difference |
|---|---|---|---|
| Small orders, midday | 0.10% | 0.08% | -20% |
| Large orders, market open | 0.10% | 0.35% | +250% |
| High volatility period | 0.10% | 0.22% | +120% |
| Average across all trades | 0.10% | 0.15% | +50% |
More Realistic = Lower Returns
How to Use in Your Backtests
When running a backtest, you can choose between slippage models:
Fixed
Simple constant percentage
Realistic
Volume + Time + Volatility (recommended)
Volume Only
Order size impact only
bookmarkKey Takeaways
- check_circleSlippage varies based on order size, time of day, and volatility
- check_circleFixed slippage can significantly overestimate strategy performance
- check_circleUse the "Realistic" model for production-ready strategies
- check_circleLarge orders at market open/close have the highest slippage
Ready to Apply What You've Learned?
Start paper trading with real market data and test your strategies risk-free.