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

strategy performance on multi-data

  • Hi:

    I just read post MULTI-EXAMPLE and multi-data strategy.

    If I simple trade a strategy simultaneously on two different data feed, and I want to compare the same strategy performance on two different symbols.

    1. do the two different data have to be the same length? e.g., one data starts from 2000 and the other is from 2010
    2. how do I obtain the performance of the strategy on the two data respectively?
    3. within the strategy, is there a way to know how many datafeeds are added to the cerebro? For example, does the following code work?
    for d in self.datas 
        o1 =, exectype=bt.Order.Market)


Log in to reply

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