Fast trading backtester written in Rust
Project description
🚀 RLXBT: Institutional-Grade Rust Backtesting SDK
RLXBT is an ultra-high-performance algorithmic trading backtesting engine. Built in Rust with a zero-copy Python API, it offers the speed of a vectorized engine with the precision of a full event-driven simulation.
🔥 Why RLXBT?
- Insane Performance: Process over 4.5 Million bars per second. Built for professional quant researchers who can't afford to wait hours for a single optimization.
- Event-Driven Precision: Unlike vectorized-only tools, RLXBT performs full per-bar simulation, supporting complex order types, intrabar resolution, and realistic slippage.
- RL-Native: The only backtester with built-in Reinforcement Learning (OpenAI Gym) support, including graph-based market observations and advanced reward shaping.
- Institutional Analytics: Over 30 metrics including VaR, CVaR, Sharpe, Sortino, Ulcer Index, and comprehensive drawdown analysis.
- Declarative JSON Strategies: Define complex trading logic using simple JSON rules (Simple or Graph formats), perfect for rapid prototyping without writing a single line of Python.
- Rust Native CLI: A standalone, ultra-fast binary to run backtests, optimize data, and convert CSVs to binary chunks without Python overhead.
💎 Features at a Glance
⚡ Core Engine (Rust)
- Zero-Copy Memory: Direct access to Numpy buffers for zero overhead.
- Intrabar Resolution: Simulate price action inside a candle (High-first vs Low-first) for high-precision TP/SL execution.
- Multi-Strategy Portfolios: Combine and optimize multiple strategies with unified capital management and rebalancing.
�️ Standalone Rust CLI
rlx-cli rules-backtest: Run backtests directly from JSON strategy files and CSV data.rlx-cli convert: Optimize CSV data into binary chunk formats for instant loading.rlx-cli dashboard: Generate interactive web dashboards directly from the terminal.
�📊 Professional Analytics
- Stability Analysis: Built-in Monte Carlo simulations and Walk-Forward Analysis (WFA).
- Graph Analyzer: Identify winning streaks, loss recovery patterns, and correlation clusters via graph theory.
- Parameter Sensitivity: Automatically identify which parameters actually drive your performance.
🧠 AI & Reinforcement Learning
- Gymnasium Compatible: Seamless integration with Stable-Baselines3 and other RL frameworks.
- GNN-Ready: Graph-based observations for Graph Neural Networks.
- Separation of Concerns: RL agent learns Entry Timing, while dedicated Exit Controllers handle Risk Management.
📝 Declarative JSON Strategies
Define your strategy logic without writing boilerplate code. Supports multi-indicator confirmation and portfolio-aware conditions.
{
"entry_rules": [{
"condition": "RSI_14 < 30 && close > SMA_200 && current_drawdown < 0.10",
"signal": "InstitutionalLong",
"direction": 1
}],
"exit_rules": [{
"condition": "RSI_14 > 70",
"reason": "TakeProfit_Overbought"
}],
"stop_loss_pct": 0.02,
"max_hold_bars": 48
}
💰 Pricing & Plans
RLXBT requires a valid license key. Sign up at rlxbt.com/pricing.
| Feature | Starter ($29/mo) | Pro ($79/mo) | Institutional ($499/mo) |
|---|---|---|---|
| Max Bars | 500K | Unlimited | Unlimited |
| Metrics | 10 Core | 30+ Institutional | All + VaR/Risk |
| RL Environment | ❌ | ✅ | ✅ (Multi-Asset) |
| Portfolio Manager | ❌ | ✅ | ✅ |
| Advanced Tools | JSON Rules | MC, WFA, Graph | WF-ML, Custom API |
| Support | Community | Priority (4h) |
🚀 Quick Start
Installation
pip install rlxbt
Basic Strategy
import pandas as pd
from rlxbt import Strategy, Backtester
class SmaCross(Strategy):
def generate_signals(self, data):
sma = data['close'].rolling(20).mean()
signals = pd.DataFrame(index=data.index)
signals['signal'] = (data['close'] > sma).astype(int)
return signals
# Initialize with your license key
bt = Backtester(license_key="your_key_here")
# Run backtest
data = pd.read_csv("market_data.csv")
results = bt.run(SmaCross(), data)
print(f"Total Return: {results['total_return']:.2%}")
bt.plot(data) # Launch interactive dashboard
🔗 Links
- Official Website: rlxbt.com
- Full Documentation: rlxbt.com/docs
- Pricing: rlxbt.com/pricing
🏛️ Commercial Use
RLXBT is a commercial product. While you can download the package freely, a paid license is required for live strategy research and production execution.
© 2025 RLX Backtester. All rights reserved.
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 Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rlxbt-0.1.1-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: rlxbt-0.1.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
761cdb0b5e2404a0d3413cf7e297a8ff4661510600a8e745a72eeabc3c69a886
|
|
| MD5 |
7c4e279e7497dda0224f40080b806bc8
|
|
| BLAKE2b-256 |
b3b583cc18788d45e39a314bb0b1cd4cfda0374f4d77dfd5d2360b2e232ad0e1
|
File details
Details for the file rlxbt-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: rlxbt-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 3.9 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
befa9f8296dd1d490e7c4a6e15adc28f1ba8568b18ec12b70b76e6cceaf533cb
|
|
| MD5 |
c862ea853e569fd41d78594cadc29e72
|
|
| BLAKE2b-256 |
d1a6a5bce4fade506cbed9dd0b1a096d88c746efc99291a1b460de412af87056
|
File details
Details for the file rlxbt-0.1.1-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: rlxbt-0.1.1-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 3.6 MB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ece04923cc122b2290a0718e36d9f7f186ab4536edda9748c480df4bd50bbbf2
|
|
| MD5 |
1765dca40abcdf6df76904ef3f0d7a0f
|
|
| BLAKE2b-256 |
d3f58ace90c2bc887e232cfb6a5526edb844e152a8b42e27f8d87a6b5fcc2b48
|
File details
Details for the file rlxbt-0.1.1-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: rlxbt-0.1.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2af7914cbb7c20dbc9a252a83a565df1a3827562a3d17a63f5e86e980f621be0
|
|
| MD5 |
dccf602552d66a8834841d0f5fadf8fc
|
|
| BLAKE2b-256 |
bda01511e8bcd64028b185ce1c0878f0f8fd45252367aeb723711a15df4fab95
|
File details
Details for the file rlxbt-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: rlxbt-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 3.9 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92b6589556c7669090b6728ae81e139b6e573a9310157b84cdee0c489291838d
|
|
| MD5 |
735048f9d287656e01040a8508b67935
|
|
| BLAKE2b-256 |
16831fb9d3fcecf0ec9f362b9f411c16dc50ac908494f9dcaf1723c4796e69c0
|
File details
Details for the file rlxbt-0.1.1-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: rlxbt-0.1.1-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 3.6 MB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30db047128c5c6af963b46f9d4a5196b05b0657ffaa1419bc785e19e5476ffb0
|
|
| MD5 |
f9099f9f3163864c439e55b88a90f29a
|
|
| BLAKE2b-256 |
75ae29681c48a7a2439e2fb6c71979d22ccb26b607197b0075844cbfc0294ef8
|
File details
Details for the file rlxbt-0.1.1-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: rlxbt-0.1.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25a939a7cb53ecf21baeb38ebd00b7a32e8e2a7adb23a984620f71ce03e2acc4
|
|
| MD5 |
3a46434b85126d2bc1dee88fd229003e
|
|
| BLAKE2b-256 |
d7a95d5db0db48dbebc3996b931835560b450df95f9a56f63b6669930287e760
|
File details
Details for the file rlxbt-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: rlxbt-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 3.9 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb6a8b564bfb56207b3c1870602e2f32a212509564dd839c4c3a86d9864bc30d
|
|
| MD5 |
a20e6a8e7c9c2763ce55beef9f9a9e85
|
|
| BLAKE2b-256 |
f12545e1a6e3abe39162609aec606a2046402b73dedaae04902d370fb51f9a44
|
File details
Details for the file rlxbt-0.1.1-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: rlxbt-0.1.1-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 3.6 MB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f324a9fd70ccefea6c00455d493a0bea39913bcb1eb3ed8ed6259dc17cf576e0
|
|
| MD5 |
acc5e03507910799b45131236b83da54
|
|
| BLAKE2b-256 |
e38ae6ba345ee4e0d6cb4ccfd99395b183e90db4e67f8d03180e215cf569ec68
|