Abstract
Stock price trend prediction is a challenging issue in the financial field. To get improvements in predictive performance, both data and technique are essential. The purpose of this paper is to compare deep learning model (LSTM) with two ensemble models (RF and XGboost) using multiple data. Data is gathered from four stocks of financial sector in China A-share market, and the accuracy and F1-measure are used as performance measure. The data of the past three days is applied to classify the rise and fall trend of price on the next day. The models’ performance are tested under different market styles (bull or bear market) and different market activities. The results indicate that under the same conditions, LSTM is the top algorithm followed by RF and XGBoost. For all models applied in this study, prediction performance in bull markets is much better than in bear markets, and the result in active period is better than inactive period by average. It is also found that adding data sources is not always effective in improving forecasting performance, and valuable data sources and proper processing may be more essential than providing a large quantity of data source.
Y. Xia and Y. Wang---Contributed equally to this work.
This work is supported by: Engineering Research Center of State Financial Security, Ministry of Education, Central University of Finance and Economics, Beijing, 102206, China; Program for Innovation Research in Central University of Finance and Economics.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Fama, E.F.: The behavior of stock-market prices. J. Bus. 38, 34–105 (1965)
Malkiel, B.G.: The efficient market hypothesis and its critics. J. Econ. Perspect. 17(1), 59–82 (2013)
Alpaydin, E.: Introduction to machine learning. MIT Press (2020)
Khaidem, L., Saha, S., Dey, S.R.: Predicting the direction of stock market prices using random forest. arXiv Preprint, arXiv:1605.00003 (2013)
Dey, S., Kumar, Y., Saha, S., Basak, S.: Forecasting to Classification: Predicting the Direction of Stock Market Price Using Xtreme Gradient Boosting. PESIT South Campus (2016)
White, H.: Economic prediction using neural networks: the case of IBM daily stock returns. ICNN 2, 451–458 (1988)
Yoon, Y., Swales, G.: Predicting stock price performance: a neural network approach. In: Proceedings of the Twenty-Fourth Annual Hawaii International Conference on System Sciences, vol. 4, pp. 156–162 (1991)
Bengio, Y., Simard, P., Frasconi, P.: Learning long-term dependencies with gradient descent is difficult. IEEE Trans. Neural Netw. 5(2), 157–166 (1994)
Nelson, D.M., Pereira, A.C., de Oliveira, R.A.: Stock market's price movement prediction with LSTM neural networks. In: 2017 International Joint Conference on Neural Networks (IJCNN), pp. 1419–426 (2017)
Althelaya, K.A., El-Alfy, E.S.M., Mohammed, S.: Stock market forecast using multivariate analysis with bidirectional and stacked (LSTM, GRU). In: 21st Saudi Computer Society National Computer Conference (NCC), pp. 1–7 (2018)
Deng, S., et al.: Combining technical analysis with sentiment analysis for stock price prediction. In: 2011 IEEE Ninth International Conference on Dependable, Autonomic and Secure Computing, pp. 800–807 (2011)
Skuza, M., Romanowski, A.: Sentiment analysis of Twitter data within big data distributed environment for stock prediction. In: 2015 Federated Conference on Computer Science and Information Systems (FedCSIS), pp. 1349–1354 (2015)
Roy, S.S., Chopra, R., Lee, K.C., Spampinato, C., Mohammadi-ivatlood, B.: Random forest, gradient boosted machines and deep neural network for stock price forecasting: a comparative analysis on South Korean companies. Int. J. Ad Hoc Ubiquitous Comput. 33(1), 62–71 (2020)
Teng, X., et al.: Enhancing stock price trend prediction via a time-sensitive data augmentation method. Complexity (2020)
Li, Y., Pan, Y.: A novel ensemble deep learning model for stock prediction based on stock prices and news. arXiv Preprint, arXiv:2007.12620 (2020)
Patel, J., Shah, S., Thakkar, P., Kotecha, K.: Predicting stock and stock price index movement using trend deterministic data preparation and machine learning techniques. Expert Syst. Appl. 42(1), 259–268 (2015)
Chollet, F.: Deep Learning with Python. Manning Publications (2018)
VanderPlas, J.: Python Data Science Handbook. People Post Press (2018)
XGBoost: https://github.com/NLP-LOVE/ML-NLP/blob/master/Machine%20Learning/3.3%20XGBoost/3.3%20XGBoost.md (2019)
GBDT: https://github.com/NLP-LOVE/ML-NLP/blob/master/Machine%20Learning/3.2%20GBDT/3.2%20GBDT.md (2019)
Brownlee, J.: How to Backtest Machine Learning Models for Time Series Forecasting. https://machinelearningmastery.com/backtest-machine-learning-models-time-series-forecasting/ (2016)
Zhou, Z., Gao, M., Liu, Q., Xiao, H.: Forecasting stock price movements with multiple data sources: evidence from stock market in China. Physica A: Statis. Mech. Appl. 542(3), 123389 (2020)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Xia, Y., Wang, Y. (2021). Predicting Stock Price Movement with Multiple Data Sources and Machine Learning Models. In: Zeng, J., Qin, P., Jing, W., Song, X., Lu, Z. (eds) Data Science. ICPCSEE 2021. Communications in Computer and Information Science, vol 1451. Springer, Singapore. https://doi.org/10.1007/978-981-16-5940-9_7
Download citation
DOI: https://doi.org/10.1007/978-981-16-5940-9_7
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-16-5939-3
Online ISBN: 978-981-16-5940-9
eBook Packages: Computer ScienceComputer Science (R0)