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

perf records for multiple strategies

  • If i have multiple strategies (by 'cerebro.addstrategy(st0)' ...), how do I get perf records (pnl, trades, etc) for each strategy?

  • administrators

    Have a look at the Cerebro return values (Section: Returning the results)

    result =**kwargs)

    The format of result returned by run will vary depending on whether optimization is used (a strategy was added with optstrategy):

    • All strategies added with addstrategy

      result will be a list of the instances run during the backtesting

    • 1 or more strategies were added with optstrategy

      result will be a list of list. Each internal list will contain the strategies after each optimization run

Log in to reply

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