Journal of Computer System and Informatics (JoSYC)
Vol 3 No 4 (2022): August 2022

Candlestick Patterns Recognition using CNN-LSTM Model to Predict Financial Trading Position in Stock Market

Aditya Ramadhan (Telkom University, Bandung)
Irma Palupi (Telkom University, Bandung)
Bambang Ari Wahyudi (Telkom University, Bandung)



Article Info

Publish Date
03 Sep 2022

Abstract

Investors need analytical tools to predict the price and to determine trading positions. Candlestick pattern is one of the analytical tools that predict price trends. However, the patterns are difficult to recognize, and some studies show doubts regarding the robustness of the recognizing system. In this study, we tested the predictive ability of candlestick patterns to determine trading positions. We use Gramian Angular Field (GAF) to encode candlestick patterns as images to recognize 3-hour and 5-hour of 6 candlestick patterns with Convolutional Neural Network (CNN), coupled with the Long short-term memory (LSTM) model to predict the close price. The trading position consists of buying and selling position with a hold period of several hours. Our results show CNN successfully detected 3-hour and 5-hour GAF candlestick patterns with an accuracy of 90% and 93%. LSTM can predict the close price trend with 155.458 RMSE scores and 0.9754% MAPE with 10-hour look back. With a hold duration of three hours and CNN-LSTM as an additional model, the test data's 85 candlestick patterns are recognized with 82.7% accuracy, compared to 60% accuracy of profitable trading positions when CNN candlestick pattern recognition is used alone. Compared to employing CNN candlestick pattern identification alone, the CNN-LSTM model combination can improve the prediction power of candlestick patterns and offer more lucrative trading positions.

Copyrights © 2022






Journal Info

Abbrev

josyc

Publisher

Subject

Computer Science & IT Decision Sciences, Operations Research & Management Industrial & Manufacturing Engineering

Description

Journal of Computer System and Informatics (JoSYC) covers the whole spectrum of Artificial Inteligent, Computer System, Informatics Technique which includes, but is not limited to: Soft Computing, Distributed Intelligent Systems, Database Management and Information Retrieval, Evolutionary ...