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/

    How to handle multi-products with different date range?

    Indicators/Strategies/Analyzers
    3
    3
    57
    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.
    • N
      nash_hk last edited by

      Let's say we have a macro indicator to buy or sell treasury notes, or any product that expires for that matter. For a given date, there would be a certain set of notes from which to buy or sell. How can Backtrader handle that in data feeds, I can pass all the products data feeds from the note inception to expiry. But then, all data feeds will won't have same start and end date.

      1 Reply Last reply Reply Quote 1
      • A
        ab_trader last edited by

        bt can handle as many data feeds as you pass, also it doesn't matter for bt what are the data feed lengths. Script written should check if data feed prices are available at the moment, specify what to buy and what to sell etc.

        run-out 1 Reply Last reply Reply Quote 1
        • run-out
          run-out @ab_trader last edited by

          @ab_trader Not sure if this is an issue since I did this a long time ago.... But when i was putting in stocks for an asx200 analysis going back a long time, some of the stocks didn't have data either at the beginning or the end. I had to at the time use pandas to fill in the beginning and ends with zeros before passing this into backtrader. Again, I was pretty green with backtrader then so not sure if this practice is necessary or not.

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Copyright © 2016, 2017, 2018 NodeBB Forums | Contributors
          $(document).ready(function () { app.coldLoad(); }); }