For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

Backtrader's Future



  • The purpose of this post is to see if there is an interest in forking backtrader into an ongoing and consolidated ‘living’ project.

    Currently there are a number of reasons for this:

    1. Backtrader’s creator has deservedly moved on to greener pastures and the original code is locked under his git account so no updates can be made. This will make the code stale over time and discourage new users.
    2. There are minor bug fixes that need implementing and future ones will come up with changes in the world.
    3. Many people have made great enhancements already implemented and they are not in the core system.
    4. There are many forks in various stages of development fragmenting the project.
    5. Backtrader needs to belong to the community now, not any one person.

    I would propose that we create a central ‘new’ forked backtrader with a fresh start, start with a few keen people as administrators on git. I would suggest that the order of importance for implementing would be first bug fixes and second enhancements that already exist in the world.

    We could invite people through this forum and active solicitation to bring the code enhancements to the new central backtrader.

    After that, we can look at new improvements down the road. Who knows, maybe there are people out there who would be keen to work on such a project?

    I would be prepared to house the new version and work on it. I’m hoping that in the beginning at least that some others might volunteer?

    Backtrader is an awesome library and it will surely die if we don’t organize ourselves a bit.

    Let me know your thoughts.



  • Excellent Initiative; I completely agree.
    One area that could be enhanced is the portfolio modelling / asset allocation side of things. Off course, it can be done (I have implemented Black litterman, risk parity, HRP, etc.) but maybe we could add an API with some standard models that could be overridden.
    For reporting, a nice integration with something like quantstats would be great. Also, I believe bt would deserve a stonger PR / communication. Too many times, I see people talking about Zipline, pyalgotrade (which are good platforms btw) without even mentioning by as a strong contender.



  • As was already discussed in the 'Backtrader maintenance' post, forking the repository is the only feasible way to maintain the Backtrader project, given the author's absence. And I fully support it - thumbs up.

    @run-out said in Backtrader's Future:

    There are minor bug fixes that need implementing and future ones will come up with changes in the world.
    Many people have made great enhancements already implemented and they are not in the core system.

    Since no one I guess has a full understanding of the platform yet, we probably should limit ourselves to bug fixing only, at least initially - and see how it goes.

    In addition we should probably establish a clear policy and quality levels for such fixes in some way ( like requiring mandatory review process, test coverage for each fix, and probably establishing some sort of automatic pre-commit testing - anything I'm missing ? your suggestions are appreciated). There are existing tests already in place - and we probably should utilize them and ensure those are not broken by any fix.

    As we are going to hopefully make some further releases of the package, some planning discussion should be in place, with proper quality requirements ( just a suggestion )

    I remember there were several discussions about adding new high level features and extensions and @backtrader was always suggesting to keep those as a separate projects ( like new feeds, stores, indicators ) and not part of a core - and I kind of agree with him.

    Just my 2 cents.



  • The initiative is great, but very much like @vladisld said, maintain bug fixes, start slowly. Also his point with new feeds, stores etc. is very valid.

    To not add everthing into the bt code but keep it small. I work on the oanda v20 store and would not like to put it into the bt code, since its a work in progress and many things do not work as they should.

    When there is no clear vision of the intention of the fork, it will not get anywhere. Also @vladisld point of people knowing bt in all details is very valid, there are not that many people with that knowledge.

    But overall, I support that idea, to not let bt go into limbo.



  • I support the idea and agree that first steps should be bug fixing. Even it can be boring. :) When new stable bt will be completed, than we can think (if developers will not lose interest by that time) about adding features. IMHO it should be small additions into original package, like new indicator or analyzer or observer. Stuff which is required by 95% of algotraders. Large projects as live feeds or additional graphical packages or some unique things should stay in separate repo or with their owners. We can just put a link to that projects in the bt repo.



  • Thanks everyone for the great responses. I think then we have agreement. Let's fork backtrader and make it for bug fixes for the time being. This will give us time to set up the fork properly, ensure testing works, make sure we have adequate communications, documentation etc etc.

    After a while and a few bug fixes, hopefully a few of us will have a better handle on the code. I'm personally going to commit some time trying understand the code better. Hopefully some other will too.

    Who would like to get the ball rolling with the fork? I'm happy to do it but I don't have a ton of git experience.

    Let me know your thoughts. Thanks everyone and I'm excited to take these small steps to keeping this alive.



  • I would be happy to contribute what I have to a new backtrader project. Doing the fork is easy I guess. But it needs someone to step up willing to bring the needed commitment to lead a new project.
    Also maybe better keep the discussion in the existing thread?



  • @vbs said in Backtrader's Future:

    Doing the fork is easy I guess. But it needs someone to step up willing to bring the needed commitment to lead a new project.

    Having a single project lead maybe a good thing, however it is not a must - there are a bunch of well organized projects without a clear lead (LLVM, TWS - just to name a few that I'm familiar with)

    We may create a GitHub organization with a small admin team (not a single member) and contributors team and transfer the fork to this organization. This way anyone in the admin team may fully manage the repository.

    If it is ok with everybody - I can create such an org ( let's just agree on the name please) and the fork and make a transfer.

    Any other suggestions are welcome of cause.



  • @vladisld I like this idea. I was wondering what happened to this project and have been reviewing it for my own foundation.

    I would love to help. I think we need a strong python developer on board to handle code reviews to bump the merges, or perhaps if 2 developers approve of a change it gets merged..

    As for org name, and fork name, is there a way to get the original developer to post a link to the new fork. I don't want to be flamed here but want to avoid confusion by community on versions -- should there be a name change?



  • Maybe antiquated idea but perhaps for the org/fork? Backtrader NG? or Backtrader 2020?

    Any thoughts on putting a fund together to support development/find a solid python developer to support the project?



  • Thank you @run-out for getting this conversation started. I was looking at backtrader a few months ago but because of lack of commits moved away.

    I'm back and and am prototyping this weekend a few algo ideas I have.

    Timing on this conversation is perfect as I was wondering about the need to fork and forward on.



  • @Atul-Patel Most welcome. I think Daniel made an awesome library and I want to see it at least stay alive and opening it up could do just that.

    @vladisld I'm keen to spend time working on this but shy about not having been involved in Git projects other than my own repositories. I would feel a lot better if someone with git experience would kick things off.

    As for names, I have a bunch of terrible ones.... lol...

    backtrader+=
    backtrader&
    backtrader>>> (pronounce backtrader prompt)
    backtrader_continue
    backtrader__future__

    And of course, my favourite (drums please...)

    backtrader's  back
    

    @vladisld My git is neilsmurphy

    I'm really looking forward to this.

    Cheers.



  • I support this initiative. There are frustrating bugs in BT that I lack the understanding to amend.

    Although (at this stage) what is required might be beyond my coding capabilities, I'd happily stay part of the conversation. That begin said, in the last 12 months alone by working with the BT community and reading endless amounts of code has given me a very functional platform across multiple brokers, strategies and sub-processes. I'm loving it and would like to be a part of making it better.

    I also agree with @ab_trader, BT must stay focussed on core functions and not branch out and cover all sorts of individual deployment ideas. That creativity needs to stay with the end-user.



  • @Atul-Patel said in Backtrader's Future:

    is there a way to get the original developer to post a link to the new fork

    It seems the original developer (assuming you are talking about @backtrader ) has left unfortunately, so we have to fork the repository since @backtrader was the only one with write permissions. It would be ideal to continue to work in original repository of cause, but it seems not to be an option.

    As for the name of the org/fork, suggest
    "backtrader2" (like httplib2, pygit2 ...).



  • @vladisld @run-out ‘s idea is very good。I has uesd backtrder since 2018-04, and read the sorce code at least three times, but unfortunately,I cannot totally understand the every detail, and I have fork the backtrader's code and develop it by myself,but I met many questions,it needs a lot of time to solve it.

    I agree with @vladisld's idea, we can develop a new packages,for example backtrader2,based on backtrader。

    I would like to make it better !



  • Slightly off-topic, but do you guys know what happened to @backtrader? I still see some post from him until late March 2020. After devoting so much time to this project, I would think he would try to ease this transition. No?



  • @vladisld Backtrader 2 sounds great. You going to pull the git trigger?



  • If we've got the consensus - will do. Updates will on this thread.



  • Good call with backtrader2. if you decide to involve me, than my github name is ab-trader.

    Good luck!



  • Ok, so the following was done:

    • Created the org: https://github.com/backtrader2
    • Created two teams within the org: admins, contributors
      • admins: has Admins permissions (all possible permissions)
      • contributors: has Write permissions (read, clone, push, manage issues and pull requests)
    • Forked the original mementum/backtrader repository under org: https://github.com/backtrader2/backtrader
    • Invited both @ab_trader and @run-out to the admin team ( those who provided their github ids)
    • Enabled the Issues tab.

    Questions:

    • Any others want-to-be admins ? Please either apply directly in github or provide your github id in this thread

    • Any suggestions/todos that I've missed ?

    Notes:

    • There are a 'GitHub Discussions' forum for each team - so some admin related topics could possibly be discussed there instead of polluting this community forum ( other suggestions are welcome as always )

    Thanks all for the support and interest in maintaining this wonderful project.


Log in to reply
 

});