How to use the backtesting.strategy_optimizer.strategy_test_suite.StrategyTestSuite function in Backtesting

To help you get started, weโ€™ve selected a few Backtesting examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Drakkar-Software / OctoBot / backtesting / strategy_optimizer / strategy_test_suite.py View on Github external
async def test_up_then_down(strategy_tester):
        await strategy_tester.run_test_up_then_down(None, StrategyTestSuite.SKIP_LONG_STEPS)
github Drakkar-Software / OctoBot / backtesting / strategy_optimizer / strategy_optimizer.py View on Github external
def _run_test_suite(self, config):
        self.current_test_suite = StrategyTestSuite()
        self.current_test_suite.initialize_with_strategy(self.strategy_class, copy.deepcopy(config))
        no_error = asyncio.run(self.current_test_suite.run_test_suite(self.current_test_suite),
                               debug=FORCE_ASYNCIO_DEBUG_OPTION)
        if not no_error:
            self.errors = self.errors.union(set(str(e) for e in self.current_test_suite.get_exceptions()))
        run_result = self.current_test_suite.get_test_suite_result()
        self.run_results.append(run_result)