The advancement of machine learning, particularly in time-series analysis, has created significant opportunities for improving the accuracy of stock price prediction. However, the volatile nature of financial markets and the complexity of temporal patterns often hinder the ability of single models to deliver consistent and optimal results. To address these limitations, this study proposes a hybrid approach by integrating three popular algorithms—Long Short-Term Memory (LSTM), XGBoost, and LightGBM—through a stacking ensemble method. The dataset used consists of daily stock prices of Apple Inc. (AAPL) for the period 2014–2024, obtained from Yahoo Finance. The research process includes preprocessing, the construction of time-series datasets using windowing techniques, training of single models, and the application of ensemble stacking. Experimental results reveal that LSTM achieved the best performance among the single models, with a MAPE of 3.70% and R² of 0.9204, demonstrating its ability to capture long-term temporal dependencies. In contrast, XGBoost and LightGBM performed poorly in recognizing sequential patterns, resulting in negative R² values. The combination of all three models through stacking ensemble significantly improved prediction accuracy, achieving a MAPE of 2.57% and R² of 0.9693. These findings confirm that integrating LSTM, XGBoost, and LightGBM not only enhances predictive accuracy but also improves model stability, while contributing to the scientific development of hybrid machine learning methods in stock market analysis.
Copyrights © 2025