logic has a selectivity for past information when
calculating the current state information, i.e., whether
the current information is generated by past
information while the LSTM algorithm selects the
same proportion of past and present information for
output. Under the soaring trend of stock price, the
GRU algorithm is more likely to strengthen the
weights of the features involved in the rising trend to
get better prediction results. While the weights of the
features just under a single-period wave are
strengthened in the cyclical fluctuations, this high
weight memory by GRU cause a decrease in the
accuracy in the multi-period fluctuations.
For the fluctuation type that show slump in stock
price (603605.SH), the R
of three algorithms are
all larger than 0.6, showing a good correlation.
However, the MSE value is as high as 45 and the
RMSE and Mae values are also large, which can
hardly be used as a short-term stock price forecast.
The main reason is that the stock price related data is
more complicated in the plunge market than in the
rise market. As in psychology, people are more risk
averse compared to profit taking, and the panic of the
plunge leads to too large initialized values of weights
and more outliers. Moreover, the amount of learning
data is not enough to adjust them, resulting in the
large final MSE value, although the correlation
coefficient is good.
5 CONCLUSIONS
For the four different fluctuation types of the stock
price in 2 years, this paper uses three different
algorithms, RNN, LSTM, and GRU, to perform stock
price prediction, and the prediction accuracy of each
algorithm differs significantly.
1) For the fluctuation type in which stock price is
almost stable, there is not much difference in
prediction accuracy between various algorithms.
2) LSTM algorithm is most suitable for the
fluctuation type with large periodic fluctuation of
stock price, while GRU algorithm is most suitable for
extracting eigenvalues and making the most accurate
prediction under the soaring trend.
3) The performance of the three algorithms is not
satisfactory for the fluctuation type that shows a
slump in stock price. The author plans to follow up
with some new optimization algorithms for
experimentation. In addition, due to the randomness
of the algorithm, 10 trials in each experimental group
may not be enough to find the best-fit point, which
can easily cause errors in the algorithm comparison.
The four types of fluctuation situations selected in
this paper do not represent all fluctuation situations in
the actual stock market. This paper only points out
that the fluctuation type of stock price significantly
impacts the accuracy of the prediction under a deep
learning algorithm. To improve the prediction
accuracy and optimize the algorithm model, choosing
the suitable algorithm fit for the particular fluctuation
situation in stock price is also the main point. Future
research will perform applicability analysis for
prediction under advanced algorithms based on more
complex fluctuation types of stock price.
REFERENCES
Chung, J., Gulcehre, C., Cho, K., & Bengio, Y. (2014).
Empirical evaluation of gated recurrent neural
networks on sequence modeling.
Ding, Q., Wu, S., Sun, H., Guo, J., & Guo, J. (2020).
Hierarchical Multi-Scale Gaussian Transformer for
Stock Movement Prediction. In IJCAI (pp. 4640-4646).
Jiang Weiwei. (2021). Applications of deep learning in
stock market prediction: Recent progress. Expert
Systems with Applications, 184
Jin, Z., Yang, Y. & Liu, Y. Stock closing price prediction
based on sentiment analysis and LSTM. Neural
Comput & Applic 32, 9713–9729 (2020).
https://doi.org/10.1007/s00521-019-04504-2
Kingma, D. P., & Ba, J. (2014). Adam: A method for
stochastic optimization. Computer Science.
Pan Wei and Li Jide and Li Xiaoqiang. (2020). Portfolio
Learning Based on Deep Learning. Future Internet,
12(11), pp. 202-202.
Raschka, S., & Mirjalili, V. (2017). Python Machine
Learning: Machine Learning and Deep Learning with
Python. Scikit-Learn, and TensorFlow. Second edition
ed.
S. Zhang and H. Zhang, "Prediction of Stock Closing Prices
Based on Attention Mechanism," 2020 16th Dahe
Fortune China Forum and Chinese High-educational
Management Annual Academic Conference
(DFHMC), 2020, pp. 244-248, doi:
10.1109/DFHMC52214.2020.00053.
Scardapane, S., & Wang, D. (2017). Randomness in neural
networks: an overview. Wiley Interdisciplinary
Reviews: Data Mining and Knowledge
Discovery, 7(2), e1200.
Shahi TB, Shrestha A, Neupane A, Guo W. Stock Price
Forecasting with Deep Learning: A Comparative
Study. Mathematics. 2020, 8(9):1441.
https://doi.org/10.3390/math8091441
Zhang, X., LI, C., Chen, K-L., Chrysostomou, D., & Yang,
H. (2021) Stock Prediction with Stacked-LSTM Neural
Networks. The 21st IEEE International Conference on
Software Quality, Reliability, and Security.