Skip to content
All library documents

Accounting for Trading Fees in Daily Strategy Returns

Article Quant Q&A · Author: Florent

Summary

The document considers a crypto strategy that closes one asset position and opens another each day, and asks how to reflect a fee on both trades in daily backtest returns. Its suggested simple approximation is to subtract the combined entry and exit fees from gross returns on days when the strategy switches positions. The example illustrates the arithmetic, including a first day with no prior position to close.

The answer cautions that this subtraction depends on how the exchange collects fees. If fees are deducted from the trade proceeds or assets received, realized net returns may differ from a calculation that treats fees as external cash payments. The discussion does not fully specify return compounding, position sizing, or fee timing, so a robust backtest should model the actual transaction cash flows and apply costs to the trades that incur them.

Key ideas

  • Subtracting entry and exit fees from gross returns can serve as a simple approximation when a strategy changes positions daily.
  • The first day may have different costs if no position is being closed.
  • Fee treatment depends on whether the platform deducts fees from the transaction or charges them separately.
  • Accurate net returns require matching the backtest’s cash flow accounting to the exchange’s fee structure.

Tags

Full text
# How to calculate daily return including fees?


# How to calculate daily return including fees?












I have a trading strategy that closes one position on an asset and open a new position on a different asset every day at noon. No more than one position is open at a single time. Assets are crypto currencies with very high beta so that average daily return on the period I backtest is higher than 2 * trading fees.

My algo pick-up a crypto currency on a daily basis and I use PerformanceAnalytics R package to calculate the daily return from the close prices of every currency that is selected.

I'm wondering how to include the trading fees of 0.25% (Poloniex cryptocurrencies trading platform).

Can I simply remove the fees from the daily returns ?

For example, if my daily return without fees are :

```
           Daily Return wo fees
2015-01-01 0.5
2015-01-02 1.3
2015-01-03 5.4
2015-01-04 2.6
2015-01-05 3.9
```

Then daily return including fees to close (0.25%) then re-open (0.25%) a position would be :

```
           Daily Return w fees
2015-01-01   0
2015-01-02 0.8
2015-01-03 4.9
2015-01-04 2.1
2015-01-05 3.4
```

Thank you,

## Answer by zglin (score 1, accepted)

https://quant.stackexchange.com/a/29586

If you're just looking to net out the fees from your gross returns, a-b should be relatively accurate for your backtest.

I will caution you to make sure that you're reflecting the actual structure of the fees on the trading platform. Depending on where the fees are paid out of, your true returns (in your trading system) may be different from your backtests. If your fees are paid out of the transaction, net of fee returns are calculated one way while if they are paid out externally they should be calculated another.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.