Metadata-Version: 2.4
Name: deepalpha-bot
Version: 1.1.0
Summary: 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.
Author-email: DeepAlpha <info@deepalphabot.com>
License: Proprietary
Project-URL: Homepage, https://deepalphabot.com
Project-URL: Documentation, https://deepalphabot.com/#download
Project-URL: Copy Trading, https://deepalphabot.com/#copy
Project-URL: Buy License, https://deepalphabot.com/#pricing
Project-URL: Discord, https://discord.gg/P4yX686m
Project-URL: Changelog, https://deepalphabot.com/#changelog
Keywords: crypto,trading,bot,algorithmic-trading,ai,machine-learning,lightgbm,lstm,pytorch,bybit,bitget,hyperliquid,automated-trading,cryptocurrency,perpetual-futures,quantitative-finance,triple-barrier,meta-labeling,shap,ensemble-learning,deep-learning,trading-signals
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Office/Business :: Financial :: Investment
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: lightgbm>=3.3
Requires-Dist: xgboost>=1.5
Requires-Dist: scikit-learn>=1.0
Requires-Dist: numpy>=1.21
Requires-Dist: pandas>=1.3
Requires-Dist: ccxt>=4.0
Requires-Dist: python-dotenv>=0.19
Requires-Dist: requests>=2.27
Requires-Dist: joblib>=1.1
Requires-Dist: flask>=2.0
Provides-Extra: hmm
Requires-Dist: hmmlearn>=0.3; extra == "hmm"
Provides-Extra: lstm
Requires-Dist: torch>=2.0; extra == "lstm"

<div align="center">

# DeepAlpha Bot

### AI-Powered Crypto Trading | LSTM + LightGBM Ensemble

[![PyPI](https://img.shields.io/pypi/v/deepalpha-bot.svg?color=blue)](https://pypi.org/project/deepalpha-bot/)
[![Python 3.9+](https://img.shields.io/badge/python-3.9%2B-blue.svg)](https://www.python.org/)
[![License](https://img.shields.io/badge/license-proprietary-red.svg)](https://deepalphabot.com/#pricing)
[![Discord](https://img.shields.io/badge/discord-join-7289da.svg)](https://discord.gg/P4yX686m)
[![Website](https://img.shields.io/badge/web-deepalphabot.com-green.svg)](https://deepalphabot.com)

**Autonomous crypto trading. ML-driven signals. No manual intervention.**

[Website](https://deepalphabot.com) | [Copy Trading](https://deepalphabot.com/#copy) | [Discord](https://discord.gg/P4yX686m) | [Get Started](#install-in-10-seconds)

</div>

---

## 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

```bash
pip install deepalpha-bot
```

---

## Start in 5 minutes

```bash
# 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`:

```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:

```bash
# 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](https://deepalphabot.com)

---

## Don't want to run your own bot?

**Copy Trading** — Mirror our live trades on Bybit with zero setup:

[Start Copy Trading](https://deepalphabot.com/#copy)

---

## 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.

---

<div align="center">

**DeepAlpha** — Quantitative crypto trading for everyone.

[deepalphabot.com](https://deepalphabot.com) | [Discord](https://discord.gg/P4yX686m) | [PyPI](https://pypi.org/project/deepalpha-bot/) | [Copy Trading](https://deepalphabot.com/#copy)

</div>
