Commission and Fees in Backtesting: How Costs Change a Strategy
Commission is charged on the value of each executed fill under the assumed fee schedule. For a simple percentage model, round-trip cost is entry quantity × entry price × entry fee rate, plus exit quantity × exit price × exit fee rate. Applying one fee only to profit or to posted margin understates this model.
Worked example
Hypothetical numbers for checking the rule and arithmetic. These are not live prices, observed backtest results, or a recommended trade. The example is a research specification; check supported settings before applying it in a simulator.
The worked trade buys 2 ETH at 2,000 USDT and sells them at 2,020. Gross profit is 40 USDT. At an illustrative 0.10% per fill, the entry costs 4.00 and the exit costs 4.04, leaving 31.96 USDT before spread, slippage and funding. The four rates in the table are research assumptions, not a quotation of any exchange's current fees.
| Fee per fill | Modeled cost (USDT) | Profit after stated cost (USDT) |
|---|---|---|
| 0% | 0.00 | 40.00 |
| 0.05% | 4.02 | 35.98 |
| 0.10% | 8.04 | 31.96 |
| 0.20% | 16.08 | 23.92 |
How to use this experiment
Keep the trade list fixed for this accounting comparison. A full strategy rerun may change position sizes when fees reduce the available balance; explain that difference rather than expecting the simple worksheet and a compounded simulation to match exactly. Partial exits incur fees on their executed value, so add every exit fill instead of charging once on the original entry value.
Record maker and taker assumptions, any minimum charge, the currency used to pay fees, and historical tier changes where available. A leveraged position still has trading fees on the modeled notional; the collateral is not the transaction value. Compare average gross profit per trade with the complete round-trip cost, and keep funding or overnight financing as a separately labelled item.
Continue the research
Research sources
Risk note
Simulations can omit execution costs and gaps. Historical results do not guarantee future outcomes.
Backtest Trading
Backtest Trading · iOS & Android
Run another setup, inspect every simulated trade, and keep your strategy research close at hand.