Skip to content

adminha/DoubleConvLSTM_DPT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Double ConvLSTM Model for Cryptocurrency Candle Direction Prediction

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.

πŸ” Overview

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.

πŸ“‚ Files

  • DoubleConvLSTM_DPT.py: Main code for preprocessing, model training, and evaluation.
  • README.md: Documentation.

βš™οΈ Requirements

  • Python 3.7+
  • TensorFlow (>=2.x)
  • Keras
  • scikit-learn
  • pandas
  • numpy
  • matplotlib
  • seaborn

Install dependencies:

pip install -r requirements.txt

🧠 Model Architecture

The model consists of the following layers:

  1. Conv1D (for local pattern extraction),
  2. LSTM with 128 units (for short-term temporal dependencies),
  3. Conv1D (for refined feature selection),
  4. LSTM with 64 units (for long-term temporal abstraction),
  5. Dropout for regularization,
  6. Dense layers for binary classification.

πŸ“Š Results

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

πŸ“ˆ Example Output

  • Training & validation accuracy/loss over epochs
  • Confusion matrix heatmap
  • Precision/recall statistics

πŸ“ Dataset

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.

πŸ”¬ Citation

If you use this code or dataset, please cite our paper (link forthcoming upon publication).

πŸ“œ License

This project is provided for research and educational use only.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages