Skip to main content

Qubx - Quantitative Trading Framework

Project description

Qubx - Quantitative Trading Framework

CI

⠀⠀⡰⡖⠒⠒⢒⢦⠀⠀
⠀⢠⠃⠈⢆⣀⣎⣀⣱⡀  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

just install

2. Create a Strategy

# 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

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

# 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

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

pip install qubx

Development Setup

  1. Clone the repository
  2. Install dependencies using uv:
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:

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:

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 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).

About xLydian

Qubx is developed by xLydian.

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 file for details.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qubx-1.0.0.dev4.tar.gz (746.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

qubx-1.0.0.dev4-cp313-cp313-win_amd64.whl (1.8 MB view details)

Uploaded CPython 3.13Windows x86-64

qubx-1.0.0.dev4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

qubx-1.0.0.dev4-cp313-cp313-macosx_11_0_arm64.whl (1.7 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

qubx-1.0.0.dev4-cp312-cp312-win_amd64.whl (1.8 MB view details)

Uploaded CPython 3.12Windows x86-64

qubx-1.0.0.dev4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

qubx-1.0.0.dev4-cp312-cp312-macosx_11_0_arm64.whl (1.7 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

File details

Details for the file qubx-1.0.0.dev4.tar.gz.

File metadata

  • Download URL: qubx-1.0.0.dev4.tar.gz
  • Upload date:
  • Size: 746.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for qubx-1.0.0.dev4.tar.gz
Algorithm Hash digest
SHA256 8054691ac7e67ee86a26b806b55e99ee63a3891e7702c4093d9163dc7f2b7905
MD5 46dbb29c4b4decf4bf4ab59e3fb56a07
BLAKE2b-256 b6f6f527af7e70d5d7ab93cc9c9f0f3d3154f90a363529a4dea7a45de6ac3f97

See more details on using hashes here.

Provenance

The following attestation bundles were made for qubx-1.0.0.dev4.tar.gz:

Publisher: build-publish.yml on xLydianSoftware/Qubx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qubx-1.0.0.dev4-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: qubx-1.0.0.dev4-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 1.8 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for qubx-1.0.0.dev4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 9a617a979b5e8f6ed54367417bbc19e68b9ecdbaef18602e70e84d69b8474cd7
MD5 c065ef7e115b624ffc04283af0ec2366
BLAKE2b-256 9fcaa87b7796db353ded913e1bdb56d9888f3fd1e330182fed9e69140ece1f11

See more details on using hashes here.

Provenance

The following attestation bundles were made for qubx-1.0.0.dev4-cp313-cp313-win_amd64.whl:

Publisher: build-publish.yml on xLydianSoftware/Qubx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qubx-1.0.0.dev4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for qubx-1.0.0.dev4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 969c44c9b740c216bda2c84ec40d872e8bd94682e3c00f20f259994dd88280dc
MD5 00facfdd3f5baf142d36c003007c89f7
BLAKE2b-256 4bd9727efca2b0558d3134bcb64cabb1c430bf2ad783265e688ae4600f0c3acc

See more details on using hashes here.

Provenance

The following attestation bundles were made for qubx-1.0.0.dev4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build-publish.yml on xLydianSoftware/Qubx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qubx-1.0.0.dev4-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for qubx-1.0.0.dev4-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3631270810010e5a3675ab87ee27d2cde30e8c553204a88be4269aba80a71652
MD5 8d3b1abc21bd7e7a2ea5d567ae7ac04d
BLAKE2b-256 5e30d96c25e99bb12371eeab76d4881aeb7ab241d414bf233bdd1f18f4d4decf

See more details on using hashes here.

Provenance

The following attestation bundles were made for qubx-1.0.0.dev4-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: build-publish.yml on xLydianSoftware/Qubx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qubx-1.0.0.dev4-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: qubx-1.0.0.dev4-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 1.8 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for qubx-1.0.0.dev4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 dcf19e4fcbc67b36de0ce241cee38e37655df133b1e6c574c434c339e93bff55
MD5 cac9c16601368d7a23fb97b9c8482565
BLAKE2b-256 71f99743ab0fdfa9dc0b41dbb5221844c29553a70e1aa716f94913d3a4676905

See more details on using hashes here.

Provenance

The following attestation bundles were made for qubx-1.0.0.dev4-cp312-cp312-win_amd64.whl:

Publisher: build-publish.yml on xLydianSoftware/Qubx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qubx-1.0.0.dev4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for qubx-1.0.0.dev4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 480a97a681d879d89a481a529437ef066941a98d2e841adb8b9c1c37da78c211
MD5 d4c218297c9a2c8d2d49df4e9c21b905
BLAKE2b-256 724590a86b65c366cb269a921b79a27d40f57f7aca974f83a84781641000075f

See more details on using hashes here.

Provenance

The following attestation bundles were made for qubx-1.0.0.dev4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build-publish.yml on xLydianSoftware/Qubx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qubx-1.0.0.dev4-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for qubx-1.0.0.dev4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 94bae01ee09f7d5cce83ce457822591845affa5f9dbd247586de3809b251ddd4
MD5 52aea1e22ca0c39fe897119d87908bf9
BLAKE2b-256 d1f3bbcc1799df0974a9547f7937589e3d938dfb7c1028496e0d7ce52f6bb4b3

See more details on using hashes here.

Provenance

The following attestation bundles were made for qubx-1.0.0.dev4-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: build-publish.yml on xLydianSoftware/Qubx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page