Run backtests from terminal without Python — maximum speed for CI/CD pipelines
No Python runtime, GIL, or PyO3 bindings
Binary launches in milliseconds
Easy integration with pipelines
Automate via bash/zsh
# Build optimized release binary
cargo build --release
# For development (no license required)
cargo build --release --features offline_license
# Binary location
./target/release/rlx-cli --helpRun backtest using JSON rules file — no pre-calculated signals needed.
./target/release/rlx-cli rules-backtest \
--data data/BTCUSDT_1h_with_indicators.csv \
--rules strategies/rsi_strategy.json \
--capital 100000 \
--commission 0.001 \
--output results.json| Argument | Description | Default |
|---|---|---|
| --data | CSV file with OHLCV + indicators | Required |
| --rules | JSON rules file | Required |
| --capital | Initial capital | 100000 |
| --commission | Commission rate | 0.0 |
| --dashboard | Launch web dashboard | false |
| --output | Output JSON file | None |
Display information about a data file.
./target/release/rlx-cli info --data data/BTCUSDT_1h.csv
# Output: bar count, time range, available columns{
"entry_long": "RSI_14 < 30",
"exit_long": "RSI_14 > 70",
"entry_short": "RSI_14 > 70",
"exit_short": "RSI_14 < 30"
}{
"entry_rules": [
{
"condition": "RSI_14 < 25 && close > SMA_200",
"signal": "OversoldLong",
"direction": 1
},
{
"condition": "RSI_14 > 75 && close < SMA_200",
"signal": "OverboughtShort",
"direction": -1
}
],
"exit_rules": [
{
"condition": "current_drawdown > 0.15",
"reason": "PortfolioProtection"
}
],
"stop_loss_pct": 0.025,
"take_profit_pct": 0.045,
"max_hold_bars": 45
}open, high, low, close, volumeRSI_14, MACD, SMA_20 — Any CSV column BB_Upper, BB_Lower, ATR_14equity, cash, total_valuecurrent_drawdown, total_pnlposition_size, bars_in_position$ ./target/release/rlx-cli rules-backtest --data data/BTCUSDT_1h.csv --rules rules/btc_rsi.json
RLX Backtester v1.0.0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Data: BTCUSDT_1h.csv (8,760 bars)
📋 Strategy: btc_rsi.json
💰 Initial Capital: $10,000.00
Running backtest... ████████████████████ 100% (0.02s)
═══════════════════════════════════════════════════
RESULTS
═══════════════════════════════════════════════════
Performance:
Total Return: +45.23%
Sharpe Ratio: 1.87
Sortino Ratio: 2.45
Max Drawdown: -12.34%
Calmar Ratio: 3.67
Trading:
Total Trades: 156
Win Rate: 62.18%
Profit Factor: 2.31
Avg Trade: +0.29%
Risk:
VaR (95%): -1.23%
CVaR (95%): -1.87%
Ulcer Index: 4.56
Time: 0.018s | 486,667 bars/sec| Operation | Rust CLI | Python API | Winner |
|---|---|---|---|
| Startup time | 5ms | 200ms | CLI (40x) |
| 130K bars backtest | 0.1s | 0.029s | Python (3x)* |
| Memory (peak) | 50MB | 300MB | CLI (6x) |
| CI/CD Integration | Native | Requires Python | CLI |
* Python API with zero-copy numpy optimization is faster for repeated backtests (data stays in memory)