[Paper Review] Stock Chart Pattern recognition with Deep Learning
This paper evaluates deep learning models—specifically 1D CNN, 2D CNN, and LSTM—for detecting common stock chart patterns (bearish flag, double top, double bottom) in historical price data. Using a manually curated dataset of labeled patterns, it finds that the LSTM model achieves the highest detection accuracy and generalization, outperforming both hard-coded algorithms and CNN-based approaches, which struggle with sparse, low-signal input data.
This study evaluates the performances of CNN and LSTM for recognizing common charts patterns in a stock historical data. It presents two common patterns, the method used to build the training set, the neural networks architectures and the accuracies obtained.
Motivation & Objective
- To automate detection of common technical analysis chart patterns in stock price time series.
- To compare the performance and generalization capability of deep learning models (CNN, LSTM) against a hard-coded rule-based algorithm.
- To assess whether deep learning can reduce false negatives (missed patterns) while maintaining low false positives (incorrect detections).
- To investigate the feasibility of using deep learning for pattern recognition in sparse, noisy financial time series data.
- To explore the potential of multi-task learning and data preprocessing techniques (e.g., autoencoders) for improving model robustness across different stocks.
Proposed method
- Constructed a labeled dataset of chart patterns using a hard-coded algorithm to ensure consistent, high-quality ground truth for training and evaluation.
- Trained three deep learning models: 2D CNN (on image representations of price charts), 1D CNN (on raw time series), and LSTM (on sequential price data).
- Used grid search to tune hyperparameters due to the sensitivity of CNNs to sparse input and limited signal in the data.
- Manually validated and corrected false positives and false negatives before computing confusion matrices and performance metrics.
- Evaluated model generalization by comparing detection rates to the hard-coded baseline, focusing on recall and false negative rates.
- Explored potential improvements via autoencoders to denoise input data and enhance feature learning in both CNN and LSTM models.
Experimental results
Research questions
- RQ1Can deep learning models detect common stock chart patterns more effectively than a hard-coded rule-based system in terms of recall and generalization?
- RQ2How do 2D CNN, 1D CNN, and LSTM architectures compare in detecting chart patterns from sparse, noisy OHLC data?
- RQ3To what extent can deep learning models generalize beyond the exact parameter ranges defined in the hard-coded detector?
- RQ4Does the model trained on one stock generalize to other stocks, or is it highly dependent on the training dataset?
- RQ5Can data preprocessing techniques like autoencoders improve detection accuracy by reducing noise and enhancing pattern representation?
Key findings
- The LSTM model achieved the highest recall rate of 0.64, outperforming both 1D and 2D CNNs, which failed to reach high accuracy due to sparse input data.
- The 2D CNN struggled significantly due to the sparsity of non-zero pixels in chart images, making it difficult to learn meaningful spatial features.
- The 1D CNN also underperformed, likely due to the same data sparsity and lack of robust feature learning in raw time series.
- The hard-coded algorithm achieved near-zero false positives but suffered from high false negatives, indicating limited generalization.
- The LSTM model showed partial generalization, detecting some patterns slightly outside the hard-coded bounds, though still with a 1.2% error rate.
- Model transferability across different stocks was poor, suggesting models may not generalize well without multi-dataset pretraining.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.