Comparing Long Short Term Memory and Linear Regression for Stock Price Prediction
The rapid growth of machine learning techniques has led to their widespread use in financial markets, particularly in stock price prediction. This study aims to compare the effectiveness of Long Short Term Memory (LSTM) and Linear Regression models in predicting stock price movements for PT Indofood CBP Sukses Makmur Tbk (ICBP.JK) using historical data from January 2020 to January 2023. The objective of this research is to evaluate the ability of both models to predict future stock price trends with optimal accuracy. A time series cross-validation approach was employed, with model performance assessed using metrics such as Mean Squared Error (MSE), Root Mean Squared Error (RMSE), and Mean Absolute Error (MAE). The results indicate that although Linear Regression captures general trends, it lacks the flexibility to adapt to complex market fluctuations. In contrast, LSTM, despite initial higher error values during cross-validation, demonstrates superior performance in capturing non-linear patterns and responding effectively to dynamic stock price changes. Additionally, LSTM predicts a significant upward trend in stock prices for the next 30 days, while Linear Regression forecasts a downward movement. This study contributes to the understanding of algorithmic approaches in stock market analysis and provides practical insights for improving investment decision-making through more accurate and dynamic prediction models.
Authors
- Hindriyanto Dwi Purnomo (ORCID: https://orcid.org/0000-0001-6728-7868)
- Kristina Mentari Mangansige
Institutions
- Satya Wacana Christian University (ID)
Publication Details
- Published
- 2025-08-15
- DOI
- https://doi.org/10.1109/iccit65724.2025.11166897
- Primary Topic
- Stock Market Forecasting Methods
- Type
- article
- Field-Weighted Citation Impact
- 0.00