backtrader - yes, yet another python backtesting/trading framework

Discussion in 'App Development' started by backtrader, Dec 28, 2016.

  1. Seen the thread below and wanted to share mine with some people.
    Although there is a list of python platforms in the other thread (oh, not ...), I believe backtrader's repository (at the bottom of the README) contains a very comprehensive one:
    The platform includes mostly everything you would need (I guess):
    • Python based with extensive metaprogramming in the background to allow for a declarative use of the platform (definition of parameters an object takes, lines an object defines, execute operations on objects from natural arithmetic operations ...)
    • Multiple data feeds
    • Multiple strategies
    • Resampling / Replaying
    • Mixing timeframes
    • Long list of built-in indicators (you name it)
    • Dead Easy development of new indicators
    • Analyzers (Sharpe, VWR, Time Returns, Log Returns, ...)
    • Pyfolio analyzer integration
    • TA-Lib integration
    • Data Feeds from: CSV Readers (with a generic customizable one), Pandas Dataframes, Blaze, Yahoo directly online
    • Live Data Feeds: Interactive Brokers, VisualChart, Oanda
    • Live Trading: Interactive Brokers, VisualChart, Oanda
    • Multi-core optimization
    • Fully automated strategies using signals
    • Futures roll-over
    • Data Filters
    • Sizers for automatic stake calculation
    • Simulation of stock-like assets, future-like assets
    • Commission Schemes (customizable): percentage based, fixed amount base
    • Interest for short positions (and long if wished)
    • Leverage
    • A broker which can do:
      • Order types: Market, Limit, Stop, StopLimit, AtClose
        • Stop/Limit orders scan the OHLC to deliver the most approximate possible real price
      • Day, Good until Date and Good until Cancel validities
      • Target orders (size, value, percentage)
      • Cheat on Close (execute on the close of the bar being evaluated)
      • Continuous cash adjustment on each bar for future-like instruments
      • Use volume filling strategies
      • Slippage
    • Fully integrated automatic plotting (requires matplotlib)
    It is fully documented
    And the blog receives regular updates with examples, ideas, experiments.
    We know it is being used by people in 1 major EuroStoxx50 bank and in 3 Quantitative Trading firms. This is a small morale boost ... it seems not only amateurs find it useful.

    Have fun.
     
    Last edited: Dec 28, 2016
  2. BigTommy

    BigTommy

    This looks very cool. Thanks for sharing!

    How long have you been working on this?
     
  3. BigTommy

    BigTommy

    BTW, does your blog provide any sort of feed (rss/atom)? Looks like you have neat ideas, I'd like to follow it, but can't see how.
     
  4. The initial work was about 4 months experimenting to find the right API and with it came the first release in June 2015. From there onwards it has been about extending the platform using the existing core.

    The blog is linked to the community, which acts as a comment engine (should anyone have anything to comment)

    And for it the RSS link is: https://community.backtrader.com/category/3.rss
     
  5. fan27

    fan27

  6. At runtime. Any data source introduced in the system is treated as a separate data source even if one of them happens to be the resampled version of another.
     
    fan27 likes this.