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