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/

    datafeeds with cross-section OHCL data

    General Discussion
    2
    4
    78
    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.
    • G
      gstrader last edited by

      Hi, all,

      Is there to derive a feed from existing structure to support loading data from multiple dataframes, say 4 dataframes of open, high, low, close. Each DF has an index of dates and columns of various stocks? mach appreciated!

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

        @gstrader said in datafeeds with cross-section OHCL data:

        Is there to derive a feed from existing structure to support loading data from multiple dataframes,

        Yes. Please search google, the community and the docs. Use these keywords:

        backtrader, pandas, feeds, multi, multiple,

        RunBacktest.com

        G 1 Reply Last reply Reply Quote 0
        • G
          gstrader @run-out last edited by

          @run-out Apparently the best way is to loop thru columns and reconstruct the ohlc dataframe per symbol and subsequently append them to datas? Thanks.

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

            @gstrader Correct. You need to have one dataframe for each symbol, add it to cerebro, and then repeat until all your desired symbols are entered and ready for the backtest.

            RunBacktest.com

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