Methodology

3 min

Cost-Aware Backtesting

Cost-aware backtesting explained: next-bar execution, fees, spread, slippage, turnover, funding, capacity, and why zero-cost Sharpe is not evidence.

Cost-aware backtesting means the simulation models the costs and timing that a live strategy would face. It is a core long-tail topic for searches like backtesting with transaction costs, slippage-aware backtest, next-bar execution backtest, crypto trading fees backtest, and realistic quant strategy backtesting.

A backtest without costs is not necessarily useless, but it is incomplete. It measures a gross signal under idealized execution. The Judge needs the net claim.

Same-bar fills are usually impossible

The most common execution error is filling at the same price used to compute the signal. If a strategy uses the close of bar t, then the close is only known when bar t is complete. A fill at that same close assumes the trade happened at the instant the information became available.

The conservative baseline is next-bar execution. The signal uses information available at the decision time, and the trade fills on a later bar. Depending on market and order type, even next-bar may be optimistic, but same-bar fills are usually not an acceptable default.

Costs are not one number

Transaction cost modeling has several components:

  • Explicit fees: exchange fees, brokerage commissions, borrow fees, funding payments, and taxes where relevant.
  • Spread: the difference between executable bid and ask, especially important for less liquid instruments.
  • Slippage: price movement between decision and execution, including market impact.
  • Turnover: how often the strategy trades. Small per-trade costs become large when turnover is high.
  • Capacity: how much capital can be deployed before the strategy changes the market it trades.

These costs should be declared with the result. A strategy with Sharpe 1.6 at zero cost and Sharpe 0.3 after realistic costs is not a near miss. It is a different strategy claim.

Cost sensitivity is evidence

A robust candidate should not pass only at one fragile cost assumption. Corrai treats cost sensitivity as part of the evidence package. The Judge should be able to ask:

  • What happens if fees double?
  • What happens if slippage increases during high volatility?
  • What happens if the fill is delayed by one additional bar?
  • What turnover drives the net result?
  • Is the edge concentrated in trades too small or illiquid to execute?

The point is not to invent a pessimistic model until everything fails. The point is to identify whether the candidate's apparent edge is larger than the plausible implementation error.

Crypto-specific costs

Crypto strategy research often needs additional care:

  • maker versus taker fee assumptions
  • funding payments for perpetual futures
  • exchange-specific liquidity and outage behavior
  • weekend and 24/7 calendar handling
  • borrow constraints for spot margin
  • instrument-specific tick and lot sizes

An AI-generated crypto alpha idea that ignores these details can look strong because the backtest is trading a frictionless market that does not exist.

Costs interact with overfitting

Costs do more than reduce returns. They change which strategies survive. High-turnover strategies often have the most attractive gross backtests and the worst net degradation. If the search process tries many turnover-heavy variants and reports the best gross result, it is selecting for a cost illusion.

That is why cost-aware backtesting belongs beside DSR, PBO, and walk-forward validation. The evidence gates answer different questions, and a candidate must survive all of them.

In Corrai

Corrai records execution assumptions with each run: fill timing, fees, slippage, turnover, and any market-specific cost model. The Judge can then compare net and gross results, inspect cost sensitivity, and block candidates whose evidence only exists in a frictionless simulation.