def unify_backtests(self): """ """ # Merging all the backtests df backtest = pd.concat([ x['backtest'].loc[:, 'Symbol':'Profit_pips'] for x in self.walkforwards ]) backtest.sort_values('Exit_time', inplace=True) backtest.index = range(len(backtest.index)) backtest = pd.concat([ backtest, Backtest.calculate_cumulative_stats(list(backtest.Profit_pips)) ], axis=1) self.backtestUnified = backtest