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 2.0?



  • Just wondering what is the status of backtrader 2.0?
    Or will there ever be one?


  • administrators

    Let's put it the other way round

    What are you missing?

    Do you need something which is in a perpetual beta (or even alpha) state like many Android/iPhone applications? (always promising and always failing to deliver)



  • I think the Chart functionality can be enhanced, for example, to visualize the process of back testing (just like the strategy tester in MT5), instead of show the chart only after the testing is done, so that it is easier to watch how the strategy works in each step from the chat.



  • I would also be interested to learn about your stance regarding the future of Backtrader. I am not demanding anything but just knowing what your plans are (or are not) would help everyone to make good decisions in my opinion.

    @backtrader said in Backtrader 2.0?:

    Let's put it the other way round

    What are you missing?

    While Backtrader is awesome already (you did a hell of a job actually, thank you) here are some ideas:

    • an external interface that makes integrating backtrader in other system or further processing easy. It could be MQTT, ZeroMQ, HTTP/Rest or whatever. It could fire events when trades happen, a bar moves or whatever...
    • Speedup backtrader (poor Python) for example by implementing parts of it in Cython. Would probably mean profiling to find bottlenecks to know where to start
    • As already mentioned the plotting could be improved. Maybe even a (web-based) interactive UI?
    • Support user-defined custom data to take into account (like fundamental data or even weather data if the user wants to)
    • General bugfixing. In the last year I noticed like 3 or 4 behaviors I don't understand. I guess that at least some of them are bugs actually


  • @vbs good ideas!
    @backtrader I also have some ideas,for example,we add data from csv or dataframe in one time, but our computer can not add too many data,can we use a database to get data and save data? If so,maybe,we can backtest bigger data.



  • Why not starting on some of these ideas and sharing with the community? That could be an idea, if you feel that you miss something you can always get it done for yourself.


  • administrators

    Let me address some of these topics, because there seems to be some confusion about the current capabilities of backtrader.

    @tianjixuetu said in Backtrader 2.0?:

    we add data from csv or dataframe in one time

    No, we don't. You do.

    @tianjixuetu said in Backtrader 2.0?:

    but our computer can not add too many data,can we use a database to get data and save data? If so,maybe,we can backtest bigger data

    Data doesn't have to be preloaded at once. Any size is possible and this is perfectly documented. You claim to read the source code, my recommendation: STOP READING THE SOURCE CODE and read the documentation instead, and the blog by the way.

    @vbs said in Backtrader 2.0?:

    an external interface that makes integrating backtrader in other system or further processing easy. It could be MQTT, ZeroMQ, HTTP/Rest or whatever. It could fire events when trades happen, a bar moves or whatever...

    @vbs said in Backtrader 2.0?:

    Speedup backtrader (poor Python) for example by implementing parts of it in Cython. Would probably mean profiling to find bottlenecks to know where to start

    If you have plenty of time to waste in a wild-goose chase, go ahead. The experiments (already mentioned) using many of the available hand-coded and fully optimized arrays/calculation libraries show no improvements. The Pareto rule applies: 80% of the time is spent in strategy/broker step-by-step operations and 20% in indicator precalculation.

    The only meaningful thing is already documented: use pypy.

    If that's not enough for you, it is becase:

    • Your needs demand a specific backtester which focuses on a specific use case (like a vectorized approximation of trading results)

    My suggestion is to use pandas in that case because your backtesting approximates research a lot more than backtesting.

    @Meng-Xiaofeng said in Backtrader 2.0?:

    to visualize the process of back testing (just like the strategy tester in MT5), instead of show the chart only after the testing is done, so that it is easier to watch how the strategy works in each step from the chat.

    @vbs said in Backtrader 2.0?:

    As already mentioned the plotting could be improved. Maybe even a (web-based) interactive UI?

    So we are talking about speed and we suddenly want bars being displayed as backtested. The post about performance and out of core execution shows that one can backtest well over 14,000 bars/second.

    • Would you care elaborating as to how displaying the bars interactively has to be done?

    @vbs said in Backtrader 2.0?:

    Support user-defined custom data to take into account (like fundamental data or even weather data if the user wants to)

    Data feeds and indicators can be extended with any needed data, by adding additional lines. And it is fully documented and many examples do exist.



  • @backtrader Thank you.I will read and try!


Log in to reply
 

});