Handling Transaction Costs Realistically
Beyond commissions — spread modeling, market impact, and fill assumptions that reflect real markets.
The best-known cost is commissions. The less-known cost is slippage. The unknown cost that destroys most strategies is market impact — the fact that your own order moves the price against you, especially in less liquid markets. Realistic backtests model all three.
For stock backtests, use conservative fill assumptions. Assume you get the closing price for signals generated at close, or the next open for overnight signals. Don't assume you can fill at intraday prices unless you're modeling intraday orders explicitly with tick data. Bar-based backtests that assume mid-price fills are wildly optimistic.
For options backtests, always use the historical bid/ask spread, not mid-price. If the mid was $2.00 and the spread was $0.10 wide, assume you paid $2.05 to buy and received $1.95 to sell. This alone will change your backtest results by 20-40% for active strategies.
Market impact scales with your order size relative to the market's liquidity. Trading 100 shares of AAPL has zero impact. Trading 100,000 shares of a small-cap has enormous impact. A common approximation is 10 basis points impact for every 1% of average daily volume you trade. Model this if you're backtesting anything above small retail size.
The composite rule: assume total transaction costs of at least 5-10 basis points per trade for liquid US stocks, 20-50 basis points for liquid options, and much higher for anything illiquid. If your strategy still profits after those haircuts, it might survive real markets. If it barely broke even with these costs, it definitely won't.
See these concepts in action
Watch our YouTube channel for real backtests applying these principles.
Subscribe on YouTubeMore Guides
What is Backtesting?
Learn the fundamentals of backtesting trading strategies using historical data.
⚠️IntermediateAvoiding Overfitting in Backtests
The biggest trap in backtesting and how to avoid curve-fitting your strategies.
📐BeginnerKey Backtest Metrics Explained
Understanding Sharpe ratio, max drawdown, win rate, and other essential metrics.