Metadata-Version: 2.4
Name: Qubx
Version: 1.2.0
Summary: Qubx - Quantitative Trading Framework
Project-URL: homepage, https://xlydian.com
Project-URL: repository, https://github.com/xLydianSoftware/Qubx
Project-URL: docs, https://xlydiansoftware.github.io/Qubx
Author-email: Dmitry Marienko <dmitry.marienko@xlydian.com>, Yuriy Arabskyy <yuriy.arabskyy@xlydian.com>
License-File: LICENSE
Requires-Python: <4.0,>=3.12
Requires-Dist: aiohttp<3.11,>=3.10.11
Requires-Dist: click<9,>=8.1.7
Requires-Dist: croniter<3,>=2.0.5
Requires-Dist: duckdb>=1.0.0
Requires-Dist: fastapi<1,>=0.115.0
Requires-Dist: gitpython<4,>=3.1.44
Requires-Dist: importlib-metadata
Requires-Dist: ipykernel<7,>=6.29.0
Requires-Dist: ipywidgets<9,>=8.1.5
Requires-Dist: jinja2<4,>=3.1.0
Requires-Dist: joblib<2,>=1.3.0
Requires-Dist: jupyter-client<9,>=8.0.0
Requires-Dist: loguru<1,>=0.7.2
Requires-Dist: msgspec<1,>=0.18.6
Requires-Dist: ntplib<1,>=0.4.0
Requires-Dist: numba<1,>=0.59.1
Requires-Dist: numpy>=1.26.3
Requires-Dist: orjson<4,>=3.10.15
Requires-Dist: pandas<3,>=2.2.2
Requires-Dist: prometheus-client<1,>=0.21.1
Requires-Dist: psycopg-binary<4,>=3.1.19
Requires-Dist: psycopg-pool<4,>=3.2.2
Requires-Dist: psycopg<4,>=3.1.18
Requires-Dist: pyarrow>=15.0.0
Requires-Dist: pydantic-settings<3,>=2.4.0
Requires-Dist: pydantic<3,>=2.9.2
Requires-Dist: pymongo<5,>=4.6.1
Requires-Dist: python-dotenv<2,>=1.0.0
Requires-Dist: pyyaml<7,>=6.0.2
Requires-Dist: questdb<3,>=2.0.3
Requires-Dist: redis<6,>=5.2.1
Requires-Dist: rich<14,>=13.9.4
Requires-Dist: scipy<2,>=1.12.0
Requires-Dist: sortedcontainers<3,>=2.4.0
Requires-Dist: stackprinter<1,>=0.2.10
Requires-Dist: statsmodels<1,>=0.14.6
Requires-Dist: tabulate<1,>=0.9.0
Requires-Dist: textual-autocomplete<5,>=4.0.0
Requires-Dist: textual-serve<2,>=1.0.0
Requires-Dist: textual[syntax]<7,>=6.0.0
Requires-Dist: toml<1,>=0.10.2
Requires-Dist: tqdm<5,>=4.66.0
Requires-Dist: uvicorn<1,>=0.34.0
Requires-Dist: uvloop<1,>=0.22.1; sys_platform != 'win32'
Requires-Dist: websockets==15.0.1
Provides-Extra: binance
Requires-Dist: python-binance<2,>=1.0.19; extra == 'binance'
Provides-Extra: bitfinex
Requires-Dist: qubx-bitfinex-api<4,>=3.0.7; extra == 'bitfinex'
Provides-Extra: connectors
Requires-Dist: ccxt<5,>=4.2.68; extra == 'connectors'
Provides-Extra: jupyter
Requires-Dist: jupyter-console<7,>=6.6.3; extra == 'jupyter'
Requires-Dist: jupyter<2,>=1.1.1; extra == 'jupyter'
Provides-Extra: viz
Requires-Dist: dash-bootstrap-components<2,>=1.6.0; extra == 'viz'
Requires-Dist: dash<3,>=2.18.2; extra == 'viz'
Requires-Dist: matplotlib<4,>=3.8.4; extra == 'viz'
Requires-Dist: plotly<6,>=5.22.0; extra == 'viz'
Description-Content-Type: text/markdown

