tradingbacktest.live Log inStart free
Guide / Testing

Trading costs: spread, commission and swap

How the cost profiles work, what each cost does to a strategy, and how to enter the costs of your own broker or prop firm.

A strategy that wins before costs can lose after them. Every test includes three costs, set per market by a cost profile.

The three costs

  • Spread: the gap between the buy and sell price. You pay it on every trade. With tick data the real spread of each moment is used, so spreads widen at night and around news as they do on a real account.
  • Commission: an amount per lot, charged when the trade opens and closes. Enter it per lot round turn (open and close together).
  • Swap: the overnight financing cost or credit, in points per lot per night. Positions held over Wednesday night usually pay three nights.

Profiles

Profile Use it for
Retail broker Real spread from the data and a typical commission of a raw-spread account
Prop firm Spreads, commissions and swaps measured on prop firm accounts
No costs The raw edge of the idea, to compare with the version with costs

You can override any market on the test page, and save your own broker as a profile. A profile can also be imported as a table: one line per market with spread, commission, swap long and swap short.

Reading the impact

The report shows the total fees and the average fees per trade. If the average cost per trade is more than a third of the average winning trade, small changes in costs can turn the result around. Strategies with many short trades are the most sensitive.

Try it on real dataBuild the strategy with blocks and test it on real ticks with spreads, commissions and swaps. The free plan needs no card.

Start free