UPDF AI

Comparing Machine Learning Models for Stock Prediction: LSTM Comes Out on Top

Taghizadeh Alireza,Behzadi Arash,Fakhri Nika,Naghipour Seyedeh Atena

2026 · DOI: 10.71426/jmt.v3.i1.pp361-366
0 Citations

TLDR

Overall, this study highlights the superior performance of the LSTM model in stock market forecasting, especially for shorter horizons, while the ANN model demonstrates consistent performance across various horizons.

Abstract

This study illuminates the critical role of time series prediction in various fields, particularly in forecasting stock market trends. It offers a comparative analysis of four machine learning models: Artificial Neural Network (ANN), Long Short-Term Memory (LSTM), Random Forest (RF), and Support Vector Machine (SVM). These models are meticulously trained and validated, ensuring a robust performance assessment. The ANN model consistently performs well across different forecast horizons, adeptly capturing complex stock market patterns. The LSTM model, however, excels in predicting shorter horizons, effectively utilizing its ability to capture temporal dependencies and short-term trends. Evaluation metrics reveal that the LSTM model outperforms the others, particularly in minimizing prediction errors. It achieves an impressive accuracy rate of 98.6%, further emphasizing its proficiency in forecasting stock market trends. Overall, this study highlights the superior performance of the LSTM model in stock market forecasting, especially for shorter horizons. The ANN model also demonstrates consistent performance across various horizons. These insights offer valuable guidance for investors and financial analysts, enabling informed decision-making based on reliable predictions.