Submitted:
13 January 2025
Posted:
14 January 2025
Read the latest preprint version here
Abstract
Keywords:
1. Introduction
2. Related Work
2.1. Deep Learning Approaches with LSTM
2.2. Time Series Analysis with ARIMA

2.3. Linear Regression Approaches and Variants

2.4. Hybrid and Comparative Approaches
3. Data Collection and Processing
3.1. Dataset Description and Selection
3.2. Data Preprocessing Methodology
3.2.1. Linear Regression Preprocessing
3.2.2. ARIMA Time Series Transformation


3.2.3. LSTM Sequential Data Processing


3.3. Quality Control and Validation
4. Methodology
4.1. Algorithm Selection and Design

4.2. Model Selection Rationale
4.3. Comparative Framework
5. Experiments
5.1. Linear Regression Experiments

5.2. LSTM Model Optimization
5.3. ARIMA Model Performance

5.4. Comparative Analysis

5.5. Discussion and Implications
6. Visualization Implementation
6.1. System Structure
6.2. User Interface Design

6.3. Stock Trend Visualization


6.4. Trading Interface

7. Conclusion
References
- Nicolas Huck, Pairs selection and outranking: An application to the S&P 100 index, European Journal of Operational Research, Volume 196, Issue 2, 2009, Pages 819-825, ISSN 0377-2217. [CrossRef]
- Hochreiter S, Schmidhuber J. Long short-term memory. Neural Comput. 1997 Nov 15;9(8):1735-80. [CrossRef] [PubMed]
- Box, G. E. P., & Jenkins, G. M. (1976). Time series analysis: Forecasting and control. San Francisco: Holden-Day.
- Weiwei Jiang, Applications of deep learning in stock market prediction: Recent progress, Expert Systems with Applications, Volume 184, 2021, 115537, ISSN 0957-4174,. [CrossRef]
- S. Siami-Namini, N. Tavakoli and A. Siami Namin, "A Comparison of ARIMA and LSTM in Forecasting Time Series," 2018 17th IEEE International Conference on Machine Learning and Applications (ICMLA), 2018, pp. 1394-1401. [CrossRef]
- L. Cheng, Y. Huang and M. Wu, "Applied attention-based LSTM neural networks in stock prediction," 2018 IEEE International Conference on Big Data (Big Data), 2018, pp. 4716-4718. [CrossRef]
- Chen, Shun, and Lei Ge. "Exploring the attention mechanism in LSTM-based Hong Kong stock price movement prediction." Quantitative Finance 19.9 (2019): 1507-1515.
- L. Chen, Y. Chi, Y. Guan and J. Fan, "A Hybrid Attention-Based EMD-LSTM Model for Financial Time Series Prediction," 2019 2nd International Conference on Artificial Intelligence and Big Data (ICAIBD), 2019, pp. 113-118. [CrossRef]
- Yan, H., Ouyang, H. Financial Time Series Prediction Based on Deep Learning. Wireless Pers Commun 102, 683–700 (2018). [CrossRef]
- Yaowei Wang, Qing Li, Zhexue Huang, and Junjie Li. 2019. EAN: Event Attention Network for Stock Price Trend Prediction based on Sentimental Embedding. In Proceedings of the 10th ACM Conference on Web Science (WebSci ’19). Association for Computing Machinery, New York, NY, USA, 311–320. DOI:. [CrossRef]
- Wen Long, Zhichen Lu, Lingxiao Cui, Deep learning-based feature engineering for stock price movement prediction, Knowledge-Based Systems, Volume 164, 2019, Pages 163-173, ISSN 0950-7051,. [CrossRef]
- Greff, Klaus, et al. "LSTM: A search space odyssey." IEEE transactions on neural networks and learning systems 28.10 (2016): 2222-2232.
- Baltagi, Badi H., ed. A companion to theoretical econometrics. John Wiley & Sons, 2008.


| Stock | All Attributes MSE | Close Price MSE | Range-Normalized Improvement | Trading Volume Range |
|---|---|---|---|---|
| AAPL | 63.150 | 40.243 | 36.27% | 2.5M-8.9M |
| KO | 2.722 | 2.717 | 0.18% | 0.8M-2.1M |
| NVDA | 625.501 | 602.997 | 13.60% | 1.2M-5.4M |
| PFE | 8.727 | 9.464 | -8.45% | 1.5M-4.2M |
| TSLA | 18432.795 | 17195.716 | 6.71% | 3.2M-12.5M |
| Stock | LSTM-64 MSE | LSTM-128 MSE | LSTM-256 MSE | Trading Volume Range |
|---|---|---|---|---|
| AAPL | 5.349 | 8.198 | 9.168 | 0.82 |
| KO | 0.179 | 0.117 | 1.179 | 0.31 |
| NVDA | 20.250 | 29.444 | 48.793 | 0.89 |
| PFE | 0.748 | 0.882 | 1.192 | 0.54 |
| TSLA | 741.964 | 744.730 | 1131.923 | 0.93 |
| Stock | Steps=20 MSE | Steps=25 MSE | Steps=30 MSE | Optimal Configuration |
|---|---|---|---|---|
| AAPL | 7.236 | 8.193 | 8.198 | 20 |
| KO | 0.186 | 0.176 | 1.117 | 30 |
| NVDA | 39.688 | 16.504 | 29.444 | 25 |
| PFE | 0.869 | 0.931 | 0.882 | 20 |
| TSLA | 653.083 | 1004.143 | 744.73 | 25 |
| Stock | ARIMA(1,1,1) MSE | ARIMA(2,1,2) MSE | Improvement Factor | Price Volatility Index |
|---|---|---|---|---|
| AAPL | 0.0004 | 0.002 | 5.19x | 0.42 |
| KO | 0.004 | 0.008 | 1.73x | 0.18 |
| NVDA | 1.210 | 6.866 | 5.67x | 0.56 |
| PFE | 0.024 | 0.032 | 1.33x | 0.24 |
| TSLA | 0.172 | 48.672 | 281.54x | 0.89 |
| Stock | LR MSE | ARIMA MSE | LSTM MSE |
|---|---|---|---|
| AAPL | 40.243 | 0.0004 | 5.349 |
| KO | 2.717 | 0.004 | 0.117 |
| NVDA | 602.997 | 1.210 | 16.504 |
| PFE | 9.464 | 0.024 | 0.748 |
| TSLA | 17195.716 | 0.172 | 653.038 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).