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.9.4.tar.gz (873.1 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.9.4-cp313-cp313-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.13Windows x86-64

qubx-1.9.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.2 MB view details)

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

qubx-1.9.4-cp313-cp313-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

qubx-1.9.4-cp312-cp312-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.12Windows x86-64

qubx-1.9.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.2 MB view details)

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

qubx-1.9.4-cp312-cp312-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

File details

Details for the file qubx-1.9.4.tar.gz.

File metadata

  • Download URL: qubx-1.9.4.tar.gz
  • Upload date:
  • Size: 873.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for qubx-1.9.4.tar.gz
Algorithm Hash digest
SHA256 1b4cd46d14d55bf1c22b34a957e038d1656660b08d25a34bda934339abef1d61
MD5 688f60d14570e905a6afef59cb6a12d5
BLAKE2b-256 eb03599e20af97415ee33d66cc6dfd69fa3aacec845c4d67c9d98ba12d69e975

See more details on using hashes here.

Provenance

The following attestation bundles were made for qubx-1.9.4.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.9.4-cp313-cp313-win_amd64.whl.

File metadata

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

File hashes

Hashes for qubx-1.9.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 cf9faf8a75d0007cd11ef095e75df7b2cb532da2f6918144f7d5bf874b67a464
MD5 1450b4ac2e36fc98062c64dd8ff5d711
BLAKE2b-256 c926b1f60e5218fba6f3b4acb4b55c0143ec83e66f0188f9e97a6ab845edd327

See more details on using hashes here.

Provenance

The following attestation bundles were made for qubx-1.9.4-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.9.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for qubx-1.9.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a870352cbd5f9c98fb95924d281a4a9279cbcf394920587bd9684f4cd3cc649e
MD5 1b328e349b12975fcba299a81b646c6d
BLAKE2b-256 b589882bf71cc25e936b95751499ba80bf1d9fc9ed7a440dc162b63c6246441a

See more details on using hashes here.

Provenance

The following attestation bundles were made for qubx-1.9.4-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.9.4-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for qubx-1.9.4-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 48954f8a009939f56458d3c384ff53b66e4f2cc8b605ec7b7102e7f83b858533
MD5 7e64ffad3483591c37282ae7c8c2436f
BLAKE2b-256 c0e5ddde5e439ae4ad4a523a639021172e4645f6e6b5b932a61a5e48869db9e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for qubx-1.9.4-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.9.4-cp312-cp312-win_amd64.whl.

File metadata

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

File hashes

Hashes for qubx-1.9.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 0573349d65895daa6cc7a067dec098f1fc1746ecb04c490a2c522b25a184f9d5
MD5 779bdddbb59d1bbdb3520873d18a02f6
BLAKE2b-256 3133332cad21d69a1827b47d63e567a401a8ce13ca8b28866cc32587545486ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for qubx-1.9.4-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.9.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for qubx-1.9.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d522869d6c89942de9fa3e5d16ce62ae0d00fc6e85e4fc60027589a55d2b571d
MD5 c5b0906487605c48e8c9be845298d45a
BLAKE2b-256 74276bbd31713767914fcd9a4a0d84bebd9d40d85d29add0c6b7d53e180f696d

See more details on using hashes here.

Provenance

The following attestation bundles were made for qubx-1.9.4-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.9.4-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for qubx-1.9.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5f81dbd40c4b21c42add35ac25cecb0e3d682fb2910037c59ac270d64b4b6286
MD5 08503ad8b1e5018ecde16caed62235cb
BLAKE2b-256 72ecc4fab9d050e56c941f68dbea58f256d0f21195999e175970e20980d43c85

See more details on using hashes here.

Provenance

The following attestation bundles were made for qubx-1.9.4-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