Skip to main content

Fast trading backtester written in Rust

Project description

RLXBT: High-Performance Rust-Based Backtesting SDK

RLXBT is a high-performance algorithmic trading backtesting engine written in Rust with Python bindings. It provides institutional-grade tools for strategy development, portfolio management, and risk analysis.

Features

  • Ultra High Performance: Core engine written in Rust — 4.5M+ bars/sec via Python API with zero-copy optimization.
  • Pythonic API: Easy-to-use Python wrapper for strategy definition.
  • Institutional Tools: Portfolio management, risk management (VaR, Drawdown), and optimization.
  • Event-Driven & Vectorized: Hybrid approach for speed and flexibility.

Licensing

RLXBT is a commercial product requiring a valid license key for production use.

Plan Max Bars Price
Free 10K $0/mo
Starter 500K $29/mo
Pro Unlimited $79/mo
# Set via environment variable (recommended)
export RLX_LICENSE_KEY="rlx_free_yourkey_xxxx"
# Or pass directly to Backtester
backtester = Backtester(license_key="rlx_free_yourkey_xxxx")

Get your free license at rlxbt.com/pricing

See docs/LICENSING.md for full documentation.

Project Structure

  • rlxbt/: The main Python package.
    • core.py: Core bindings to the Rust engine.
    • institutional/: Institutional-grade components (Portfolio, Risk, Optimization).
  • src/: Rust source code for the core engine.
  • examples/: Example scripts demonstrating usage.
    • basic/: Simple strategy examples.
    • institutional/: Complex hedge fund workflows.
  • tests_python/: Python test suite.

Installation

Prerequisites:

  • Rust (cargo)
  • Python 3.8+
  • maturin (pip install maturin)

Build and install in development mode:

maturin develop

Usage

Basic Strategy

from rlxbt import Strategy, Backtester

class MyStrategy(Strategy):
    def generate_signals(self, data):
        # ... logic ...
        return signals

backtester = Backtester()
backtester.run(MyStrategy(), data)

# Optional: generate + launch dashboard directly from Backtester
# (uses the last BacktestResult stored in backtester.last_result)
backtester.plot(data, port=8000, auto_open=True)

Institutional Workflow

See examples/institutional/hedge_fund_demo.py for a complete example of:

  • Multi-strategy portfolios
  • Risk management
  • Capital allocation

Running Examples

python examples/basic/simple_test.py
python examples/institutional/hedge_fund_demo.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

rlxbt-0.1.0-cp312-cp312-win_amd64.whl (3.7 MB view details)

Uploaded CPython 3.12Windows x86-64

rlxbt-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

rlxbt-0.1.0-cp312-cp312-macosx_11_0_arm64.whl (3.6 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

rlxbt-0.1.0-cp311-cp311-win_amd64.whl (3.7 MB view details)

Uploaded CPython 3.11Windows x86-64

rlxbt-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

rlxbt-0.1.0-cp311-cp311-macosx_11_0_arm64.whl (3.6 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

rlxbt-0.1.0-cp310-cp310-win_amd64.whl (3.7 MB view details)

Uploaded CPython 3.10Windows x86-64

rlxbt-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

rlxbt-0.1.0-cp310-cp310-macosx_11_0_arm64.whl (3.6 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file rlxbt-0.1.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: rlxbt-0.1.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rlxbt-0.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 30dc0565ab337044ebdd7620ecb5933ad3cd511a8fc970970d31c48b1f880060
MD5 26b6877344d73166082fe16aa17a1b7e
BLAKE2b-256 63f2372583f5d869045d67315b22ae912ed5bccb4bf2f91509a4421ca7bd04e9

See more details on using hashes here.

File details

Details for the file rlxbt-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rlxbt-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4f4286a6636f7b8cb98b587636c69d0ea06470b714f3432ba0057811333065cc
MD5 42fd16284de510c914ba4d212fdfe203
BLAKE2b-256 60cd44cd0dd024c811b117c6b13043b2e358805adf084937fc486de2d128365f

See more details on using hashes here.

File details

Details for the file rlxbt-0.1.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rlxbt-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 871f73a3d0881177c364e287901eba9f0562add5d97a9c1225c0f2a1d8248fc7
MD5 37adb4e75b0fe372eda45e1fab95ebfe
BLAKE2b-256 7465be94d56f5ccd6899bec8061306e3104d06f19381440adb0d68eefd983677

See more details on using hashes here.

File details

Details for the file rlxbt-0.1.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: rlxbt-0.1.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rlxbt-0.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 27c7bcb6f6cd492323b74cd8a4b0df6fb6930b22677e3168b431315f56716890
MD5 a0a216a0fcfa949513e614ae254ea8c7
BLAKE2b-256 12647d68a30b78341a964fd0e4f78ee6a99ad9eb09f937671ee8820da88a8490

See more details on using hashes here.

File details

Details for the file rlxbt-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rlxbt-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 02ac3f7d2d9d161c2d94afea2533e7da42a1bd1989ffea42521c20992b9d2d09
MD5 27f89955357dc831d00c937e4cc5ba32
BLAKE2b-256 0d5ff5e1412cae90374e92c84691db70f3308d77c6ed76aac2bb6c18e7fdbd05

See more details on using hashes here.

File details

Details for the file rlxbt-0.1.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rlxbt-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3428353e72fd154de6c43bbd17cef63a0d717d95f5f6b040f16fd9d1a7cd1316
MD5 67842f7fd862a21a2a9e4665baba0bed
BLAKE2b-256 86c8ebdc8c0bcdf0546a6fa783491063be8130b6dd6366f42305ba820725bec3

See more details on using hashes here.

File details

Details for the file rlxbt-0.1.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: rlxbt-0.1.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rlxbt-0.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 99b5462acad626dc9e7dc65321337490c5aea62cfd1633f0f7fc39db6d46a7ca
MD5 a1ab876f3b467260c02110e223faa8d1
BLAKE2b-256 5b6a5a6fcd7d294512e703fb748e8e1bb42a5cb193b775dad04205357c58a5ac

See more details on using hashes here.

File details

Details for the file rlxbt-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rlxbt-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 26e46523360e61c445856015ed90329ff526d48b394f7e36a596c16150d2e571
MD5 40c0f44aec3b29c2655713c7a20ca1d4
BLAKE2b-256 2a196d642f84e626a40da049d0e9444176c5b44385860a21da20e5aaeb8cdfbc

See more details on using hashes here.

File details

Details for the file rlxbt-0.1.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rlxbt-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 25aded92bd5659bcbdd87c0af02703e6d761da9fd23e57a8f0c495e2218496cf
MD5 8ff86e5032b85a972e610f8e76567412
BLAKE2b-256 8bfb354edbec82620e3568307486f17b95d2c3d64c5c9b25babe0b586aab5418

See more details on using hashes here.

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