Skip to main content

Stock Volatility Prediction Based on Transformer Model Using Mixed-Frequency Data

  • Conference paper
  • First Online:
Web and Big Data (APWeb-WAIM 2023)

Abstract

With the increasing volume of high-frequency data in the information age, both challenges and opportunities arise in the prediction of stock volatility. On one hand, the outcome of prediction using tradition method combining stock technical and macroeconomic indicators still leaves room for improvement; on the other hand, macroeconomic indicators and peoples’ search record on those search engines affecting their interested topics will intuitively have an impact on the stock volatility. For the convenience of assessment of the influence of these indicators, macroeconomic indicators and stock technical indicators are then grouped into objective factors, while Baidu search indices implying people’s interested topics are defined as subjective factors. To align different frequency data, we introduce GARCH-MIDAS model. After mixing all the above data, we then feed them into Transformer model as part of the training data. Our experiments show that this model outperforms the baselines in terms of mean square error. The adaption of both types of data under Transformer model significantly reduces the mean square error from 1.00 to 0.86.

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 149.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 219.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. Andersen, T.G., Bollerslev, T.: Answering the skeptics: yes, standard volatility models do provide accurate forecasts. Int. Econ. Rev. 39 (1998)

    Google Scholar 

  2. Audrino, F., Sigrist, F., Ballinari, D.: The impact of sentiment and attention measures on stock market volatility. Int. J. Forecast. 36(2), 334–357 (2020)

    Article  Google Scholar 

  3. Choudhury, S., Ghosh, S., Bhattacharya, A., Fernandes, K.J., Tiwari, M.K.: A real time clustering and SVM based price-volatility prediction for optimal trading strategy. Neurocomputing 131(131), 419–426 (2014)

    Article  Google Scholar 

  4. Christiansen, C., Schmeling, M., Schrimpf, A.: A comprehensive look at financial volatility prediction by economic variables. In: School of Economics and Management, University of Aarhus (2010)

    Google Scholar 

  5. Dosovitskiy, A., et al.: An image is worth 16x16 words: transformers for image recognition at scale. In: International Conference on Learning Representations (2021)

    Google Scholar 

  6. Engle, R.F.: Autoregressive conditional heteroscedasticity with estimates of the variance of united kingdom inflation. Econometrica: J. Econometric Soc. 987–1007 (1982)

    Google Scholar 

  7. Engle, R.F., Gonzalo, J., Rangel, J.G.: The spline-garch model for low-frequency volatility and its global macroeconomic causes. Rev. Financ. Stud. 21(3), 1187–1222 (2008)

    Google Scholar 

  8. Ghysels, E., Santa-Clara, P., Valkanov, R.: Predicting volatility: getting the most out of return data sampled at different frequencies. J. Econometrics (2006)

    Google Scholar 

  9. Gilles, Z.: Volatility processes and volatility forecast with long memory. Quant. Finance (2004)

    Google Scholar 

  10. Gu, H.: Research on Volatility Forecasting Modeling of CSI300 with Investor Sentiment. Master’s thesis, Nanjing University (2020)

    Google Scholar 

  11. Hansen, P.R., Lunde, A.: A realized variance for the whole day based on intermittent high-frequency data. Soc. Sci. Electron. Publish. 3(4), 525–554 (2005)

    Google Scholar 

  12. Hartwell, C.A.: The impact of institutional volatility on financial volatility in transition economies. J. Comput. Econ. 46(2), 598–615 (2018)

    Article  Google Scholar 

  13. Hisano, R., Sornette, D., Mizuno, T., Ohnishi, T., Watanabe, T.: High quality topic extraction from business news explains abnormal financial market volatility. PLoS ONE 8(6), e64846 (2013)

    Article  Google Scholar 

  14. Hu, Y., Ni, J., Wen, L.: A hybrid deep learning approach by integrating LSTM-ANN networks with garch model for copper price volatility prediction. Physica, A. Stat. Mech. Appl. 557(1) (2020)

    Google Scholar 

  15. Kim, H.Y., Won, C.H.: Forecasting the volatility of stock price index: a hybrid model integrating LSTM with multiple garch-type models. Expert Syst. Appl. 103(Aug.), 25–37 (2018)

    Google Scholar 

  16. Li, S.: Predicting A-share Market Volatility Based on Recurrent Neural Networks and Baidu Index. Master’s thesis, Shandong University (2019)

    Google Scholar 

  17. Liu, F., Wu, J., Ynag, X., Ouyang, Z.: Long-run dynamic effect of macro-economy on stock market volatility based on mixed frequency data model. Chin. J. Manag. Sci. 28(10), 65–76 (2020)

    Google Scholar 

  18. Lv, Y., Guo, S., Chen, Y., Li, W.: Stock volatility prediction using tabnet based deep learning method. In: 2022 3rd International Conference on Big Data, Artificial Intelligence and Internet of Things Engineering (ICBAIE), pp. 665–668. IEEE (2022)

    Google Scholar 

  19. Moon, K.S., Kim, H.: Performance of deep learning in prediction of stock market volatility. Econ. Comput. Econ. Cybern. Stud. Res. / Acad. Econ. Stud. 53(2/2019), 77–92 (2019)

    Google Scholar 

  20. Piplack, J.: Estimating and forecasting asset volatility and its volatility: a Markov-switching range model. Utrecht School of Economics (2009)

    Google Scholar 

  21. Schulte-Tillman, B., Segnon, M., Wilfling, B.: Financial-market volatility prediction with multiplicative Markov-switching MIDAS components. In: CQE Working Papers (2022)

    Google Scholar 

  22. Shengli, C., Tao, G., Yijun, L.I.: Forecasting realized volatility of Chinese stock index futures based on jumps, good-bad volatility and Baidu index. Systems Eng.-Theory Pract. (2018)

    Google Scholar 

  23. Taylor, S.J.: Modeling stochastic volatility: a review and comparative study. Math. Financ. 4(2), 183–204 (1994)

    Article  Google Scholar 

  24. Umar, Y.H., Adeoye, M.: A Markov regime switching approach of estimating volatility using Nigerian stock market. Am. J. Theor. Appl. Stat. 9(4), 80–89 (2020)

    Article  Google Scholar 

  25. Vaswani, A., et al.: Attention is all you need. In: Advances in Neural Information Processing Systems, vol. 30 (2017)

    Google Scholar 

  26. Vidal, A., Kristjanpoller, W.: Gold volatility prediction using a CNN-LSTM approach. Expert Syst. Appl. 157, 113481 (2020)

    Article  Google Scholar 

  27. Wang, P.: Research on the impact of margin financing and margin trading on the stock price fluctuation of listed companies. Soc. Med. Health Manag. (2020)

    Google Scholar 

  28. Zhang, M.: Research on Shanghai Composite Forecast Based on Lasso Dimensionality Reduction, LSTM and Mixed Frequency Models. Ph.D. thesis, Donghua University (2021)

    Google Scholar 

  29. Zhang, X., Wang, J., Cheng, N., Sun, Y., Zhang, C., Xiao, J.: Machine unlearning methodology base on stochastic teacher network. In: 19th International Conference on Advanced Data Mining and Applications (2023)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Guilin Jiang .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2024 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Liu, W. et al. (2024). Stock Volatility Prediction Based on Transformer Model Using Mixed-Frequency Data. In: Song, X., Feng, R., Chen, Y., Li, J., Min, G. (eds) Web and Big Data. APWeb-WAIM 2023. Lecture Notes in Computer Science, vol 14332. Springer, Singapore. https://doi.org/10.1007/978-981-97-2390-4_6

Download citation

  • DOI: https://doi.org/10.1007/978-981-97-2390-4_6

  • Published:

  • Publisher Name: Springer, Singapore

  • Print ISBN: 978-981-97-2389-8

  • Online ISBN: 978-981-97-2390-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics