Skip to content
All library documents

How to Calculate Trading Returns After Proportional Commissions

Article Quant Q&A · Author: blue-sky

Summary

The document examines how entry and exit commissions affect an investment’s final value, contrasting a single buy-and-hold period with repeated trading across several price changes. Its central lesson is to apply each commission to the value traded at that transaction: the entry fee reduces the capital used to buy the asset, while the exit fee reduces sale proceeds. Costs therefore change with the amount being invested or sold, rather than acting as fixed deductions from the account balance.

A worked example uses stated commission rates and a sequence of returns to illustrate the proposed calculations. The answer points out that the initial calculations do not fully model transaction costs in proportion to traded capital, and describes the chronological buy-then-sell calculation. The example is deliberately simplified: commissions are assumed constant, and it does not address other trading frictions or clarify a detailed repeated-trading execution model. The main takeaway is to calculate fees at each transaction using its actual trade value.

Key ideas

  • Apply entry fees to the capital used to purchase an asset.
  • Apply exit fees to the proceeds from selling the position.
  • Transaction costs scale with the amount traded.
  • Calculate investment value in chronological order as trades occur.
  • The example omits trading frictions beyond its assumed commissions.

Tags

Full text
# Calculating returns with trading costs


# Calculating returns with trading costs












This perhaps is an over simplification of calculating trading returns while including trading costs. I've made some assumptions - the commission for investing and extracting an investment is 1% and 2% respectively. The commissions do not change over the trading period which in this case is 5 time steps. I've used Python code to perform the calculations.

Set of positive and negative percentage changes in price for a given asset over 5 time steps is `{0.031% , 0.00121% , 0.0231% , -0.0213% , -0.0121%}`.

The commission to enter an investment is 1% of the invested amount, the commission to exit an investment is 2% of the current value of the invested amount.

If I invest 1 euro in this asset, is the following correct?

1.

The final investment amount if I do not trade the investment until $t=5$ is: the final percentage change amount at $t=5$ which is `'initial invested amount' + '% change' - 'commission to enter' - 'commission to exit'`, therefore:

```
initial_investment_amt = 1

comission_in_amt = 1

comission_out_amt = 2

price_change = -.0121

return_amt = (initial_investment_amt + (price_change / 100)) - (comission_in_amt / 100) - (comission_out_amt / 100) = 0.97 which represents a loss of 1 - .97 = .03
```

2.

The final investment amount if I trade the investment at each time step until $t=5$ is:

```
initial_investment_amt = 1

comission_in_amt = 1

comission_out_amt = 2

price_change = .031

return_amt_1 = (initial_investment_amt + (price_change / 100)) - (comission_in_amt / 100) - (comission_out_amt / 100)

price_change = .00121

return_amt_2 = (return_amt_1 + (price_change / 100)) - (comission_in_amt / 100) - (comission_out_amt / 100)

price_change = .0231

return_amt_3 = (return_amt_2 + (price_change / 100)) - (comission_in_amt / 100) - (comission_out_amt / 100)

price_change = -.0213

return_amt_4 = (return_amt_3 + (price_change / 100)) - (comission_in_amt / 100) - (comission_out_amt / 100)

price_change = -.0121

return_amt_5 = (return_amt_4 + (price_change / 100)) - (comission_in_amt / 100) - (comission_out_amt / 100)

print(return_amt_1)
print(return_amt_2)
print(return_amt_3)
print(return_amt_4)
print(return_amt_5)
```

prints :

```
0.97031
0.9403220999999999
0.9105530999999999
0.8803400999999998
0.8502190999999998
```

which represents a loss of $1 - 0.85 = 0.15$.

## Answer by Hamish Gibson (score 1, accepted)

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

The easiest way to think about this would be to think of these events in chronological order. Propose you invest $100 and the commission to buy is 1%.

Then the quantity of the asset you have is `((100) - (0.01 * 100)) / buy_price_of_asset`.

Suppose you then sell the asset at a price of 110. The selling process becomes: `(110 * quantity) - 0.02 * (110 * quantity)`.

Essentially, the transaction cost is proportional to the volume you are trading with.

So in your case, both answers aren't quite fully correct. Your first one is close, as you MUST make the sum of transaction costs proportional to the capital you are trading with.

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.