Esempio n. 1
0
def backtest(config: dict, data: np.ndarray, do_print=False) -> (list, bool):
    passivbot_mode = determine_passivbot_mode(config)
    xk = create_xk(config)
    if passivbot_mode == "recursive_grid":
        return backtest_recursive_grid(
            data,
            config["starting_balance"],
            config["latency_simulation_ms"],
            config["maker_fee"],
            **xk,
        )
    return backtest_static_grid(
        data,
        config["starting_balance"],
        config["latency_simulation_ms"],
        config["maker_fee"],
        **xk,
    )
Esempio n. 2
0
 async def _init(self):
     self.xk = create_xk(self.config)
     await self.init_fills()
Esempio n. 3
0
def backtest(config: dict, data: np.ndarray, do_print=False) -> (list, bool):
    xk = create_xk(config)
    return njit_backtest(data, config['starting_balance'], config['latency_simulation_ms'],
                         config['maker_fee'], **xk)