File size: 3,236 Bytes
36b5735 072fdba 36b5735 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
---
license: mit
tags:
- finance
- trading
- bitcoin
- cryptocurrency
- machine-learning
- deep-learning
- lstm
- transformer
- xgboost
- random-forest
- shap
language:
- en
library_name: pytorch
pipeline_tag: tabular-classification
---
# π AI Multi-Model Trading Bot
A comprehensive cryptocurrency trading signal prediction system using 8 ML/DL models with ensemble voting.
## π― Model Overview
| Model Type | Models Included |
| :--- | :--- |
| **Traditional ML** | Logistic Regression, Random Forest, XGBoost |
| **Deep Learning** | LSTM, GRU, CNN, LSTM+Attention, Transformer |
| **Ensemble** | Majority voting across all models |
## π Features Used
The models use 10 technical indicators:
- RSI (Relative Strength Index)
- MACD & MACD Signal
- Bollinger Band Width
- ATR (Average True Range)
- Distance from SMA50
- OBV Percentage Change
- ADX (Average Directional Index)
- Stochastic RSI (K & D)
## π Quick Start
```python
import joblib
import torch
# Load scaler and config
scaler = joblib.load("scaler.pkl")
config = joblib.load("config.pkl")
# Load ML model
rf_model = joblib.load("random_forest.pkl")
# Load DL model
from your_models import LSTMModel
lstm = LSTMModel(config['input_dim'])
lstm.load_state_dict(torch.load("lstm.pt"))
lstm.eval()
```
## π Files
| File | Description |
| :--- | :--- |
| `scaler.pkl` | StandardScaler for feature preprocessing |
| `config.pkl` | Model configuration (input_dim, timesteps, feature_cols) |
| `logistic_regression.pkl` | Trained Logistic Regression model |
| `random_forest.pkl` | Trained Random Forest model |
| `xgboost.pkl` | Trained XGBoost model |
| `lstm.pt` | Trained LSTM model weights |
| `gru.pt` | Trained GRU model weights |
| `cnn.pt` | Trained CNN model weights |
| `lstm_attention.pt` | Trained LSTM+Attention model weights |
| `transformer.pt` | Trained Transformer model weights |
| `shap_values.pkl` | SHAP feature importance values |
## π Dataset
Training data is available separately:
**π [AdityaaXD/Multi-Model-Trading-Data](https://huggingface.co/datasets/AdityaaXD/Multi-Model-Trading-Data)**
- **Ticker**: BTC-USD
- **Date Range**: 2015-01-01 to 2025-01-01
- **Total Samples**: ~3,600 days
- **Train/Test Split**: 80/20
## β οΈ Disclaimer
This model is for **educational and research purposes only**. It should NOT be used for actual trading decisions. Cryptocurrency markets are highly volatile and past performance does not guarantee future results.
## π SHAP Explainability
The model includes SHAP (SHapley Additive exPlanations) values for feature importance analysis, helping understand which technical indicators most influence predictions.
## π οΈ Training Details
- **Hyperparameter Tuning**: GridSearchCV with 3-fold CV
- **Deep Learning**: 50 epochs, early stopping (patience=7)
- **Regularization**: Label smoothing (0.1), gradient clipping (1.0)
- **Class Balancing**: Weighted loss functions
## π Citation
```bibtex
@misc{ai-trading-bot-2025,
title={AI Multi-Model Trading Bot},
author={Your Name},
year={2025},
publisher={Hugging Face}
}
```
|