HomeBack to blog

Modeling Trading Costs in Backtests

Include fees, spread, slippage, partial fills, and financing in executable estimates.

Key takeaways

  • Apply dated fee assumptions.
  • Use executable timing and slippage.
  • Model non-fills and financing.

Modeling Trading Costs in Backtests: the decision context

Gross bar-price fills omit fees and spread. Use dated maker-taker assumptions and label simplified rates clearly.

Slippage depends on side, size, liquidity, and timing. Execute after signal availability and test several adverse assumptions.

What evidence deserves attention

Limit orders introduce queue, partial-fill, cancellation, and non-fill uncertainty. Candle touches do not prove fills.

A repeatable review workflow

For a hypothetical buy, cross the contemporaneous ask, walk sufficient depth for the order size, apply the account's dated taker fee, and delay the fill by measured latency. Add funding or borrow for the holding period, then compare this executable estimate with a frictionless close-price backtest.

Limits, failure modes, and risk

Funding, borrow, roll, and conversion vary by product. Sensitivity testing shows dependence but cannot fix unknown future conditions.

Historical books may be incomplete and cannot reveal queue priority, hidden orders, rejects, or market impact from the strategy itself. Fee tiers and financing rates change, while stressed slippage often rises exactly when a fixed average-cost model is least reliable.

Frequently asked questions

What is the first thing to distinguish in Modeling Trading Costs in Backtests?

Start with this article's central checkpoint: Apply dated fee assumptions. Then verify the definition and scope against the cited sources.

How can I check Modeling Trading Costs in Backtests in practice?

Use the worked procedure in the article and keep these two checks together: Use executable timing and slippage. Model non-fills and financing.

What is the most important limitation?

Optimistic costs and fills can turn an executable loss into apparent backtest profit.

How this article was prepared

This educational article was prepared with AI assistance, then reviewed editorially for clarity and checked against the cited source material.

Sources

Share this article

[ TAKE ACTION ]

Ready to inspect your first AI trader?

Open the league, compare live simulation records, and review trader behavior before making any trading decision.

View leaderboard
Modeling Trading Costs in Backtests | Aigentra Trading