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

Uploaded CPython 3.13Windows x86-64

qubx-1.2.2.dev1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.1 MB view details)

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

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

qubx-1.2.2.dev1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.1 MB view details)

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

qubx-1.2.2.dev1-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.2.2.dev1.tar.gz.

File metadata

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

File hashes

Hashes for qubx-1.2.2.dev1.tar.gz
Algorithm Hash digest
SHA256 9397aa6f2c65997c9ad1d5039c2a6a4be28854b7a71610a96e7b9cf87c8b5dd3
MD5 dd7c5ae08e994bb1fc6b03e6fa027c65
BLAKE2b-256 41bac8228650a005ac77e5540ea354ff625d1ae99631971b6c3500965fbe4dc7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: qubx-1.2.2.dev1-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.2.2.dev1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 c7e779e716e939c9fafbf5ad6731c449dab2df72b67993a787cbaf0bb9e8709e
MD5 59d33142473de238c102fd79cdcb2548
BLAKE2b-256 393696d778c464753fdbf47b7d86e741858c4425f1240e743f752d66fec64b3c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for qubx-1.2.2.dev1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1f4b73ed946457f902cc108289bb43e5810e01bff4ee7c3d3e07361ec6352e94
MD5 145666339e5100103ec55b7dbc106a18
BLAKE2b-256 312a1b882a44501c73ef176bf9e1eb4641840fff92a6e93fb3295b1fb703506e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for qubx-1.2.2.dev1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a5e4fcab81cbde30bf0cd683014db4ca753390004b715bde4b4bf60feb6efcb9
MD5 57be5ce2fdb6a7977df52092399154b6
BLAKE2b-256 e3ae0c22806deaa367a4a8f055a1b9e1845ffec0dc214f0cd727dbfc15a3f5d0

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: qubx-1.2.2.dev1-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.2.2.dev1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8a4f16f65311740cb1b4e132accec40368f287e46cf8fe77f2a034511fcf7b7a
MD5 59de5c580885f2fa1b0d4f4b5dc3cd13
BLAKE2b-256 8983e028860c03a990e2783095275eb4f5a1c0dc9fd0628d30cd9a73349b6453

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for qubx-1.2.2.dev1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fb0d7bade26ff2307621c70f07c0ede2dc6e20980b073b5c762b486bc3c6302f
MD5 2d41cb7056f0c35b1737e109724f9b19
BLAKE2b-256 18cca5b6f4fdffbbba81f7991673560c0138bbd7c3172e6e3ee48dadd8e9587d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for qubx-1.2.2.dev1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 88719a7b15874d8224730f5690c0272498343b4c74225f3d26123b1cc1a715bf
MD5 f02f1c0216ba28d8fc4d2c65b1840b07
BLAKE2b-256 9e9ea7dbc3fe83e3e4f6ccd531abca01fb23e5961b7f57d5047369891cbbf99d

See more details on using hashes here.

Provenance

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