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.6.dev7.tar.gz (772.0 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.6.dev7-cp313-cp313-win_amd64.whl (1.9 MB view details)

Uploaded CPython 3.13Windows x86-64

qubx-1.0.6.dev7-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.0 MB view details)

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

qubx-1.0.6.dev7-cp313-cp313-macosx_11_0_arm64.whl (1.8 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

qubx-1.0.6.dev7-cp312-cp312-win_amd64.whl (1.9 MB view details)

Uploaded CPython 3.12Windows x86-64

qubx-1.0.6.dev7-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.0 MB view details)

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

qubx-1.0.6.dev7-cp312-cp312-macosx_11_0_arm64.whl (1.8 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

File details

Details for the file qubx-1.0.6.dev7.tar.gz.

File metadata

  • Download URL: qubx-1.0.6.dev7.tar.gz
  • Upload date:
  • Size: 772.0 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.6.dev7.tar.gz
Algorithm Hash digest
SHA256 7d93b34c1463a626ef46f373cedb57a198a64003a18324c8dd7417723c15e0d9
MD5 7e32350208596cd109d25f2f71e6353e
BLAKE2b-256 3976cf8a4b0b634a2d72949d20880263fa1fdca06565d1de0309d8247c200819

See more details on using hashes here.

Provenance

The following attestation bundles were made for qubx-1.0.6.dev7.tar.gz:

Publisher: release.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.6.dev7-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: qubx-1.0.6.dev7-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 1.9 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.6.dev7-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 3e6714c648039e359e35bfea8436b8f5007d5423286f0a60e0ff211e17fa0624
MD5 254f5c4347ba55a79a788f1079307848
BLAKE2b-256 230476f0d54745a77be0af2aa530bf78d6d524dfe29f5c46e2b000b4931b04f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for qubx-1.0.6.dev7-cp313-cp313-win_amd64.whl:

Publisher: release.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.6.dev7-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.6.dev7-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e8ac422068870dff58e3db090069e23eab90f9ff998c15fd0c582f2368a2c7aa
MD5 c60cfab126d4485a252461e7295b8aa3
BLAKE2b-256 c38c973b618863d9e5deb924efc81f9dead5e3fa1edff0c3b3f3d6083aaf9a70

See more details on using hashes here.

Provenance

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

Publisher: release.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.6.dev7-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for qubx-1.0.6.dev7-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 db7ae85523d96d91cd4a1c82bc466123ae25aa7ff19a2e33f798ac22e9c96ab0
MD5 8b8ff511e41805e74bf86fa3875484c9
BLAKE2b-256 1791c4386e610ae2a5043e853963973665c30486f6505296ab572658b196f6b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for qubx-1.0.6.dev7-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: release.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.6.dev7-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: qubx-1.0.6.dev7-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 1.9 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.6.dev7-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 da6f15d05f1a0efc82a81ea0a658e1f8319204028a456900f833370bf42d176e
MD5 73f7f50e0d640e1ad9842ce2dac246c2
BLAKE2b-256 9a458333aac092c5aa87d244b0fc0944ffd017cc10b4a3d87c4871d82bfeec16

See more details on using hashes here.

Provenance

The following attestation bundles were made for qubx-1.0.6.dev7-cp312-cp312-win_amd64.whl:

Publisher: release.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.6.dev7-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.6.dev7-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bfcaab60a9936f080362135f241238a828aecfd2ae5bd03c45350a93f6ba4f40
MD5 c9577977208125221524481bf2123772
BLAKE2b-256 a527a9f0199ad6891eda51e5bab3c0c1ed79e9ee205630ad1d9443ae599dd37c

See more details on using hashes here.

Provenance

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

Publisher: release.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.6.dev7-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for qubx-1.0.6.dev7-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 748f125edc4d0b2fbf6dbe1b1c659fec72b53aa706951821e128457a84037046
MD5 b6c109b7fe50c858bc542a790452d6b0
BLAKE2b-256 4fe20f1c72f96b407d1ba3df84e638d48bf576bac472ee74771ac94a30820d59

See more details on using hashes here.

Provenance

The following attestation bundles were made for qubx-1.0.6.dev7-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: release.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