⠀⠀⡰⡖⠒⠒⢒⢦⠀⠀
⠀⢠⠃⠈⢆⣀⣎⣀⣱⡀ QUBX | Quantitative Backtesting Environment
⠀⢳⠒⠒⡞⠚⡄⠀⡰⠁ (c) 2024, by Dmytro Mariienko
⠀⠀⠱⣜⣀⣀⣈⣦⠃⠀⠀⠀
pip install qubx
- cd experiments/
- Edit strategy config file (zero_test.yaml). Testing strategy is just doing flip / flop trading once per minute (trading_allowed should be set for trading)
- Modify accounts config file under ./configs/.env and provide your API binance credentials (see example in example-accounts.cfg):
[binance-mde]
apiKey = ...
secret = ...
base_currency = USDT
- Run in console (-j key if want to run under jupyter console)
> python ..\src\qubx\utils\runner.py configs\zero_test.yaml -a configs\.env -j
We use pytest
for running tests. For running unit tests execute
just test
We also have several integration tests (marked with @pytest.mark.integration
), which mainly make sure that the exchange connectors function properly. We test them on the corresponding testnets, so you will need to generate api credentials for the exchange testnets that you want to verify.
Once you have the testnet credentials store them in an .env.integration
file in the root of the Qubx directory
# BINANCE SPOT test credentials
BINANCE_SPOT_API_KEY=...
BINANCE_SPOT_SECRET=...
# BINANCE FUTURES test credentials
BINANCE_FUTURES_API_KEY=...
BINANCE_FUTURES_SECRET=...
To run the tests simply call
just test-integration