
Backtesting With Realistic Fees and Commissions
I once analyzed a crypto scalping strategy that showed 180% annual returns in backtesting. The trader had forgotten to include fees. When I added Binance's 0.1% spot trading fee on each side, the 180% return became a 12% loss. Fees didn't just reduce the profit — they reversed it entirely. This trader isn't unusual. Unrealistic fee modeling is the second most common backtesting error, right behind overfitting.
The True Cost of Trading
Trading costs aren't just the commission your exchange charges. The total cost per trade includes multiple components, and missing any one of them inflates your backtest results:
| Cost Component | Typical Range | Often Forgotten? |
|---|---|---|
| Exchange commission | 0.02-0.10% | Sometimes |
| Bid-ask spread | 0.01-0.20% | Often |
| Slippage | 0.02-0.10% | Very often |
| Funding rate (futures) | ±0.01% per 8h | Almost always |
| Withdrawal fees | Fixed per withdrawal | Usually ignored |
| Currency conversion | 0.1-0.5% | Always |
The combined "all-in" cost per round-trip trade is typically 0.15-0.30% for crypto futures, 0.20-0.40% for crypto spot, and 0.05-0.15% for large-cap US stocks. These numbers don't look scary individually. But multiply them by 200-500 trades per year and they become the dominant factor in strategy profitability.
Exchange Fee Structures
Every exchange uses a maker/taker fee model. Understanding the difference is essential for accurate backtesting:
Maker fees apply when you add liquidity — placing a limit order that sits on the order book. Maker fees are lower (sometimes zero or negative) because you're providing liquidity to the market.
Taker fees apply when you remove liquidity — placing a market order or a limit order that immediately fills. Taker fees are higher because you're consuming liquidity.
| Exchange | Maker Fee | Taker Fee | Notes |
|---|---|---|---|
| Binance Spot (VIP0) | 0.10% | 0.10% | BNB discount: 25% off |
| Binance Futures (VIP0) | 0.02% | 0.04% | + funding rate |
| Bybit Unified (VIP0) | 0.02% | 0.055% | + funding rate |
| Coinbase Advanced | 0.04% | 0.06% | Tiered by volume |
| Interactive Brokers | $0.005/share | $0.005/share | + exchange fees |
| Forex (ECN) | $3-7/lot | $3-7/lot | + variable spread |
Funding Rate: The Silent Killer
If you trade perpetual futures (and most crypto traders do), funding rates are a recurring cost that most backtests ignore completely.
Funding rates are paid every 8 hours on most exchanges. When the rate is positive, longs pay shorts. When negative, shorts pay longs. The typical range is -0.1% to +0.1% per 8-hour interval.
Sounds tiny? Over a year, 0.01% every 8 hours compounds to approximately 11% annually. If your long-biased strategy generates 20% gross returns on futures, funding rate alone could eat more than half your profit during bullish periods when funding is persistently positive.
To model funding rates accurately in backtesting, you need historical funding rate data for your specific instrument and exchange. A flat assumption of 0.01% per 8 hours is a reasonable approximation, but actual funding varies significantly during high-volatility periods.
How Fee Sensitivity Varies by Strategy Type
Not all strategies are equally affected by fees. The key variable is trade frequency × average profit per trade:
| Strategy Type | Trades/Year | Avg Profit/Trade | Fee Impact |
|---|---|---|---|
| Scalping | 2,000-10,000 | 0.1-0.3% | Critical — fees can exceed profits |
| Day trading | 200-1,000 | 0.3-1.0% | High — fees are 20-50% of gross |
| Swing trading | 50-200 | 1-5% | Moderate — fees are 5-15% of gross |
| Position trading | 10-50 | 5-20% | Low — fees are 1-3% of gross |
This is why so many scalping strategies that look incredible in zero-fee backtests fail completely in live trading. A scalper making 0.15% per trade with 0.10% round-trip fees keeps only 0.05% — a third of the gross profit. One bad trade erases three winners.
My Fee Modeling Rules
- Always use taker fees for market orders. If your strategy enters on signals (most do), your entry will be a market or aggressive limit order — that's a taker fee.
- Add spread cost on top of commission. Commission is what the exchange charges. Spread is the price impact of your order. Both are real costs. For liquid pairs (BTC/USDT), add 0.01-0.02% for spread. For less liquid pairs, add 0.05-0.1%.
- Include funding for any position held > 8 hours on futures. Use historical funding rate data if available. Otherwise, use 0.01% per 8-hour interval as default.
- When in doubt, double the fees. If your strategy is profitable at 2x fees, it will almost certainly be profitable at actual fees. This gives you a safety margin for unexpected costs like exchange maintenance windows, unusual spread widening, or fee structure changes.
Proper fee modeling goes hand-in-hand with correct backtest setup. For the closely related topic of price execution, see the guide on accounting for slippage.
"Fees are the only guaranteed cost in trading. Returns are uncertain, losses are uncertain, but fees are certain. Model them with the respect they deserve." — From a risk management handbook I keep on my desk
Never underestimate fees again. StratBase.ai pre-loads accurate maker/taker fee schedules for Binance, Bybit, and other major exchanges. Set your exchange and the platform handles the rest.
FAQ
How much do trading fees affect backtest results?
A strategy with 500 trades/year and 0.1% fees pays 50% of initial capital annually. Fees can reverse a profitable strategy into a losing one, especially for high-frequency approaches.
Should I use maker or taker fees?
Use taker fees for market order entries (most strategies). Use maker fees only if you consistently fill limit orders. When uncertain, use taker for entries and a blend for exits.
Further Reading
About the Author
Quantitative researcher with 8+ years in algorithmic trading and strategy backtesting. Specializes in technical indicator analysis and risk-adjusted performance metrics.
FAQ
How much do trading fees affect backtest results?▾
Dramatically. A strategy making 500 trades per year with 0.1% round-trip fees pays 50% of its initial capital in fees annually. If the strategy generates 60% gross returns, net returns are only 10% after fees. High-frequency strategies are especially sensitive.
Should I use maker or taker fees in backtesting?▾
If your orders execute via market orders (most common for signal-based entries), use taker fees. If you use limit orders and they consistently fill, use maker fees. When in doubt, use taker fees for entries and a 50/50 blend for exits — this is conservative and realistic.
Further reading
Related articles
Comments (0)
Loading comments...

