Hierarchical Attention Fused CNN-LSTM Using Structured 2D Indicator Matrices for Stock Trading Action Detection

Read full text
Authors: Hao Feng, Xian Li, Dongjie Zhao, Hui Kong
Cited by: 0

Abstract

Accurate detection of trading actions (buy, sell, and hold) is critical for portfolio optimization and risk management in volatile stock markets. However, existing approaches often suffer from deficiencies in feature representation, spatiotemporal modeling, and class balancing, which limit their effectiveness. To address these issues, we propose HA-CL, a deep learning framework that integrates a hierarchical attention mechanism with CNN-LSTM. Specifically, technical indicators are encoded into a structured 2D matrix to preserve the inherent characteristics of stocks. Features extracted by ResNet are processed by a channel-wise LSTM equipped with an attention core to adaptively fuse spatial, temporal, and channel-level importance. To mitigate class imbalance, we design a customized extrema labeling strategy augmented with extrema oversampling, an importance-aware focal loss, and a heuristic action recalibration. Experiments on 63 Chinese A-share stocks show that HA-CL achieves an average accuracy of 68.89% with an annualized return of 111.01%, substantially outperforming all baselines. Risk-adjusted return metrics such as the Sharpe Ratio and the Maximum Drawdown further validate its robustness across market conditions. Together, they highlight the potential of HA-CL to translate complex market patterns into profitable trading actions.

Fields of Study & Subjects

Stock Market Forecasting Methods Financial Markets and Investment Strategies Time Series Analysis and Forecasting

Publication details

Journal / source
Applied Sciences
Volume
16
Issue
4
Pages
1672–1672
Publication date
7 February 2026
Language
EN