# Qubx - Quantitative Trading Framework

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

```
⠀⠀⡰⡖⠒⠒⢒⢦⠀⠀
⠀⢠⠃⠈⢆⣀⣎⣀⣱⡀  QUBX | Quantitative Backtesting Environment
⠀⢳⠒⠒⡞⠚⡄⠀⡰⠁         (c) 2026, by xLydian
⠀⠀⠱⣜⣀⣀⣈⣦⠃⠀⠀⠀
```

Qubx is a next-generation quantitative trading framework designed for efficient backtesting and live trading. Built with Python, it offers a robust environment for developing, testing, and deploying trading strategies.

**Qubx is under active development.** We are continuously improving the framework and will update our documentation in the coming days/weeks. This will include comprehensive end-to-end examples for running simulations and live trading.

### Supported Data Types

Qubx supports a wide range of market data:

- OHLC (candlestick data)
- L2 Orderbook
- Liquidations
- Funding rates
- And more...

## Quick Start

### 1. Install Dependencies

```bash
just install
```

### 2. Create a Strategy

```bash
# Create a simple strategy template (default)
uv run qubx init

# Or specify a name and symbols
uv run qubx init --name my_strategy --symbols BTCUSDT,ETHUSDT
```

### 3. Run Your Strategy

```bash
cd my_strategy

# Run in paper trading mode
uv run qubx run config.yml --paper

# Or run in Jupyter mode for interactive development
./jpaper.sh
```

### Available Templates

```bash
# List available strategy templates
uv run qubx init --list-templates

# Create strategy with full project structure and MACD example
uv run qubx init --template project --name my_project
```

### Strategy Development Workflow

1. **Initialize**: `uv run qubx init` - Create strategy from template
2. **Develop**: Edit `strategy.py` to implement your trading logic
3. **Test**: `uv run qubx run config.yml --paper` - Run in paper mode
4. **Debug**: `./jpaper.sh` - Use Jupyter for interactive development
5. **Deploy**: Configure for live trading when ready

## Features

- High-performance backtesting engine
- Live trading support
- Advanced data analysis tools
- Integration with multiple exchanges
- Comprehensive strategy development toolkit
- Detailed performance analytics

## Documentation

For detailed documentation, visit [Qubx Documentation](https://xlydiansoftware.github.io/Qubx/en/latest/)

## Prerequisites

To build and run Qubx, you need:

- Python 3.11 or higher
- C/C++ compiler for Cython compilation
- uv for dependency management

## Installation

### Using pip

```bash
pip install qubx
```

### Development Setup

1. Clone the repository
2. Install dependencies using uv:

```bash
uv sync --all-extras
```

Example trading strategies can be found in the `examples/` directory.

## CLI Usage

Qubx comes with a command-line interface that provides several useful commands:

```bash
qubx --help  # Show all available commands
```

Available commands:

- `qubx init` - Create a new strategy from template
- `qubx run` - Start a strategy with given configuration
- `qubx simulate` - Run strategy simulation
- `qubx ls` - List all strategies in a directory
- `qubx release` - Package a strategy into a zip file
- `qubx deploy` - Deploy a strategy from a zip file
- `qubx browse` - Browse backtest results using interactive TUI

## Development

### Running Tests

Run the test suite:

```bash
just test
```

### Additional Commands

- Check code style: `just style-check`
- Build package: `just build`
- Run verbose tests: `just test-verbose`

## In Production

Qubx powers the [AllegedAlpha](https://app.lighter.xyz/public-pools/281474976625478) public pool on Lighter. Public pools allow users to deposit funds from their blockchain wallet into a smart contract. The pool operator manages the trading strategy, and a performance fee is taken from profits (X: [@allegedalpha](https://x.com/allegedalpha)).

## About xLydian

Qubx is developed by [xLydian](https://xlydian.com/).

- Website: [xlydian.com](https://xlydian.com/)
- X: [@xLydian_xyz](https://x.com/xLydian_xyz)
- Contact: [info@xlydian.com](mailto:info@xlydian.com)

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details.
