Article contents
Stock Price Prediction through STL Decomposition using Multivariate Two-way Long Short-term Memory
Abstract
With advancements in machine-learning techniques, stock-price movements can ostensibly be forecasted using time-series data. In this study, several different types of long short-term memory (LSTM) are used to predict the closing prices of Japanese stocks five days into the future. Also, in this study, four different features [i.e., simple moving average (SMA), linear weighted moving average (WMA), exponential WMA (EMA), and the Savitzky–Golay (SG) metric] are generated from daily stock-price data and split into two components (i.e., trend and seasonal) by applying seasonal–trend decomposition using Loess (STL) decomposition. The prediction results are evaluated in terms of return, root-mean-square error (RMSE), mean absolute error (MAE), and other relevant measures of accuracy and relevancy. As a result, the multivariate two-way LSTM model yielded the highest overall performance. With respect to the RMSE and MAE of the training data, the multivariate two-way LSTM was not superior to the other models. However, with respect to RMSE and MAE on the validation data, it was the best. Also, the multivariate two-way LSTM model yielded the highest overall performance in terms of the accuracy of the direction of stock prices.