Metadata-Version: 2.3
Name: Qubx
Version: 0.6.4
Summary: Qubx - Quantitative Trading Framework
Author: Dmitry Marienko
Author-email: dmitry.marienko@xlydian.com
Requires-Python: >=3.10,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: ccxt (>=4.2.68,<5.0.0)
Requires-Dist: croniter (>=2.0.5,<3.0.0)
Requires-Dist: cython (==3.0.8)
Requires-Dist: dash (>=2.18.2,<3.0.0)
Requires-Dist: dash-bootstrap-components (>=1.6.0,<2.0.0)
Requires-Dist: gitpython (>=3.1.44,<4.0.0)
Requires-Dist: hftbacktest (>=2.2.0,<3.0.0)
Requires-Dist: importlib-metadata
Requires-Dist: ipywidgets (>=8.1.5,<9.0.0)
Requires-Dist: jupyter (>=1.1.1,<2.0.0)
Requires-Dist: jupyter-console (>=6.6.3,<7.0.0)
Requires-Dist: loguru (>=0.7.2,<0.8.0)
Requires-Dist: matplotlib (>=3.8.4,<4.0.0)
Requires-Dist: msgspec (>=0.18.6,<0.19.0)
Requires-Dist: ntplib (>=0.4.0,<0.5.0)
Requires-Dist: numba (>=0.59.1,<0.60.0)
Requires-Dist: numpy (>=1.26.3,<2.0.0)
Requires-Dist: pandas (>=2.2.2,<3.0.0)
Requires-Dist: plotly (>=5.22.0,<6.0.0)
Requires-Dist: psycopg (>=3.1.18,<4.0.0)
Requires-Dist: psycopg-binary (>=3.1.19,<4.0.0)
Requires-Dist: psycopg-pool (>=3.2.2,<4.0.0)
Requires-Dist: pyarrow (>=15.0.0,<16.0.0)
Requires-Dist: pydantic (>=2.9.2,<3.0.0)
Requires-Dist: pymongo (>=4.6.1,<5.0.0)
Requires-Dist: python-binance (>=1.0.19,<2.0.0)
Requires-Dist: python-dotenv (>=1.0.0,<2.0.0)
Requires-Dist: pyyaml (>=6.0.2,<7.0.0)
Requires-Dist: redis (>=5.2.1,<6.0.0)
Requires-Dist: scikit-learn (>=1.4.2,<2.0.0)
Requires-Dist: scipy (>=1.12.0,<2.0.0)
Requires-Dist: sortedcontainers (>=2.4.0,<3.0.0)
Requires-Dist: stackprinter (>=0.2.10,<0.3.0)
Requires-Dist: statsmodels (>=0.14.2,<0.15.0)
Requires-Dist: tabulate (>=0.9.0,<0.10.0)
Requires-Dist: toml (>=0.10.2,<0.11.0)
Requires-Dist: tqdm
Project-URL: Repository, https://github.com/xLydianSoftware/Qubx
Description-Content-Type: text/markdown

# Qubx

[![CI](https://github.com/xLydianSoftware/Qubx/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/xLydianSoftware/Qubx/actions/workflows/ci.yml)

## Next generation of Qube quantitative backtesting framework (QUBX)
```          
⠀⠀⡰⡖⠒⠒⢒⢦⠀⠀
⠀⢠⠃⠈⢆⣀⣎⣀⣱⡀  QUBX | Quantitative Backtesting Environment
⠀⢳⠒⠒⡞⠚⡄⠀⡰⠁         (c) 2024, by Dmytro Mariienko
⠀⠀⠱⣜⣀⣀⣈⣦⠃⠀⠀⠀
```                                          

## Documentation

See [Qubx Documentation](https://xlydiansoftware.github.io/Qubx/en/latest/)

## Installation
> pip install qubx

## How to run live trading (Only Binance spot tested)
1. cd experiments/
2. 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)
3. 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
```
4. 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 
```

## Running tests
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
```
