For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See:

Purpose of adding multiple Strategies

  • I am aware this is probably a stupid question but still:
    What is the (main) purpose of adding multiple strategies to the mix?

    Is the purpose to have relations between strategies? E. g. strategy A only opens a position if strategy B has no positions currently?

    Or is it just for performance reasons? I could imagine that it is faster for backtrader to process multiple strategies using the same data once it has preloaded the data once anyway?
    So in the end it would be (semantically) the same as running the strategies one after the other in that case.

  • administrators

    It's not stupid. It's simply you haven't come across a use case that fits your profile. A potential use case would be a Strategy that only operates when a bullish condition is detected. The second one can act when a bearish condition is detected. In many cases they won't operate simultaneously, but there can be overlapping periods.

    Fully separating the filters that decide what's bullish and what's bearish and the associated logic for each one can help and will also let you assess the performance of each on a separate basis.

  • Thank you, that helped!

    Also I played around with it yesterday and found out (it's probably obvious to you guys) that multiple strategies can influence each other when running in parallel through the broker. When strategies are using the same broker (which is standard, I think), then broker related conditions (like current position) can influence the strategies.

  • administrators

    It is a single account broker!

Log in to reply

Looks like your connection to Backtrader Community was lost, please wait while we try to reconnect.