Optimizing Long Short -Term Memory (LSTM) Model Hyperparameters for Enhanced Stock Price Forecasting and Portfolio Allocation
- DOI
- 10.2991/978-94-6463-652-9_64How to use a DOI?
- Keywords
- Long Short-Term Memory Model; Monte-Carlo Simulation; Stock Price Forecasting
- Abstract
Due to the increasing application of Long Short-Term Memory (LSTM) models in stock price forecasting and portfolio allocation, it is crucial to tune the models for better accuracy. However, there is a limited study on how the hyperparameters of LSTM models affect the model performances. Therefore, this paper investigated the relationships between hyperparameters, particularly the number of neurons and LSTM layers, on the Mean Squared Error (MSE) of LSTM models. To shed light on practical significance, this research was conducted in the setting of portfolio optimization with a combination of LSTM stock price forecasting and Monte-Carlo Portfolio Simulation. More specifically, the LSTM model was first trained to forecast the weekly prices of five selected stocks, during which the MSE resulted from different number of neurons in the first LSTM layer as well as the total number of layers were compared. Following that, the combination of hyperparameters reaching the smallest MSE was selected for each stock, and the corresponding forecasted returns (calculated from the forecasted prices) were treated as input of the Monte-Carlo Simulation. Finally, the Monte-Carlo Simulation was employed for generating the desired portfolios. As the results demonstrated, the increase in number of layers in general leads to rising MSE, yet the increase in number of neurons in the first LSTM layer has either blurred effect or improving effects on model performances, depending on the original volatility of historical values.
- Copyright
- © 2025 The Author(s)
- Open Access
- Open Access This chapter is licensed under the terms of the Creative Commons Attribution-NonCommercial 4.0 International License (http://creativecommons.org/licenses/by-nc/4.0/), which permits any noncommercial use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.
Cite this article
TY - CONF AU - Siqi Li PY - 2025 DA - 2025/02/24 TI - Optimizing Long Short -Term Memory (LSTM) Model Hyperparameters for Enhanced Stock Price Forecasting and Portfolio Allocation BT - Proceedings of the International Workshop on Navigating the Digital Business Frontier for Sustainable Financial Innovation (ICDEBA 2024) PB - Atlantis Press SP - 615 EP - 627 SN - 2352-5428 UR - https://doi.org/10.2991/978-94-6463-652-9_64 DO - 10.2991/978-94-6463-652-9_64 ID - Li2025 ER -