Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def analyze_backtest(self, backtest):
""" Analyzes a backtest with the registered portfolio analyzers.
Args:
backtest (prophet.backtest.BackTest): a backtest object
Return:
prophet.backtest.BackTest
"""
data = Analysis()
for analyzer in self._backtest_analyzers:
data[analyzer.name] = analyzer.run(backtest=backtest,
config=self.config,
data=data)
return data