Skip to main content

Predicting Stock Price Movement with Multiple Data Sources and Machine Learning Models

  • Conference paper
  • First Online:
Data Science (ICPCSEE 2021)

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 1451))

  • 1042 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 99.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 129.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Fama, E.F.: The behavior of stock-market prices. J. Bus. 38, 34–105 (1965)

    Article  Google Scholar 

  2. Malkiel, B.G.: The efficient market hypothesis and its critics. J. Econ. Perspect. 17(1), 59–82 (2013)

    Article  Google Scholar 

  3. Alpaydin, E.: Introduction to machine learning. MIT Press (2020)

    MATH  Google Scholar 

  4. Khaidem, L., Saha, S., Dey, S.R.: Predicting the direction of stock market prices using random forest. arXiv Preprint, arXiv:1605.00003 (2013)

  5. 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)

    Google Scholar 

  6. White, H.: Economic prediction using neural networks: the case of IBM daily stock returns. ICNN 2, 451–458 (1988)

    Google Scholar 

  7. 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)

    Google Scholar 

  8. Bengio, Y., Simard, P., Frasconi, P.: Learning long-term dependencies with gradient descent is difficult. IEEE Trans. Neural Netw. 5(2), 157–166 (1994)

    Article  Google Scholar 

  9. 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)

    Google Scholar 

  10. 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)

    Google Scholar 

  11. 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)

    Google Scholar 

  12. 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)

    Google Scholar 

  13. 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)

    Article  Google Scholar 

  14. Teng, X., et al.: Enhancing stock price trend prediction via a time-sensitive data augmentation method. Complexity (2020)

    Google Scholar 

  15. 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)

  16. 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)

    Article  Google Scholar 

  17. Chollet, F.: Deep Learning with Python. Manning Publications (2018)

    Google Scholar 

  18. VanderPlas, J.: Python Data Science Handbook. People Post Press (2018)

    Google Scholar 

  19. XGBoost: https://github.com/NLP-LOVE/ML-NLP/blob/master/Machine%20Learning/3.3%20XGBoost/3.3%20XGBoost.md (2019)

  20. GBDT: https://github.com/NLP-LOVE/ML-NLP/blob/master/Machine%20Learning/3.2%20GBDT/3.2%20GBDT.md (2019)

  21. Brownlee, J.: How to Backtest Machine Learning Models for Time Series Forecasting. https://machinelearningmastery.com/backtest-machine-learning-models-time-series-forecasting/ (2016)

  22. 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)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics