Comparative Study of Support Vector Regression and Long Short-Term Memory for Stock Price Prediction - Aviva Pradasyah; Baita, Anna (Politeknik Negeri Batam, 2025)
This study aims to compare the performance of two machine learning algorithms, Long Short-Term Memory (LSTM) and Support Vector Regression (SVR), in predicting the stock prices of PT Bank Rakyat Indonesia (BBRI) using daily historical data from January 1, 2020, to January 10, 2025. The data were processed using a 60-day sliding window technique and normalized with MinMaxScaler. Model performance was evaluated using Mean Absolute Error (MAE), Mean Squared Error (MSE), and the coefficient of determination (R²) across five independent trials (5-fold trials). The evaluation results show that SVR outperforms in short-term prediction, with an average MAE of 0.0281, MSE of 0.0014, and R² of 0.9072. Meanwhile, LSTM records an average MAE of 0.0312, MSE of 0.0015, and R² of 0.8962, but achieves better performance in medium-term predictions, with a smaller average error of Rp228.02 compared to Rp242.52 from SVR. Both models demonstrate strong generalization capabilities on test data without signs of overfitting. Based on these findings, SVR is recommended for stable short-term forecasts, while LSTM is better suited for medium-term predictions involving complex trend patterns.