Skip to main content

Stock Return Prediction Using Dual-Stage Attention Model with Stock Relation Inference

  • Conference paper
  • First Online:
Intelligent Information and Database Systems (ACIIDS 2020)

Abstract

Deep learning models have become widely accessible for stock prediction tasks. However, most of the research in this area focuses on only a single stock or an index and often formulates the problem to optimize only on the accuracy. Our paper proposed a more profit-oriented framework by formulating the problem into multiple stock returns prediction as well as introducing a relation inference for stock ranking. This setup can diversify investment and eventually enhance trading profits while maintaining the regression accuracy. Moreover, it is become more challenging to process multiple time-series features simultaneously because of the great variety of available information in the financial market. We mitigate this with the state-of-the-art model for time-series forecasting, the Dual-stage attention recurrent neural networks (DA-RNN), and train them with the shared-parameter model setting. The attention layer within DA-RNN helps the model captures the relevance insight among the features. We conducted experiments on major 64 target stocks from the SET market with RMSE, mean reciprocal rank, and annualized profit returns as evaluation metrics. The results show that our proposed model framework (DA-RANK) can predict multiple stock returns in ranking order and able to produce a desirable improvement in profitability over other baseline models.

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 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.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

Notes

  1. 1.

    The provided information was retrieved via the SET SMART portal with permission granted for academic purposes.

  2. 2.

    SET100 index includes top stock with high market capitalization and trading volumes. We select SET100 Thai market capital as of 7 February 2018. These 64 stocks started trading before 2008 and still active in 2018.

  3. 3.

    SET 64 refers to the 64 target stocks, we invested in equally size (e.g. 1000 dollars per stock).

  4. 4.

    The outputs from LSTM/ DA-RNN are transformed from price to return using Eq. 1.

  5. 5.

    This strategy assumes that the trading volume always sufficient to satisfy buying or selling at close price. And the fee is neglected but we can recalculate percent profit after fee with: \( \% Return_{after\;fee} = \% Return_{before\;fee} \times \left( {1 - fee} \right)^{2} \).

References

  1. Fama, E.F.: Efficient capital markets: a review of theory and empirical work. J. Financ. 25(2), 383–417 (1970). https://doi.org/10.2307/2325486

    Article  Google Scholar 

  2. Malkiel, B.G.: Reflections on the efficient market hypothesis: 30 years later. Financ. Rev. 40(1), 1–9 (2005)

    Article  Google Scholar 

  3. Qin, Y., Song, D., Chen, H., Cheng, W., Jiang, G., Cottrell, G.: A dual-stage attention-based recurrent neural network for time series prediction. arXiv e-prints (2017)

    Google Scholar 

  4. Feng, F., He, X., Wang, X., Luo, C., Liu, Y., Chua, T.-S.: Temporal relational ranking for stock prediction. ACM Trans. Inf. Syst. 37, 1–30 (2019). https://doi.org/10.1145/3309547

    Article  Google Scholar 

  5. Ballings, M., Van den Poel, D., Hespeels, N., Gryp, R.: Evaluating multiple classifiers for stock price direction prediction. Expert Syst. Appl. 42(20), 7046–7056 (2015)

    Article  Google Scholar 

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

  7. Fischer, T., Krauss, C.: Deep learning with long short-term memory networks for financial market predictions. Eur. J. Oper. Res. 270(2), 654–669 (2018). https://doi.org/10.1016/j.ejor.2017.11.054

    Article  MathSciNet  MATH  Google Scholar 

  8. Chen, K., Zhou, Y., Dai, F.: A LSTM-based method for stock returns prediction: a case study of china stock market. In: 2015 IEEE International Conference on Big Data (Big Data), pp. 2823–2824. IEEE (2015)

    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–1426. IEEE (2017)

    Google Scholar 

  10. Hochreiter, S., Schmidhuber, J.: Long short-term memory. Neural Comput. 9(8), 1735–1780 (1997). https://doi.org/10.1162/neco.1997.9.8.1735

    Article  Google Scholar 

  11. Sezer, O.B., Ozbayoglu, A.M.: Algorithmic financial trading with deep convolutional neural networks: time series to image conversion approach. Appl. Soft Comput. 70, 525–538 (2018). https://doi.org/10.1016/j.asoc.2018.04.024

    Article  Google Scholar 

  12. Hollis, T., Viscardi, A., Yi, S.E.: A comparison of LSTMs and attention mechanisms for forecasting financial time series. CoRR abs/1812.07699 (2018)

    Google Scholar 

  13. Guo, T., Lin, T.: Multi-variable LSTM neural network for autoregressive exogenous model. arXiv preprint arXiv:1806.06384 (2018)

  14. Akita, R., Yoshihara, A., Matsubara, T., Uehara, K.: Deep learning for stock prediction using numerical and textual information. In: 2016 IEEE/ACIS 15th International Conference on Computer and Information Science (ICIS), 26–29 June 2016, pp. 1–6 (2016)

    Google Scholar 

  15. Ioffe, S., Szegedy, C.: Batch normalization: accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167 (2015)

  16. Oncharoen, P., Vateekul, P.: Deep learning using risk-reward function for stock market prediction. Paper Presented at the 2018 2nd International Conference on Computer Science and Artificial Intelligence, Shenzhen, China (2018)

    Google Scholar 

Download references

Acknowledgment

Our work is partly supported on the research budget by Capital Market Research Institute (CMRI), The Stock Exchange of Thailand (SET), during Capital Market Research Innovation contest 2019. and permission to use the SET SMART dataset for academic purposes from the Financial Laboratory, Chulalongkorn Business School and Asst. Prof. Tanakorn Likitapiwat.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Peerapon Vateekul .

Editor information

Editors and Affiliations

Appendix

Appendix

Table 6. Fundamentals and price data description, 52 attributes in total

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Chiewhawan, T., Vateekul, P. (2020). Stock Return Prediction Using Dual-Stage Attention Model with Stock Relation Inference. In: Nguyen, N., Jearanaitanakij, K., Selamat, A., Trawiński, B., Chittayasothorn, S. (eds) Intelligent Information and Database Systems. ACIIDS 2020. Lecture Notes in Computer Science(), vol 12033. Springer, Cham. https://doi.org/10.1007/978-3-030-41964-6_42

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-41964-6_42

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-41963-9

  • Online ISBN: 978-3-030-41964-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics