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.1.1.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.1.1-cp313-cp313-win_amd64.whl (1.9 MB view details)

Uploaded CPython 3.13Windows x86-64

qubx-1.1.1-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.1.1-cp313-cp313-macosx_11_0_arm64.whl (1.8 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

qubx-1.1.1-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.1.1-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.1.1.tar.gz.

File metadata

  • Download URL: qubx-1.1.1.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.1.1.tar.gz
Algorithm Hash digest
SHA256 2f5f91fc2c4c7156913b26cc111c01a01b30546ee740d15a34530cf6aba61f83
MD5 fa018cd16599d91e62fb84b9c2061d6a
BLAKE2b-256 401e911d3fe83bf7dabef99cb8c90486a4c827a543cc164485baeecc6a911ca6

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: qubx-1.1.1-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.1.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 e9e131dbfc3c56f0c827f7810f377e520f20f3c68dfde185be8e3baa13cdca8a
MD5 1a0cf2e0967d69bf5c185613ee1faa36
BLAKE2b-256 f8bf4f53a995a22189f212ec1d20caa0b6d2cfd5426fa36cf95dce40fe2d85e3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for qubx-1.1.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 aa1fb51b01e3445d8cb36d926a29f9ecb96fe19ef8539302dcccc50294f9bd1f
MD5 4125beddd8994d552a666228ad73d21f
BLAKE2b-256 10b67d051442d02890d75d22fb463d025e3905d88b77c31e4e1083c6062af481

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for qubx-1.1.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4e9028de8a83a562c3721e193f52625489cfe0463da18ed862303f5241daa1c7
MD5 40735d8890fcb29b2463cdaf0915df72
BLAKE2b-256 109798bd847bc14afaeaf468b597cacb99f2d3fe32f8be199bea4ed3f725f9bb

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: qubx-1.1.1-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.1.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8f47f8048c7a4be3d2cb3a27a9134dd29eb1b4d523d79db969ce96fd0275042c
MD5 93289562c95d9dba03cde6c66a172534
BLAKE2b-256 17f477c408596371d8379e3cf6b001912bfccb757fc36f4abb7cb021b7857398

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for qubx-1.1.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 056dbf78573ce89de7f5b692840ec780ba1029fc6bfd0b64914882e4908342ba
MD5 fe6f159d199e9ba0473554ba6dc56d8d
BLAKE2b-256 6519f1730b783c48690da6a40642eff379a45967fc1b766ea0196f73157180c4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for qubx-1.1.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 90d0ed15ef08fe408bb8b3a7ec56becade48f0fa6f6199dd7084ffe402c56a98
MD5 5551e3b6b2a425b075823d7886032e97
BLAKE2b-256 36d61ee2f96c5c8f7486f88c9b243e41d67b618fc8a180b9a4dbd73ec1bc925f

See more details on using hashes here.

Provenance

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