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/

    Manage multiple assets

    General Discussion
    4
    8
    2369
    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.
    • Jose Larghi
      Jose Larghi last edited by

      Hi, I'm starting with this. Please, let me ask you a conceptual question. What is the right way to manage different assets? Should I use different strategies or should I add multiple data feeds to the same strategy?

      Thanks! Regards.
      Jose.

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

        The way depends on what you want to get at the end. Since it is not clear, than it is hard to answer. I've used both ways.

        • If my answer helped, hit reputation up arrow at lower right corner of the post.
        • Python Debugging With Pdb
        • New to python and bt - check this out
        1 Reply Last reply Reply Quote 0
        • B
          backtrader administrators last edited by

          As pointed out by @ab_trader it fully depends on what you intend to do. An example of rebalancing across a set of multiple data feeds:

          • Blog - Rebalancing with the Conservative Formula - https://www.backtrader.com/blog/2019-07-19-rebalancing-conservative/rebalancing-conservative/
          1 Reply Last reply Reply Quote 1
          • Jose Larghi
            Jose Larghi last edited by

            @backtrader that article is really interesting, thanks. I want to achieve something similar, the issue is that at the beginning I don't know all the assets that I will trade. In the article you have all data feeds loaded.

            There is a way (maybe doesn't have sense) to add new data feeds "on-demand"?

            Thanks!

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

              How are you selecting assets through time?

              RunBacktest.com

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

                @run-out random

                run-out 1 Reply Last reply Reply Quote 0
                • B
                  backtrader administrators @Jose Larghi last edited by

                  @Jose-Larghi said in Manage multiple assets:

                  There is a way (maybe doesn't have sense) to add new data feeds "on-demand"?

                  There isn't and it doesn't make sense. If the data isn't loaded, there won't be any calculation on the data. When you load the data you want to calculate things which depends on the data, so you actually need to have the data loaded before that.

                  And all data feeds need to be kept in sync.

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

                    @Jose-Larghi Do you know the full universe you are selecting from ahead of time? Are you randomly selecting stocks from a known universe?

                    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