AC-Seq2Net: A Math-Guided Hybrid Deep Learning Framework for Explainable Geometric Pattern Recognition in Financial Time Series
DOI:
https://doi.org/10.4108/airo.11907Keywords:
Financial Time Series, Geometric Pattern Recognition, Symmetrical Triangle, Hybrid Deep Learning, Attention Mechanism, Explainable AI (XAI)Abstract
Financial market data is usually rough and volatile. This noise makes it difficult to detect clear price structures from raw intraday records. Traders still rely on geometric patterns such as symmetrical triangles to describe consolidation and potential breakouts. Deep learning models are able to acknowledge market internal conditions with high scores though they tend to acquire concealed relations. They do not capture the triangle geometry in an explicit form. This introduces a gap of representation and lowering interpretability. In order to overcome this problem, we proposed AC-Seq2Net. It is a math-guided hybrid symmetrical triangle recognition model in intraday price data. The pipeline segments the price stream into rolling windows and applies local min-max normalization to keep the scale consistent across different price levels. Ground truth labels are produced through geometric boundary extraction using ordinary least squares trendlines, upon which slope convergence and volatility contraction are derived as explicit engineered features. Unlike purely black-box sequence models, AC-Seq2Net integrates these geometric descriptors alongside hybrid temporal representation learning. A two-stage 1D-CNN extracts local structural patterns, a Bidirectional LSTM captures temporal dependencies, and an Attention mechanism highlights critical convergence boundaries. This design encodes symmetrical triangle geometry directly rather than approximating it through latent feature learning alone, bridging deep learning performance with trader-interpretable geometric reasoning validated through SHAP-based explainability. The triangle probability is produced using a sigmoid layer. Experiments on longitudinal S&P 500 and NASDAQ 100 data report 97.70% accuracy and 0.9947 AUC, confirming that geometric signals rather than random fluctuations drive model decisions.
Downloads
References
[1] Liang M, Wu S, Wang X, Chen Q. A stock time series forecasting approach incorporating candlestick patterns and sequence similarity. Expert Systems with Applications. 2022 11;205:117595.
[2] Cagliero L, Fior J, Garza P. Shortlisting machine learning-based stock trading recommendations using candlestick pattern recognition. Expert Systems with Applications. 2023 4;216:119493.
[3] Hung CC, Chen YJ. DPP: Deep predictor for price movement from candlestick charts. PLOS ONE. 2021 6;16:e0252404.
[4] Birogul S, Temur G, Kose U. YOLO Object Recognition Algorithm and “Buy-Sell Decision” Model Over 2D Candlestick Charts. IEEE Access. 2020;8:91894-915.
[5] Natarajan J, Wang W, Jiang Y, Zhang Z, Ye H, Kuang L. Generative-CNN for Pattern Recognition in Finance. In: Proceedings of the 5th ACMInternational Conference on AI in Finance. ACM; 2024. p. 142-9.
[6] Uzun I, Lobachev M, Kharchenko V, Scholer T, Lobachev I. Candlestick Pattern Recognition in Cryptocurrency Price Time-Series Data Using Rule-Based Data Analysis Methods. Computation. 2024 6;12:132.
[7] Nikolaou K. CPC-SAX: Data mining of financial chart patterns with symbolic aggregate approXimation and instance-based multilabel classification. The Journal of Finance and Data Science. 2024 12;10:100132.
[8] Mersal ER, Karaoğlan KM, Kutucu H. Enhancing market trend prediction using convolutional neural networks on Japanese candlestick patterns. PeerJ Computer Science. 2025 2;11:e2719.
[9] Liu P, Zhang Y, Bao F, Yao X, Zhang C. Multi-type data fusion framework based on deep reinforcement learning for algorithmic trading. Applied Intelligence. 2023 1;53:1683-706.
[10] Jing L, Kang Y. Automated cryptocurrency trading approach using ensemble deep reinforcement learning: Learn to understand candlesticks. Expert Systems with Applications. 2024 3;237:121373.
[11] Patel M, Goyal S, Jariwala K, Chattopadhyay C. D2CTNet: An Approach to Detect Dynamics of Candlestick charts and Technical indicators for Stock Market. In: Proceedings of the 8th International Conference on Data Science and Management of Data (12th ACMIKDD CODS and 30th COMAD). ACM; 2024. p. 192-200.
[12] Hung CC, Chen YJ, Guo SJ, Hsu FC. Predicting the price movement from candlestick charts: a CNNbased approach. International Journal of Ad Hoc and Ubiquitous Computing. 2020;34:111.
[13] Kim N, Lee J, Kang Y. ISEPT: Image-Based Selection and Execution Framework for Pair Trading. In: Proceedings of the 6th ACM International Conference on AI in Finance. ACM; 2025. p. 413-21.
[14] Ranjan P, Itani R, Faccia A. An Interpretable 1D-CNN Framework for Stock Price Forecasting: A Comparative Study with LSTM and ARIMA. FinTech. 2025 11;4:63.
[15] Sezer OB, Gudelek MU, Ozbayoglu AM. Financial time series forecasting with deep learning : A systematic literature review: 2005–2019. Applied Soft Computing. 2020 5;90:106181.
[16] Olorunnimbe K, Viktor H. Deep learning in the stock market—a systematic survey of practice, backtesting, and applications. Artificial Intelligence Review. 2023 3;56:2057-109. Chen JH, Tsai YC. Encoding candlesticks as images for pattern classification using convolutional neural networks. Financial Innovation. 2020 12;6:26.
[18] Jin G, Kwon O. Impact of chart image characteristics on stock price prediction with a convolutional neural network. PLOS ONE. 2021 6;16:e0253121.
[19] Lin Y, Liu S, Yang H, Wu H, Jiang B. Improving stock trading decisions based on pattern recognition using machine learning technology. PLOS ONE. 2021 8;16:e0255558.
[20] Liu LC, Si YW. 1D convolutional neural networks for chart pattern classification in financial time series. The Journal of Supercomputing. 2022;78(12):14191-214.
[21] Zheng Y, Si YW, Wong R. Feature extraction for chart pattern classification in financial time series. Knowledge and Information Systems. 2021 7;63:1807-48.
[22] Wan Y, Si YW. A formal approach to chart patterns classification in financial time series. Information Sciences. 2017 10;411:151-75.
[23] Zeng Z, Chen Y. Identifying and Forecasting Recurrently Emerging Stock Trend Structures via Rising Visibility Graphs. Forecasting. 2025 6;7:26.
[24] Chen J, Wen Y, Nanehkaran YA, Suzauddola MD, Chen W, Zhang D. Machine learning techniques for stock price prediction and graphic signal recognition. Engineering Applications of Artificial Intelligence. 2023 5;121:106038.
[25] Foroutan P, Lahmiri S. Deep learning-based spatialtemporal graph neural networks for price movement classification in crude oil and precious metal markets. Machine Learning with Applications. 2024 6;16:100552.
[26] Uygun Y, Sefer E. Financial asset price prediction with graph neural network-based temporal deep learning models. Neural Computing and Applications. 2025 10;37:25445-71.
[27] Lee J, Stevens N, Han SC. Large Language Models in Finance (FinLLMs). Neural Computing and Applications. 2025 10;37:24853-67.
[28] Qiu J, Wang B, Zhou C. Forecasting stock prices with long-short term memory neural network based on attention mechanism. PLOS ONE. 2020 1;15:e0227222.
[29] Lu W, Li J, Wang J, Qin L. A CNN-BiLSTM-AM method for stock price prediction. Neural Computing and Applications. 2021 5;33:4741-53.
[30] Wang C, Chen Y, Zhang S, Zhang Q. Stock market index prediction using deep Transformer model. Expert Systems with Applications. 2022 12;208:118128.
[31] Akhter T, Saona P, Abraham R, Azad MAK. Navigating the Storm: How the EU’s Non-financial Reporting Directive and Board Structure Curb ESG Controversies. Journal of Interdisciplinary Research in Business, Education and Society. 2023;1(2):1-18.
[32] Černevičien˙e J, Kabašinskas A. Explainable artificial intelligence (XAI) in finance: a systematic literature review. Artificial Intelligence Review. 2024 7;57:216.
[33] Khan FS, Mazhar SS, Mazhar K, AlSaleh DA, Mazhar A. Model-agnostic explainable artificial intelligence methods in finance: a systematic review, recent developments, limitations, challenges and future directions. Artificial Intelligence Review. 2025 5;58:232.
[34] Zangana HM, Sulaiman MA. Explainable Transformer Models for Early Prediction of Chronic Diseases Using Longitudinal Electronic Health Records (EHRs). EAI Endorsed Transactions on AI and Robotics. 2026 2;5.
[35] Masud SB, Sozib HM, Mishu KP, Bellal RB, Ahmed MT, Jony AM, et al. AI-Driven Predictive Maintenance in Infrastructure and Facilities Management. EAI Endorsed Transactions on AI and Robotics. 2025 12;5.
[36] Jinbo H, Wang Z, Huang W, Zhou F, Wang A, Wu X, et al. An Efficient Hybrid Model With Harris Hawks Optimization Algorithm for Predicting Oat Water<b></b>. EAI Endorsed Transactions on AI and Robotics. 2026 3;5.
[37] Elkhirani SE. 5-Year Data for S&P 500 & NASDAQ 100: Historical Data (2019–2024) 5 min Time Frame. Kaggle Dataset. 2024.
[38] Pagliaro A. Forecasting Significant Stock Market Price Changes Using Machine Learning: Extra Trees Classifier Leads. Electronics. 2023 11;12:4551.
[39] Rida SM, Hamza E, Taher Z. From Technical Indicators to Trading Decisions: A Deep Learning Model Combining CNN and LSTM. International Journal of Advanced Computer Science and Applications. 2024;15.
Downloads
Published
Issue
Section
License
Copyright (c) 2025 Md Fazlur Rahman, Md. Abul Kalam Azad, Esrat Jahan, Najmus Saadat, Md Faysal Ahmed, Abdul Kadar Muhammad Masum

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
This is an open access article distributed under the terms of the CC BY-NC-SA 4.0, which permits copying, redistributing, remixing, transformation, and building upon the material in any medium so long as the original work is properly cited.
