kernc / backtesting.py

:mag_right: :chart_with_upwards_trend: :snake: :moneybag: Backtest trading strategies in Python.
https://kernc.github.io/backtesting.py/
GNU Affero General Public License v3.0
5.04k stars 987 forks source link

Added Order Fees #1119

Open RP1-MVac opened 4 months ago

RP1-MVac commented 4 months ago

Some brokers don't ask for a fixed commission but instead want a fee for every trade conducted. You can now add an order_fees parameter to the backtesting instance and the fees will show up in a new entry in the result.

if order_fees are not assigned nothing changes

if order_fees are assigned the final report will look like this: ... Equity Final [$] (without fees) 30228.33435 Equity Final [$] 30172.33435 ...