Predicting Stock Price Movements Using Deep Learning: An Analysis of Machine Learning Models for Portfolio Optimization
DOI:
https://doi.org/10.51903/jmi.v3i3.57Keywords:
Stock Price Prediction, LSTM, Portfolio Optimization, Deep Learning, Mean-Variance OptimizationAbstract
Capital markets play a strategic role in the global economy; however, high volatility often poses challenges for investors in making optimal investment decisions. Stock price prediction has become one of the key elements in effective portfolio management, but the complexity of market data demands more advanced analytical approaches. This study aims to explore the potential of Long Short-Term Memory (LSTM) models in predicting stock price movements and integrating these predictions into portfolio optimization strategies based on modern portfolio theory. The research methodology utilizes historical stock data from the S&P 500 and IDX Composite indices with daily frequency. The LSTM model is compared with Recurrent Neural Networks (RNN), Support Vector Machines (SVM), and Artificial Neural Networks (ANN) using metrics such as Mean Squared Error (MSE), Root Mean Squared Error (RMSE), and accuracy. The LSTM model demonstrated superior performance with an MSE of 0.0018, RMSE of 0.042, and prediction accuracy of 91.5%, significantly outperforming RNN (87.3%), SVM (80.2%), and ANN (82.7%). The prediction results were then integrated into portfolio optimization using the Mean-Variance Optimization approach, resulting in an increase in expected returns from 8.5% to 12.3%, a reduction in risk from 6.2% to 5.8%, and an improvement in the Sharpe ratio from 1.37 to 2.12. This study demonstrates that the LSTM model not only excels in stock price prediction accuracy but also contributes significantly to enhancing portfolio management efficiency. This Deep Learning-based approach offers a more adaptive, data-driven investment strategy, supporting more informed decision-making in the dynamic capital market
References
Anuno, F., Madaleno, M., & Vieira, E. (2023). Using the Capital Asset Pricing Model and the Fama–French Three-Factor and Five-Factor Models to Manage Stock and Bond Portfolios: Evidence from Timor-Leste. Journal of Risk and Financial Management, 16(11), 480. https://doi.org/10.3390/jrfm16110480
Bansal, M., Goyal, A., & Choudhary, A. (2022). A Comparative Analysis of K-Nearest Neighbor, Genetic, Support Vector Machine, Decision Tree, and Long Short Term Memory Algorithms in Machine Learning. Decision Analytics Journal, 3, 100071. https://doi.org/10.1016/j.dajour.2022.100071
Barrera-Animas, A. Y., Oyedele, L. O., Bilal, M., Akinosho, T. D., Delgado, J. M. D., & Akanbi, L. A. (2022). Rainfall Prediction: A Comparative Analysis of Modern Machine Learning Algorithms for Time-Series Forecasting. Machine Learning with Applications, 7, 100204. https://doi.org/10.1016/j.mlwa.2021.100204
Bhandari, H. N., Rimal, B., Pokhrel, N. R., Rimal, R., Dahal, K. R., & Khatri, R. K. C. (2022). Predicting Stock Market Index Using LSTM. Machine Learning with Applications, 9, 100320. https://doi.org/10.1016/j.mlwa.2022.100320
Botunac, I., Bosna, J., & Matetić, M. (2024). Optimization of Traditional Stock Market Strategies Using the LSTM Hybrid Approach. Information, 15(3), 136. https://doi.org/10.3390/info15030136
Butler, A., & Kwon, R. H. (2023). Integrating Prediction in Mean-Variance Portfolio Optimization. Quantitative Finance, 23(3), 429–452. https://doi.org/10.1080/14697688.2022.2162432
Chhajer, P., Shah, M., & Kshirsagar, A. (2022). The Applications of Artificial Neural Networks, Support Vector Machines, and Long–Short Term Memory for Stock Market Prediction. Decision Analytics Journal, 2, 100015. https://doi.org/10.1016/j.dajour.2021.100015
Di Persio, L., Garbelli, M., Mottaghi, F., & Wallbaum, K. (2023). Volatility Forecasting with Hybrid Neural Networks Methods for Risk Parity Investment Strategies. Expert Systems with Applications, 229, 120418. https://doi.org/10.1016/j.eswa.2023.120418
Dmuchowski, P., Dmuchowski, W., Baczewska-Dąbrowska, A. H., & Gworek, B. (2023). Environmental, Social, and Governance (ESG) Model; Impacts and Sustainable Investment – Global Trends and Poland’s Perspective. Journal of Environmental Management, 329, 117023. https://doi.org/10.1016/j.jenvman.2022.117023a
Du, J. (2022). Mean–Variance Portfolio Optimization with Deep Learning Based-Forecasts for Cointegrated Stocks. Expert Systems with Applications, 201, 117005. https://doi.org/10.1016/j.eswa.2022.117005
Gong, X., Xie, F., Zhou, Z., & Zhang, C. (2024). The Enhanced Benefits of ESG in Portfolios: A Multi-Factor Model Perspective Based on LightGBM. Pacific-Basin Finance Journal, 85, 102365. https://doi.org/10.1016/j.pacfin.2024.102365
Htun, H. H., Biehl, M., & Petkov, N. (2023). Survey of Feature Selection and Extraction Techniques for Stock Market Prediction. Financial Innovation, 9(1), 26. https://doi.org/10.1186/s40854-022-00441-7
Huang, R., Wei, C., Wang, B., Yang, J., Xu, X., Wu, S., & Huang, S. (2022). Well Performance Prediction Based on Long Short-Term Memory (LSTM) Neural Network. Journal of Petroleum Science and Engineering, 208, 109686. https://doi.org/10.1016/j.petrol.2021.109686
Hung, M. C., Hsia, P. H., Kuang, X. J., & Lin, S. K. (2024). Intelligent Portfolio Construction via News Sentiment Analysis. International Review of Economics & Finance, 89, 605–617. https://doi.org/10.1016/j.iref.2023.07.103
Khalil, M., McGough, A. S., Pourmirza, Z., Pazhoohesh, M., & Walker, S. (2022). Machine Learning, Deep Learning and Statistical Analysis for Forecasting Building Energy Consumption — A Systematic Review. Engineering Applications of Artificial Intelligence, 115, 105287. https://doi.org/10.1016/j.engappai.2022.105287
Kurani, A., Doshi, P., Vakharia, A., & Shah, M. (2023). A Comprehensive Comparative Study of Artificial Neural Network (ANN) and Support Vector Machines (SVM) on Stock Forecasting. Annals of Data Science, 10(1), 183–208. https://doi.org/10.1007/s40745-021-00344-x
Mienye, I. D., & Swart, T. G. (2024). A Comprehensive Review of Deep Learning: Architectures, Recent Advances, and Applications. Information, 15(12), 755. https://doi.org/10.3390/info15120755
Mohsin, M., & Jamaani, F. (2023). A Novel Deep-Learning Technique for Forecasting Oil Price Volatility Using Historical Prices of Five Precious Metals in Context of Green Financing – A Comparison of Deep Learning, Machine Learning, and Statistical Models. Resources Policy, 86, 104216. https://doi.org/10.1016/j.resourpol.2023.104216
Ning, Y., Kazemi, H., & Tahmasebi, P. (2022). A Comparative Machine Learning Study for Time Series Oil Production Forecasting: ARIMA, LSTM, and Prophet. Computers & Geosciences, 164, 105126. https://doi.org/10.1016/j.cageo.2022.105126
Rodríguez-Ibánez, M., Casánez-Ventura, A., Castejón-Mateos, F., & Cuenca-Jiménez, P. M. (2023). A Review on Sentiment Analysis from Social Media Platforms. Expert Systems with Applications, 223, 119862. https://doi.org/10.1016/j.eswa.2023.119862
Shah, J., Vaidya, D., & Shah, M. (2022). A Comprehensive Review on Multiple Hybrid Deep Learning Approaches for Stock Prediction. Intelligent Systems with Applications, 16, 200111. https://doi.org/10.1016/j.iswa.2022.200111
Smith, S., & O’Hare, A. (2022). Comparing Traditional News and Social Media with Stock Price Movements; Which Comes First, the News or the Price Change? Journal of Big Data, 9(1), 47. https://doi.org/10.1186/s40537-022-00591-6
Soltani, A., & Lee, C. L. (2024). The Non-Linear Dynamics of South Australian Regional Housing Markets: A Machine Learning Approach. Applied Geography, 166, 103248. https://doi.org/10.1016/j.apgeog.2024.103248
Sonkavde, G., Dharrao, D. S., Bongale, A. M., Deokate, S. T., Doreswamy, D., & Bhat, S. K. (2023). Forecasting Stock Market Prices Using Machine Learning and Deep Learning Models: A Systematic Review, Performance Analysis and Discussion of Implications. International Journal of Financial Studies, 11(3), 94. https://doi.org/10.3390/ijfs11030094
Strielkowski, W., Vlasov, A., Selivanov, K., Muraviev, K., & Shakhnov, V. (2023). Prospects and Challenges of the Machine Learning and Data-Driven Methods for the Predictive Analysis of Power Systems: A Review. Energies, 16(10), 4025. https://doi.org/10.3390/en16104025
Wibowo, A., & Sukarno, A. (2004). Reaksi Pasar Berlebihan dan Pengaruh Ukuran Perusahaan Terhadap Pembalikan Harga Saham di Bursa Efek Jakarta. Wahana. Februari, 7(1), 57–73.
Yun, K. K., Yoon, S. W., & Won, D. (2023). Interpretable Stock Price Forecasting Model Using Genetic Algorithm-Machine Learning Regressions and Best Feature Subset Selection. Expert Systems with Applications, 213, 118803. https://doi.org/10.1016/j.eswa.2022.118803
Downloads
Published
Issue
Section
License
Copyright (c) 2024 Journal of Management and Informatics
![Creative Commons License](http://i.creativecommons.org/l/by-sa/4.0/88x31.png)
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.