def test_multiple_multi_symbol_backtestings():
    symbols = ["BTC/USDT", "NEO/BTC", "ICX/BTC", "VEN/BTC", "XRB/BTC"]
    config = create_backtesting_config(load_test_config(), symbols)
    bot = create_backtesting_bot(config)
    start_backtesting_bot(bot)
    for _ in range(MULTIPLE_BACKTESTINGS_ITERATIONS):
        config = create_backtesting_config(load_test_config(), symbols)
        bot = create_backtesting_bot(config)
        start_backtesting_bot(bot)
def test_multiple_backtestings():
    config = create_backtesting_config(load_test_config(), ["ICX/BTC"])
    bot = create_backtesting_bot(config)
    previous_profitability, previous_market_profitability = start_backtesting_bot(
        bot)
    for _ in range(MULTIPLE_BACKTESTINGS_ITERATIONS):
        config = create_backtesting_config(load_test_config(), ["ICX/BTC"])
        bot = create_backtesting_bot(config)
        current_profitability, current_market_profitability = start_backtesting_bot(
            bot)
        assert previous_profitability == current_profitability
        assert previous_market_profitability == current_market_profitability
Example #3
0
def test_backtesting():
    config = create_backtesting_config(["ICX/BTC"])
    bot = create_backtesting_bot(config)
    previous_profitability, previous_market_profitability = start_backtesting_bot(
        bot)
    config = create_backtesting_config(["ICX/BTC"])
    bot = create_backtesting_bot(config)
    current_profitability, current_market_profitability = start_backtesting_bot(
        bot)

    # ensure no randomness in backtesting
    assert previous_profitability == current_profitability
    assert previous_market_profitability == current_market_profitability
Example #4
0
    def _run_backtesting_with_current_config(self, symbol, data_file_to_use=None):
        config_to_use = copy.deepcopy(self.config)
        if data_file_to_use is not None:
            for index, datafile in enumerate(config_to_use[CONFIG_BACKTESTING][CONFIG_BACKTESTING_DATA_FILES]):
                _, file_symbol, _ = interpret_file_name(datafile)
                if symbol == file_symbol:
                    config_to_use[CONFIG_BACKTESTING][CONFIG_BACKTESTING_DATA_FILES][index] = \
                        DATA_FILE_PATH + data_file_to_use + DATA_FILE_EXT

        # do not activate web interface on standalone backtesting bot
        WebService.enable(config_to_use, False)
        filter_wanted_symbols(config_to_use, [symbol])
        bot = create_backtesting_bot(config_to_use)
        return start_backtesting_bot(bot), bot
def test_simple_backtesting():
    config = create_backtesting_config(load_test_config(), ["ICX/BTC"])

    bot = create_backtesting_bot(config)
    start_backtesting_bot(bot)
Example #6
0
 def start_backtesting(self, in_thread=False):
     self.error = None
     return start_backtesting_bot(self.octobot,
                                  in_thread=in_thread,
                                  watcher=self)
Example #7
0
def test_multi_symbol_backtesting():
    config = create_backtesting_config(["ICX/BTC", "VEN/BTC", "XRB/BTC"])
    bot = create_backtesting_bot(config)
    start_backtesting_bot(bot)