| --- |
| license: mit |
| tags: |
| - finance |
| - trading |
| - bitcoin |
| - cryptocurrency |
| - machine-learning |
| - deep-learning |
| - lstm |
| - transformer |
| - xgboost |
| - random-forest |
| - shap |
| - code |
| - agent |
| - legal |
| language: |
| - en |
| library_name: adapter-transformers |
| pipeline_tag: tabular-classification |
| datasets: |
| - open-index/hacker-news |
| - lambda/hermes-agent-reasoning-traces |
| - ropedia-ai/xperience-10m |
| metrics: |
| - accuracy |
| - code_eval |
| - bertscore |
| - character |
| - brier_score |
| --- |
| |
| # π 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} |
| } |
| ``` |