/ Notes

The cost that zeroes it

A backtest run without costs reports what a strategy earns before anyone gets paid. Every real trade then pays a spread, a commission and some slippage. This note finds the cost at which the edge reaches zero, and shows why two reports with the same total can land on opposite sides of it.

1. Two reports with the same total

Take two hypothetical backtests over the same window. Report A has 1,200 trades averaging +0.08% each before costs. Report B has 60 trades averaging +1.50%. Summed, not compounded, A makes about 96 percentage points and B about 90. On a zero-cost chart they look alike, and A looks slightly better.

Now charge both a round trip of 0.10%, ten basis points for spread, commission and slippage together. A’s average trade becomes -0.02% and its total about -24 points. B’s becomes +1.40% and its total about +84. One cost assumption, and the better-looking report is the one that loses money.

2. The number to compute first

What decides this is the average trade before costs, in basis points of the position. Many reports print it as an average trade percentage; otherwise divide the gross profit by the number of trades and the typical position size.

That number is the cost that zeroes the strategy. A’s is 8 bps: any round trip above 8 bps and it loses. B’s is 150 bps: it could pay fifteen times the 10 bps round trip before its edge was gone. A cannot pay it once.

So the question is not whether the backtest included costs. It is how far the average trade sits above them. The free TradingView script Break-Even Trading Cost runs this on any chart: one simple rule, its running total at four round-trip costs, and the average gross trade that zeroes it.

3. Short holds and tight stops spend the same budget

Faster systems usually take smaller average trades, because price has less time to move while the position is open. The cost of a round trip does not shrink with the holding period, so the share of the edge it takes grows. At 10 bps, the cost takes 125% of an 8 bps average trade and under 7% of a 150 bps one.

Stops do the same thing in R. With a fixed risk per trade, the cost in R is the round-trip cost divided by the stop distance, so halving the stop doubles what every trade pays. With a cost of c R per trade, the break-even win rate moves from 1 / (1 + payoff) to (1 + c) / (1 + payoff): at a payoff of 1.5 and a cost of 0.1R, from 40% to 44%. The cost-in-R calculator does this for any stop and payoff.

4. What a round trip contains

  • Spread, paid on the way in and again on the way out.
  • Commission, usually charged on each order. A setting of 0.1% per order is 0.2% per round trip.
  • Slippage, which is not symmetric. A stop that triggers fills as a market order, often beyond the stop price; a limit target fills at its price or better. Losing trades tend to pay more of it than winners.
  • Holding costs, such as funding on perpetual futures and borrow on short stock, which accrue for as long as the position is open rather than once per trade.

In a TradingView strategy, commission and slippage both default to zero unless the script or its settings change them, so a report that does not state them may simply be running at zero cost.

5. Margin, not inclusion

Once you have the cost that zeroes it, set it against what you actually pay, measured from your own fills rather than a fee schedule. A strategy that breaks even at 8 bps on a venue where you pay 6 has a margin of 2 bps, a ratio of 1.33, and a few bad fills take it.

How much margin is enough is a judgment. But a ratio near one means the result is a bet on execution, not on the entry rule.

6. Books that rebalance: price the turnover

A portfolio that rebalances has no single trade to price. Use turnover instead: the share of the book traded each day, times the cost per side, times the trading days in a year. Trading 25% of the book a day at 5 bps a side costs about 3.15% a year over 252 trading days, before any return is counted. The turnover-cost calculator runs it for other inputs.

The order matters

Find the average trade before costs, set the real round trip against it, then look at the equity curve. Done the other way round, the zero-cost curve sets the expectation and the costs look like a detail. For report A they are the whole result.

Every figure above is arithmetic on hypothetical reports, computed for this note; totals are summed, not compounded. None of it is a result of mine.

These are the same checks I run before I believe any backtest, including my own.

Get the Backtest Verification Checklist

Historical simulations are not live results. Nothing on this site is investment advice.