Coder Social home page Coder Social logo

Add brokerage fees about autotrader HOT 2 CLOSED

kieran-mackle avatar kieran-mackle commented on May 17, 2024
Add brokerage fees

from autotrader.

Comments (2)

kieran-mackle avatar kieran-mackle commented on May 17, 2024 1

Very good suggestions! The commissions scheme is something I've been wanting to improve for a little while now, and what you have suggested is a great start. Commissions are currently calculated on both the open and closing trades of a position, but they do not take into account the trade type. The fees are also not applied until the trade is closed.

I will aim to implement your suggestions in a future release. For the meantime, I have added the total fees to the printout (you will need to update to v0.5.22):
image

The fee on each trade can also be viewed via the trade summary:

bot = at.bots_deployed[0]
bot.backtest_summary['trade_summary'].head()

                           Order_ID  Order_price  ... Trade_duration      Fees
2010-01-21 16:00:00+00:00         8      56062.5  ...      3369600.0  0.033692
2010-04-12 00:00:00+00:00        77      59887.5  ...      1944000.0  0.059327
2010-05-04 16:00:00+00:00        96      58637.5  ...      5702400.0  0.034278
2010-07-09 20:00:00+00:00       172      53712.5  ...      2822400.0  0.039106
2010-08-11 20:00:00+00:00       208      54375.0  ...      1958400.0  0.032663

Thank you so much, glad you like the project!

from autotrader.

kieran-mackle avatar kieran-mackle commented on May 17, 2024

@Salyut9

Version 0.7 now allows specifying maker_commission and taker_commission arguments in the AutoTrader.virtual_account_config method. Additionally, trading costs will be calculated differently for market vs. limit orders.

Make sure to read the docs and changelog if upgrading, there have been a lot of changes!

from autotrader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.