@prateek

self.array[self.idx + ago] = value TypeError: must be real number, not Timestamp

self.idx or ago is an Timestamp and must be real number (int)
try this

if you create a dict with exact same names as parameters like

backtest_config_dict = \ {'stk0_symbol': symbols_list[0], 'stk1_symbol': symbols_list[1], 'loss_limit': loss_limit, 'consider_borrow_cost': consider_borrow_cost, 'consider_commission': consider_commission, 'print_msg': print_msg, 'print_transaction': print_transaction} # Add a strategy cerebro.addstrategy(TestStrategy, stk0_symbol=backtest_config_dict['stk0_symbol'], stk1_symbol=backtest_config_dict['stk1_symbol'], loss_limit=backtest_config_dict['loss_limit'], consider_borrow_cost=backtest_config_dict['consider_borrow_cost'], consider_commission=backtest_config_dict['consider_commission'], print_msg=backtest_config_dict['print_msg'], print_transaction=backtest_config_dict['print_transaction'] )

you can go like

cerebro.addstrategy(TestStrategy, **backtest_config_dict )