Advances in Economics, Management and Political Sciences

- The Open Access Proceedings Series for Conferences


Proceedings of the 2nd International Conference on Financial Technology and Business Analysis

Series Vol. 49 , 01 December 2023


Open Access | Article

Forecasting Sector Rotation of A-share Market Using LSTM and Random Forest

Liwen Yin * 1
1 Guangdong University of Finance and Economics, Guangzhou City, Guangdong Province, China

* Author to whom correspondence should be addressed.

Advances in Economics, Management and Political Sciences, Vol. 49, 109-123
Published 01 December 2023. © 2023 The Author(s). Published by EWA Publishing
This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Citation Liwen Yin. Forecasting Sector Rotation of A-share Market Using LSTM and Random Forest. AEMPS (2023) Vol. 49: 109-123. DOI: 10.54254/2754-1169/49/20230493.

Abstract

To improve the efficacy of stock prediction strategies, researching sector rotation is essential. This study addresses the sector rotation problem in the A-share market and proposes an approach that leverages LSTM and random forest models to forecast sector rotation trends. Extensive evaluations are conducted to assess the models' prediction accuracy, comparing different evaluation indicators. The random search algorithm is employed to optimize model parameters, while the adaptive learning rate Adam algorithm is utilized to enhance convergence performance. The final experimental results demonstrate the remarkable accuracy of the LSTM model, achieving an impressive 88% accuracy in predicting sector rotation in the A-share market. Meanwhile, the random forest model achieves an accuracy of 86%. Furthermore, a combination of the bagging algorithm based on LSTM and random forest (LSTM-RF Bagging model) is employed for in-depth research, which exhibits even better performance with an accuracy of approximately 89%. The predictability of A-share market sector rotation is evident, and both LSTM and random forest models, along with new combination, prove to be suitable for forecasting. The findings in this paper serve as a valuable reference for investors, aiding them in making informed decisions regarding sector selection and asset allocation.

Keywords

sector rotation, A-share market, random forest, LSTM, forecasting

References

1. JEGADEESH, N. and TITMAN, S. (1993), Returns to Buying Winners and Selling Losers: Implications for Stock Market Efficiency. The Journal of Finance, 48: 65-91. https://doi.org/10.1111/j.1540-6261.1993.tb04702.x

2. Lee, C.M.C. and Swaminathan, B. (2000), Price Momentum and Trading Volume. The Journal of Finance, 55: 2017-2069. https://doi.org/10.1111/0022-1082.00280

3. Bradley T. Ewing (2002) The transmission of shocks among S&P indexes, Applied Financial Economics, 12:4, 285-290, DOI: 10.1080/09603100110090172

4. Mateus, C., Sarwar, G., & Todorovic, N. (2018). US sector rotation with five-factor Fama-French alphas. Journal of Asset Management, 19(2). https://doi.org/10.1057/s41260-017-0067-2

5. ZHANG Xin. (2020). Research on the Rotation Effect of Stock Market Sector and the Drive of Macro Economy. Special Zone Economy (05),130-132.

6. JIN Xiu, CHEN Na, & WANG Jia. (2020). Empirical Study on Cross—industry Asset Allocation Model under the Perspective of Flight—to—quality. Chinese Journal of Management Science (11),12-22. doi:10.16381/j.cnki.issn1003-207x.2020.11.002.

7. Shuai Wang, Zhongyan Li, Jinyun Zhu, Zhicen Lin, Meiru Zhong. Stock selection strategy of A-share market based on rotation effect and random forest[J]. AIMS Mathematics, 2020, 5(5): 4563-4580. doi: 10.3934/math.2020293

8. Rubio, L., & Alba, K. (2022). Forecasting Selected Colombian Shares Using a Hybrid ARIMA-SVR Model. Mathematics, 10(13), 2181. https://doi.org/10.3390/math10132181

9. Hansun, S., Young, J.C. Predicting LQ45 financial sector indices using RNN-LSTM. J Big Data 8, 104 (2021). https://doi.org/10.1186/s40537-021-00495-x

10. S. Liu, G. Liao and Y. Ding, "Stock transaction prediction modeling and analysis based on LSTM," 2018 13th IEEE Conference on Industrial Electronics and Applications (ICIEA), Wuhan, China, 2018, pp. 2787-2790, doi: 10.1109/ICIEA.2018.8398183.

11. Jigar Patel, Sahil Shah, Priyank Thakkar, K Kotecha. (2015) Predicting stock and stock price index movement using Trend Deterministic Data Preparation and machine learning techniques. Expert Systems with Applications, (42), 259-268.

12. Yin, L., et al.: Research on stock trend prediction method based on optimized random forest.CAAITrans.Intell.Technol.8(1),274–284(2023). https://doi.org/10.1049/cit2.12067

13. Zaheer, S., Anjum, N., Hussain, S., Algarni, A. D., Iqbal, J., Bourouis, S., & Ullah, S. S. (2023). A Multi Parameter Forecasting for Stock Time Series Data Using LSTM and Deep Learning Model. Mathematics, 11(3), 590. https://doi.org/10.3390/math11030590

14. Bergstra, J., & Bengio, Y. (2012). Random search for hyper-parameter optimization. Journal of machine learning research, 13(2).

15. Kingma, D. P., & Ba, J. (2014). Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980.

16. Chawla, N. V., Bowyer, K. W., Hall, L. O., & Kegelmeyer, W. P. (2002). SMOTE: synthetic minority over-sampling technique. Journal of artificial intelligence research, 16, 321-357.

Data Availability

The datasets used and/or analyzed during the current study will be available from the authors upon reasonable request.

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. Authors who publish this series agree to the following terms:

1. Authors retain copyright and grant the series right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this series.

2. Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the series's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this series.

3. Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See Open Access Instruction).

Volume Title
Proceedings of the 2nd International Conference on Financial Technology and Business Analysis
ISBN (Print)
978-1-83558-145-2
ISBN (Online)
978-1-83558-146-9
Published Date
01 December 2023
Series
Advances in Economics, Management and Political Sciences
ISSN (Print)
2754-1169
ISSN (Online)
2754-1177
DOI
10.54254/2754-1169/49/20230493
Copyright
© 2023 The Author(s)
Open Access
This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited

Copyright © 2023 EWA Publishing. Unless Otherwise Stated