Navigation

    Backtrader Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

    Trading multiple instruments? #214

    General Discussion
    1
    2
    2667
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      backtrader administrators last edited by

      From Issue #214


      I'm looking into backtrader to backtest my strategy, but my strategy trades over multiple instruments. The documentation only seems to point to single instrument examples, and I can't seem to find a way to provide price data for multiple instruments, or specify an instrument for an order.

      Does backtrader support multiple instruments? In that case, could you add an example to the documentation? If no, is this feature planned any time soon?

      1 Reply Last reply Reply Quote 0
      • B
        backtrader administrators last edited by

        The documentation/blog has several examples with multiple instruments, be it with resampling of the same data or with different datas. Some examples:

        • https://www.backtrader.com/docu/data-multitimeframe/data-multitimeframe.html

        • https://www.backtrader.com/blog/posts/2015-09-03-multidata-strategy/multidata-strategy.html?highlight=correlated

        • https://www.backtrader.com/blog/posts/2016-08-15-stock-screening/stock-screening.html?highlight=tsla

        You simply have to tell the platform form which instrument to buy/sell.

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Copyright © 2016, 2017, 2018, 2019, 2020, 2021 NodeBB Forums | Contributors