AI crypto trading bot with LSTM + LightGBM ensemble, 64.9% accuracy on 139k Bybit sequences. Triple Barrier labeling, SHAP features, HMM regime detection. Supports Bybit, Bitget, Hyperliquid.
Project description
DeepAlpha Bot
AI-Powered Crypto Trading | LSTM + LightGBM Ensemble
Autonomous crypto trading. ML-driven signals. No manual intervention.
Performance
| Metric | Value |
|---|---|
| LSTM v3 Accuracy | 64.95% (139,000 Bybit sequences, 4.5 years) |
| LightGBM Accuracy | 63.85% (v5 model, 26 coins) |
| Ensemble Accuracy | ~67% when both models agree |
| Training Data | Pure Bybit historical data (2020-2025) |
| Coins Traded | 26 liquid USDT perpetuals |
| Exchanges | Bybit, Bitget, Hyperliquid |
Install in 10 seconds
pip install deepalpha-bot
Start in 5 minutes
# Step 1: Setup (creates config, gets 7-day free trial)
deepalpha-bot setup
# Step 2: Train models (~1-2 hours, one time)
deepalpha-bot train
# Step 3: Start trading
deepalpha-bot start
That's it. The bot runs 24/7 and sends you Telegram notifications for every trade.
Architecture
Market Data (OHLCV 15m/1h/4h, funding rates, OI)
|
Feature Engine (62 raw indicators -> SHAP top-13 selection)
|
+--------------------------+
| Multi-Model Consensus |
| LightGBM (weight: 3x) | 4h timeframe
| LightGBM (weight: 2x) | 1h timeframe
| LightGBM (weight: 2x) | 15m timeframe
| XGBoost (ensemble) | cross-validation
| RandomForest (ensemble) | diversity
+--------------------------+
|
LSTM v3 Ensemble (PyTorch, 2-layer, 128 hidden)
-> Calibrated confidence (temperature scaling)
-> Boost +5% if agrees, reduce -10% if disagrees
|
Meta-Labeling Filter (removes low-confidence signals)
|
HMM Regime Gate (3-state: bull / sideways / bear)
|
Risk Management
+-- ATR-based dynamic stop-loss (2x ATR)
+-- Multi-target take-profit (T1: 1.2x ATR, T2: 2x ATR, TP: 3x ATR)
+-- Trailing stop tiers (+1% breakeven, +2% lock profit)
+-- Auto-Unstuck (graduated exit: 25% at -2%, -3%, -4%)
+-- Daily loss limit + circuit breaker
|
Smart Execution (PostOnly limit orders, 30s fill window, IOC fallback)
|
Telegram + Discord Notifications
Key Features
| Feature | Description |
|---|---|
| LSTM + LightGBM Ensemble | Deep learning (PyTorch) combined with gradient boosting. Trade only when both agree. |
| Triple Barrier Labeling | Targets based on real trade outcomes (profit/stop/time), not arbitrary direction. |
| SHAP Feature Selection | 62 indicators pruned to the 13 that actually predict. Recalculated every training cycle. |
| HMM Regime Detection | 3-state Hidden Markov Model. No longs in bear markets, no shorts in bull markets. |
| Multi-Timeframe Voting | 15m + 1h + 4h models vote with weighted consensus. Reduces noise, increases conviction. |
| ATR Dynamic Risk | Stop-loss and take-profit scale with volatility. Tight in calm markets, wide in volatile ones. |
| Auto-Unstuck | Graduated position reduction at -2%/-3%/-4% instead of instant full stop-loss. |
| Maker-First Execution | Limit orders save ~60% on fees. Automatic re-pricing if not filled. |
| 26 Liquid Coins | BTC, ETH, SOL, BNB, DOGE, AVAX, LINK, ARB, OP, APT, SUI, INJ, TIA, WLD, NEAR, AAVE, DOT, ADA, XRP, LTC, BCH, CRV, ONDO, ENA, JUP, RENDER |
Configuration
After deepalpha-bot setup, edit config.json:
{
"MAX_POSITIONS": 3,
"LEVERAGE": 5,
"MAX_DAILY_LOSS": 200,
"MAX_RISK_PER_TRADE_PCT": 0.25,
"CIRCUIT_BREAKER_LOSSES": 5
}
| Setting | Default | Description |
|---|---|---|
| MAX_POSITIONS | 3 | Maximum simultaneous trades |
| LEVERAGE | 5 | Leverage per trade (BTC/ETH can go higher) |
| MAX_DAILY_LOSS | 200 | Stop trading after this daily loss |
| MAX_RISK_PER_TRADE_PCT | 0.25 | Max 25% of equity per trade |
| CIRCUIT_BREAKER_LOSSES | 5 | Pause after N consecutive losses |
Production Deployment (VPS)
For 24/7 trading, deploy on a VPS with PM2:
# Install PM2
npm install -g pm2
# Start bot with auto-restart
pm2 start "deepalpha-bot start" --name deepalpha
# Persist across reboots
pm2 save && pm2 startup
Recommended: any VPS with 1GB+ RAM (Hetzner, DigitalOcean, Vultr).
CLI Commands
| Command | Description |
|---|---|
deepalpha-bot setup |
Interactive setup + 7-day free trial |
deepalpha-bot train |
Train AI models on historical data |
deepalpha-bot start |
Start live trading |
deepalpha-bot status |
Check equity, positions, daily PnL |
deepalpha-bot version |
Show installed version |
Pricing
| Plan | Price | Details |
|---|---|---|
| Free Trial | $0 | 7 days, all features included |
| Pro | $39/month | Cancel anytime |
| Lifetime | $199 one-time | Unlimited updates |
Start free: deepalpha-bot setup or visit deepalphabot.com
Don't want to run your own bot?
Copy Trading — Mirror our live trades on Bybit with zero setup:
Disclaimer
Trading cryptocurrency involves significant risk of loss. Past performance, including backtested results, does not guarantee future returns. This software is provided as-is without warranty. Only trade with capital you can afford to lose. This is not financial advice.
DeepAlpha — Quantitative crypto trading for everyone.
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
Built Distribution
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 deepalpha_bot-1.1.0.tar.gz.
File metadata
- Download URL: deepalpha_bot-1.1.0.tar.gz
- Upload date:
- Size: 110.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7e4402006a16b1dbebb7767daaf836e58a9b1b70a7565f496a4a802e0bcc374
|
|
| MD5 |
9ece801834a6aa5b4ae5935046ad8662
|
|
| BLAKE2b-256 |
d139882f1ac8a9879169a62590f45e86141d04aaccc2fc36ff0800daa2aab3a5
|
File details
Details for the file deepalpha_bot-1.1.0-py3-none-any.whl.
File metadata
- Download URL: deepalpha_bot-1.1.0-py3-none-any.whl
- Upload date:
- Size: 111.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1fed44e4b40f596615015876c24615786acbc443a82af7276e07ebba48a489e3
|
|
| MD5 |
9590d48937c18e4a3cfd96d70eb9e2f5
|
|
| BLAKE2b-256 |
8eb9a653890d6330cf35a45c0ccec8e3903290dcfcf134daee1a88dbfc655af2
|