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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

qubx-1.0.6.dev6-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.dev6-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.dev6.tar.gz.

File metadata

  • Download URL: qubx-1.0.6.dev6.tar.gz
  • Upload date:
  • Size: 766.6 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.dev6.tar.gz
Algorithm Hash digest
SHA256 35c8172d7a819693fd0602f783feffa0243f66be5b3385266db215d9885942e5
MD5 a9e090184485087eb496f17459a37554
BLAKE2b-256 92cca1af9119cb15b46ed0f1772ba00ce51f5ca3f4dca7a5393f22c8085ebcfb

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: qubx-1.0.6.dev6-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.dev6-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 a14a6dbf14e735bce87e7de00b4aa44b9716ef90ec8ebf422c7efe5a4bf3e60d
MD5 d8a7379ad4106562e199aa3e85b827fb
BLAKE2b-256 52abf3e22bdb39747a1e4e00fc3096c6a9443ad44cf3c7213b443b1fefb99a31

See more details on using hashes here.

Provenance

The following attestation bundles were made for qubx-1.0.6.dev6-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.dev6-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.dev6-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c69a37f4d7aa52d21145b3e27e7f4af941ace06021e7814e3c557ec0f14bb2cd
MD5 5c9d9c783ab028db1fcce27f0566a73d
BLAKE2b-256 78073428c55e77c519e65649892391ac2dbb0defb3ef02fd2afd5f242ae249f5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for qubx-1.0.6.dev6-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 62cd1e16e7d6b2703eaef0ed11edeacd7152416dd156eba2fe8b9077e4b993f9
MD5 9f88480bb449270d79ba6d6709694d02
BLAKE2b-256 791ac3cf599371de7659eafe53bc5c89723cc4b6f9f0164340beda707f2dffbb

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: qubx-1.0.6.dev6-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.dev6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 872ca7eb3535195f76be2e9c5c3863ce73915acdb6fa6d06ec73d8892edb0388
MD5 c5d4eaec6b798551056121acdf9289ea
BLAKE2b-256 31207984882f148b0575dfd1252eecc642206f1604308ac0c0edc26b85dc4625

See more details on using hashes here.

Provenance

The following attestation bundles were made for qubx-1.0.6.dev6-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.dev6-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.dev6-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 31286674120f15fc61dd560e7b9ea4d366162ead3a3eff192538d75950db07ce
MD5 ab8a5560a3050dc4b2405c058f3d189c
BLAKE2b-256 283bda05ac8e409e52b615dd6536ea27f50461f90e753f747e33e5911ec7d9ea

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for qubx-1.0.6.dev6-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4652e0dc9938a029dd4e414c385dc55126642e568644d7a94e9d82ecc1b3a0c5
MD5 fdb3c04459f4b24926fdcd57398a1868
BLAKE2b-256 f06638dd6c93e786d871412041776aba925eecdc2202587954e03abde9a4d95b

See more details on using hashes here.

Provenance

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