A time-series stock price prediction and asset portfolio optimization model based on long- and short-term memory networks

Ziqi Wang1
1BI Norwegian Business School, Oslo, 0445, Norway

Abstract

Aiming to address shortcomings in existing time series prediction models, this paper proposes an LSTM model enhanced by fused multi-scale convolutional attention (MCA-LSTM). We design the experimental parameters, construct a stock price dataset, and model the improved LSTM using individual stock closing prices, with prediction accuracy evaluated via RMSE, MAPE, and MAD. To assess the arbitrage and generalization performance of the MCA-LSTM portfolio model, we compare the application of the MCA-LSTM-BL model. Furthermore, within the framework of a mean semi-absolute deviation (MSAD) portfolio optimization model, we develop a new portfolio optimization approach based on return forecasting (MCA-LSTM+MSAD). The asset values and return predictions of various portfolio models are analyzed under transaction cost considerations, and the proposed MCA-LSTM+MSAD model achieves an excess return of 56.98%, consistently maintaining the highest portfolio value throughout the trading period. Overall, our findings indicate that the MCA-LSTM+MSAD model is a promising tool for portfolio optimization and warrants further development for real investment applications.

Keywords: LSTM model, attention mechanism, stock price prediction, msad, portfolio