Analysis of Cryptocurrency Candlestick Patterns using Gramian Angular Field and Hybrid Deep Learning

Hasriadi Hasriadi, Mashur Razak, Abdul Jalil

Abstract


Cryptocurrency markets such as Bitcoin, Ethereum, and Solana exhibit high volatility, making price forecasting difficult when relying solely on conventional technical analysis. This study aims to analyze cryptocurrency candlestick patterns by utilizing Gramian Angular Field (GAF) representations and to evaluate the performance of a hybrid deep learning model combining CNN–LSTM–Transformer to support investment decision-making. The proposed method involves processing daily historical Open, High, Low, and Close (OHLC) data from three major cryptocurrency assets: Bitcoin (BTC-USD), Ethereum (ETH-USD), and Solana (SOL-USD), covering the period from January 1, 2020, to September 30, 2024, obtained from Yahoo Finance. The time-series data were transformed into 64×64 pixel GAF images and used to train a baseline CNN model as well as a hybrid CNN–LSTM–Transformer model. Model evaluation was conducted across multiple forecasting horizons, including 1 day, 7 days, 30 days, 180 days, and 1 year, and was further complemented by real-time testing using the CoinGecko API in March 2025. The results indicate that the hybrid model achieved the best performance at different horizons for each asset: BTC-USD at the 30-day horizon with an R² of 0.971 and an SMAPE of 0.77%, ETH-USD at the 1-year horizon with an R² of 0.948 and an SMAPE of 0.81%, and SOL-USD at the 1-year horizon with an R² of 0.910 and an SMAPE of 4.72%. Real-time testing demonstrated that the model consistently captured the overall price movement trends despite high market volatility. It can be concluded that the integration of GAF representations and the hybrid CNN–LSTM–Transformer model has strong potential to enhance cryptocurrency candlestick analysis and can be utilized as a component of a Decision Support System for digital asset investment.

Keywords


candlestick patterns; cryptocurrency; deep learning; gramian angular field; price prediction

Full Text:

PDF

References


S. Nakamoto, “Bitcoin: A Peer-to-Peer Electronic Cash System,” 2008.

T. Nahdi and E. B. Sili, “Legalitas Penggunaan Cryptocurrency sebagai Alat Investasi Jangka Panjang di Indonesia,” Commerce Law, Vol. 3, No. 1, pp. 1–13, 2023.

T. B. S. Timothy, I. Cahya, and N. Y. Novanto, “Penerapan Algoritma Long Short-Term Memory (LSTM) berbasis Multi Fungsi Aktivasi terbobot dalam Prediksi Harga Ethereum,” Jurnal Pengembangan Teknologi Informasi dan Ilmu Komputer, Vol. 7, No. 3, pp. 1101–1107, 2023.

M. F. Rizkilloh and S. Widiyanesti, “Prediksi Harga Cryptocurrency menggunakan Algoritma Long Short Term Memory (LSTM),” Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi), Vol. 6, No. 1, pp. 25–31, 2022.

Jun-Hao Chen and Yun-Cheng Tsai, “Encoding Candlesticks as Images for Pattern Classification using Convolutional Neural Networks,” Financial Innovation, Vol. 6, No. 26, pp. 1–20, 2021.

I. Uzun, M. Lobachev, V. Kharchenko, T. Schöler, and I. Lobachev, “Candlestick Pattern Recognition in Cryptocurrency Price Time-Series Data using Rule-based Data Analysis Methods,” Computation, Vol. 12, No. 7, p. 132, 2024.

S. W. Ng and L. S. Ling, “Evaluation of Cryptocurrency Price Prediction using LSTM and CNNs Models,” International Journal on Informatics Visualization, Vol. 7, No. 3-2, pp. 2016–2024, 2023.

R. Zhang, C. Zhao, and G. Lin, “Interpretable Image-based Deep Learning for Price Trend Prediction in ETF Markets,” The European Journal of Finance, Vol. 29, No. 5, pp. 521–549, 2023.

A. L. Armin, H. M. Hendra, and S. A. Supri, “Implementation of Long Short-Term Memory and Gated Recurrent Units on Grouped Time-Series Data to Predict Stock Prices Accurately,” Journal of Big Data, Vol. 9, No. 89, 2022.

Y. K. Chuen and P. L. Chin, “Cryptocurrency Price Prediction with Convolutional Neural Network and Stacked Gated Recurrent Unit,” Data, Vol. 7, No. 11, p. 149, 2022.

K. Jearanaitanakij and B. Passaya, “Predicting Short Trend of Stocks by using Convolutional Neural Network and Candlestick Patterns,” in Proc. 2019 4th International Conference on Information Technology (InCIT), Bangkok, Thailand, 2019, pp. 159–162.

M. L. P. Muhammad and U. Hastari, “Pendekatan Deep Learning menggunakan Metode LSTM untuk Prediksi Harga Bitcoin,” IJCSR: The Indonesian Journal of Computer Science Research, Vol. 2, No. 2, pp. 43–50, 2023.

A. F. P. Andree, T. B. K. Tri, Misinem, and D. A. D. Deshinta, “Implementasi Analisis Sentimen dan Model Deep Learning untuk Prediksi Harga Bitcoin,” Jurnal Jupiter, Vol. 15, No. 1, pp. 403–412, 2023.

A. Imsyar, E. Christopher, A. Dithi, A. N. Khan, and S. Maulana, “The Challenge of Cryptocurrency in the Era of the Digital Revolution: A Review of Systematic Literature,” Aptisi Transactions on Technopreneurship (ATT), Vol. 2, No. 2, pp. 153–162, 2020.

A. Nurhopipah and N. A. Larasati, “CNN Hyperparameter Optimization using Random Grid Coarse-to-Fine Search for Face Classification,” Kinetik: Game Technology, Information System, Computer Network, Computing, Electronics, and Control, Vol. 6, No. 1, pp. 47–56, 2021.

W. Gazali, H. Soeparno, and J. Ohliati, “Penerapan Metode Konvolusi dalam Pengolahan Citra Digital,” Jurnal Mat Stat, Vol. 12, No. 2, pp. 103–113, 2012.




DOI: https://doi.org/10.32520/stmsi.v15i2.5883

Article Metrics

Abstract view : 5 times
PDF - 0 times

Refbacks

  • There are currently no refbacks.


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.