For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
2019-10-02: The community is currently in read-only mode

Multiple strategies



  • Hi,

    I understand that the concept of multiple strategies has been discussed in many threads.

    If I got it correctly, since there is one broker per cerebro and the broker holds positions by data and not by (data, strategy), strategies won't work independently i.e. whatever functionality is based on position will 'work' on the total position and not just the position of the strategy itself. However, orders and trades seems to be independent per strategy.

    I would be interested to have some feedback on how to manage multiple strategies. I guess:

    • you can have different cerebro, one per strategy, but then communication/synchronisation won't be easy.

    • or have a different sizer per strategy and have each strategy keeping track of its own position, value, etc. I am not sure whether observes, analysers, etc would work on strategy level.

    I would highly appreciate any feedback and ideas on this.

    Many thanks


  • administrators

    @momentum said in Multiple strategies:

    If I got it correctly, since there is one broker per cerebro and the broker holds positions by data and not by (data, strategy), strategies won't work independently i.e. whatever functionality is based on position will 'work' on the total position and not just the position of the strategy itself

    It's a single account broker. And an asset is an asset and not a strategy dependent asset.

    @momentum said in Multiple strategies:

    However, orders and trades seems to be independent per strategy.

    Because they are issued by independent strategies.

    @momentum said in Multiple strategies:

    • you can have different cerebro

    No. Well yes. You can write custom code to coordinate anything you imagine.

    @momentum said in Multiple strategies:

    • or have a different sizer per strategy and have each strategy keeping track of its own position, value, etc. I am not sure whether observes, analysers, etc would work on strategy level.

    Sizers don't keep track of position, value or other things. Analyzers do analyze what the broker does.


Log in to reply
 

});