This repository contains the implementation of a Double ConvLSTM deep learning model for predicting cryptocurrency price movement direction, using engineered binary features derived from price action. This code supports our paper submitted to the Soft Computing journal and includes data preprocessing, model training, evaluation, and visualization.
The model predicts whether the next candle in a crypto time series (e.g., ETH/USDT) will close higher or lower than it opens. The process involves:
- Building a custom dataset from raw price data,
- Engineering directional features using Differential Propagation Thresholding (DPT),
- Training a Conv1D + LSTM + Conv1D + LSTM architecture,
- Evaluating performance via accuracy, confusion matrix, and precision/recall metrics.
DoubleConvLSTM_DPT.py: Main code for preprocessing, model training, and evaluation.README.md: Documentation.
- Python 3.7+
- TensorFlow (>=2.x)
- Keras
- scikit-learn
- pandas
- numpy
- matplotlib
- seaborn
Install dependencies:
pip install -r requirements.txtThe model consists of the following layers:
Conv1D(for local pattern extraction),LSTMwith 128 units (for short-term temporal dependencies),Conv1D(for refined feature selection),LSTMwith 64 units (for long-term temporal abstraction),Dropoutfor regularization,- Dense layers for binary classification.
After training, the model achieves over 80% accuracy on the ETH/USDT candle direction task using BTC-ETH features. Evaluation metrics include:
- Test accuracy
- Confusion matrix
- Precision, Recall, and F1-score
- Training & validation accuracy/loss over epochs
- Confusion matrix heatmap
- Precision/recall statistics
The mentioned BTC_ETH_1d.csv file contains:
- BTC and ETH price features (open, close, high, low, volume)
- Time-aligned rows for input into the model
For full dataset reproduction or other altcoins, follow the same preprocessing approach described in the paper.
If you use this code or dataset, please cite our paper (link forthcoming upon publication).
This project is provided for research and educational use only.