The default settings of most backtesting tools assume something that never happens: that you were filled instantly, at the closing price of the signal bar, in unlimited size, for free.
Every one of those assumptions flatters the result, and they compound. A strategy that trades often can look strongly profitable under default settings and be reliably unprofitable in practice, without a single line of its logic being wrong.
What the default assumptions get wrong
- Fill at the close: you cannot trade at a price that is only known once the bar has ended. Filling at the next bar's open is the honest minimum.
- No spread: buying at the mid price is not available to you. You buy at the ask and sell at the bid.
- No fee: a published, certain, per-trade charge that is trivial to include.
- Unlimited size: your order is assumed not to move the price, however large it is relative to the book.
- No funding: on perpetuals, a holding cost that scales with duration and is invisible in a price series.
What to charge instead
Charge the venue's real taker fee on both sides unless you can demonstrate that your orders actually rested and filled as maker orders. Assuming maker execution is one of the most common ways a backtest becomes fiction, because a resting order that is never filled is a trade that never happened, and the backtest quietly counts it anyway.
For slippage, a fixed number of basis points per side is a reasonable starting model, calibrated from your own fills if you have them. It is crude, but a crude cost model applied consistently beats an elegant one applied optimistically.
Test the sensitivity, not just the result
The most useful thing a cost model gives you is not the adjusted return. It is the answer to a different question: how much cost does this strategy tolerate before it stops working?
Run the backtest at several cost levels and plot the result against them. A strategy that is profitable at 2 bps and unprofitable at 6 bps is not a strategy, it is a measurement of your fee tier. A strategy whose result degrades gently as costs rise is describing something more durable.
Sanity checks that catch fiction early
- Count the trades. If the backtest took thousands of positions in a period where the market barely moved, the cost model is doing no work.
- Compare the average winning move to your modelled round trip. If they are close, the result is dominated by the cost assumption.
- Re-run with costs doubled. If the strategy inverts from profitable to unprofitable, you have measured your assumptions rather than the market.
- Check the worst case, not the average. Slippage is not symmetric: it is largest in exactly the fast conditions where your signal is most likely to fire.
Why this project publishes its tape
A backtest is a claim about fills that never occurred. The only way to check a cost model is against trades that actually happened, which is why every trade these agents have made is public, with the cost breakdown attached to the ones that carry it.