Stockformer: A Price-Volume Factor Stock Selection Model Based on Wavelet Transform and Multi-Task Self-Attention Networks (2401.06139v2)
Abstract: As the Chinese stock market continues to evolve and its market structure grows increasingly complex, traditional quantitative trading methods are facing escalating challenges. Particularly, due to policy uncertainty and the frequent market fluctuations triggered by sudden economic events, existing models often struggle to accurately predict market dynamics. To address these challenges, this paper introduces Stockformer, a price-volume factor stock selection model that integrates wavelet transformation and a multitask self-attention network, aimed at enhancing responsiveness and predictive accuracy regarding market instabilities. Through discrete wavelet transform, Stockformer decomposes stock returns into high and low frequencies, meticulously capturing long-term market trends and short-term fluctuations, including abrupt events. Moreover, the model incorporates a Dual-Frequency Spatiotemporal Encoder and graph embedding techniques to effectively capture complex temporal and spatial relationships among stocks. Employing a multitask learning strategy, it simultaneously predicts stock returns and directional trends. Experimental results show that Stockformer outperforms existing advanced methods on multiple real stock market datasets. In strategy backtesting, Stockformer consistently demonstrates exceptional stability and reliability across market conditions-whether rising, falling, or fluctuating-particularly maintaining high performance during downturns or volatile periods, indicating a high adaptability to market fluctuations. To foster innovation and collaboration in the financial analysis sector, the Stockformer model's code has been open-sourced and is available on the GitHub repository: https://github.com/Eric991005/Multitask-Stockformer.
- What is the value of the cross-sectional approach to deep reinforcement learning? Quantitative Finance, 21, 1239–1256. doi:10.1080/14697688.2021.2001032.
- An empirical evaluation of generic convolutional and recurrent networks for sequence modeling. arXiv preprint arXiv:1803.01271, . doi:10.48550/arXiv.1803.01271.
- Singular spectrum decomposition: a new method for time series decomposition. Advances in Adaptive Data Analysis, 6, 1450011. doi:10.1142/S1793536914500113.
- Chan, E. P. (2021). Quantitative trading: how to build your own algorithmic trading business. John Wiley & Sons.
- A signal decomposition theorem with hilbert transform and its application to narrowband time series with closely spaced frequency components. Mechanical Systems and Signal Processing, 28, 258–279. doi:10.1016/J.YMSSP.2011.02.002.
- Xgboost: A scalable tree boosting system. In Proceedings of the 22nd acm sigkdd international conference on knowledge discovery and data mining (pp. 785–794). doi:10.1145/2939672.2939785.
- Learning phrase representations using rnn encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078, . doi:10.48550/arXiv.1406.1078.
- Stl: A seasonal-trend decomposition procedure based on loess. Journal of Official Statistics, 6, 3.
- Seasonal adjustment methods and real time trend-cycle estimation. Springer. doi:10.1007/978-3-319-31822-6.
- De Prado, M. L. (2018). Advances in financial machine learning. John Wiley & Sons.
- Deep learning for event-driven stock prediction. In Twenty-fourth international joint conference on artificial intelligence. doi:10.5555/2832415.2832572.
- Catboost: gradient boosting with categorical features support. arXiv preprint arXiv:1810.11363, . doi:10.48550/arXiv.1810.11363.
- The cross-section of expected stock returns. the Journal of Finance, 47, 427–465. doi:10.2139/ssrn.2511246.
- A five-factor asset pricing model. Journal of financial economics, 116, 1–22. doi:10.1016/j.jfineco.2014.10.010.
- Spatio-temporal meets wavelet: Disentangled traffic flow forecasting via efficient spectral graph attention network. arXiv e-prints, (pp. arXiv–2112). doi:10.48550/arXiv.2112.02740.
- Empirical characteristics of dynamic trading strategies: The case of hedge funds. The review of financial studies, 10, 275–302. doi:10.1093/rfs/10.2.275.
- A modelling of s&p 500 index price based on us economic indicators: Machine learning approach. Engineering Economics, 32, 362–375. doi:10.5755/j01.ee.32.4.27985.
- Georgakopoulos, H. (2015). Quantitative trading with R: understanding mathematical and computational tools from a quant’s perspective. Springer.
- The characteristics that provide independent information about average us monthly stock returns. The Review of Financial Studies, 30, 4389–4436. doi:10.2139/ssrn.2262374.
- Quant 4.0: Engineering quantitative investment with automated, explainable and knowledge-driven artificial intelligence. arXiv preprint arXiv:2301.04020, . URL: http://arxiv.org/pdf/2301.04020. doi:10.48550/arXiv.2301.04020.
- Long short-term memory. Neural computation, 9, 1735–1780. doi:10.1162/neco.1997.9.8.1735.
- Quantitative trading strategy based on simplified dpg. Healthcare Bulletin of Economics and Management, 13, 8616. URL: https://drpress.org/ojs/index.php/HBEM/article/download/8616/8386. doi:10.54097/hbem.v13i.8616.
- The empirical mode decomposition and the hilbert spectrum for nonlinear and non-stationary time series analysis. Proceedings of the Royal Society of London. Series A: Mathematical, Physical and Engineering Sciences, 454, 903–995. doi:10.1098/rspa.1998.0193.
- Deep reinforcement learning agent for s&p 500 stock selection. Axioms, 9, 130. doi:10.3390/axioms9040130.
- Predicting stock movement direction with machine learning: An extensive study on s&p 500 stocks. In 2017 IEEE International Conference on Big Data (Big Data) (pp. 4705–4713). IEEE. doi:10.1109/BigData.2017.8258518.
- Lightgbm: A highly efficient gradient boosting decision tree. Advances in neural information processing systems, 30. doi:10.5555/3294996.3295074.
- Forecasting crude oil prices with major s&p 500 stock prices: Deep learning, gaussian process, and vine copula. Axioms, 11, 375. doi:10.3390/axioms11080375.
- Deep neural networks, gradient-boosted trees, random forests: Statistical arbitrage on the s&p 500. European Journal of Operational Research, 259, 689–702. doi:10.1016/j.ejor.2016.10.031.
- A deep learning approach with extensive sentiment analysis for quantitative investment. Electronics, 12. doi:10.3390/electronics12183960. [Online]. Available: https://www.mdpi.com/2079-9292/12/18/3960.
- Multi-task representation learning for travel time estimation. In Proceedings of the 24th ACM SIGKDD international conference on knowledge discovery & data mining (pp. 1695–1704). doi:10.1145/3219819.3220033.
- Macchiarulo, A. (2018). Predicting and beating the stock market with machine learning and technical analysis. Journal of Internet Banking and Commerce, 23, 1–22. URL: https://api.semanticscholar.org/CorpusID:158446761.
- Spatial and temporal normalization for multi-variate time series prediction using machine learning algorithms. Electronics, 11, 3167. doi:10.3390/electronics111931676.
- Quantitative equity portfolio management: modern techniques and applications. CRC Press.
- Financial series prediction: Comparison between precision of time series models and machine learning methods. arXiv preprint arXiv:1706.00948, . doi:10.48550/arXiv.1706.00948.
- struc2vec: Learning node representations from structural identity. In Proceedings of the 23rd ACM SIGKDD international conference on knowledge discovery and data mining (pp. 385–394). doi:10.1145/3097983.3098061.
- Ross, S. (1977). The capital asset pricing model (capm), short‐sale restrictions and related issues. The Journal of Finance, 32, 177–183. URL: https://dx.doi.org/10.1111/J.1540-6261.1977.TB03251.X. doi:10.1111/J.1540-6261.1977.TB03251.X.
- Representation learning for clinical time series prediction tasks in electronic health records. BMC Medical Informatics and Decision Making, 19, 1–12. doi:10.1109/bibm.2018.8621136.
- Singh, P. (2018). Novel fourier quadrature transforms and analytic signal representations for nonlinear and non-stationary time-series analysis. Royal Society open science, 5, 181131. doi:10.1098/rsos.181131.
- Graph attention networks. stat, 1050, 10–48550. doi:10.17863/CAM.48429.
- Intelligent optimization based multi-factor deep learning stock selection model and quantitative trading strategy. Mathematics, 10. doi:10.3390/math10040566. [Online]. Available: https://www.mdpi.com/2227-7390/10/4/566.
- Alstm: An attention-based long short-term memory framework for knowledge base reasoning. Neurocomputing, 399, 342–351. doi:10.1016/j.neucom.2020.02.065.
- Characteristic-based clustering for time series data. Data mining and knowledge Discovery, 13, 335–364. doi:10.1007/s10618-005-0039-x.
- Research on quantitative investment strategies based on deep learning algorithms in the context of the need for information management. In 2022 IEEE International Conference on Industrial Management (ICIM). IEEE. doi:10.1109/ICIM56520.2022.00048 [Online]. Available: https://dx.doi.org/10.1109/ICIM56520.2022.00048.
- Instance-wise graph-based framework for multivariate time series forecasting. arXiv preprint arXiv:2109.06489, . doi:10.48550/arXiv.2109.06489.
- Effective travel time estimation: When historical trajectories over road networks matter. In Proceedings of the 2020 acm sigmod international conference on management of data (pp. 2135–2149). doi:10.1145/3318464.3389771.
- Applications of markov decision process model and deep learning in quantitative portfolio management during the covid-19 pandemic. Systems, 10, 146. URL: https://www.mdpi.com/2079-8954/10/5/146. doi:10.3390/systems10050146.
- Preserving locality in vision transformers for class incremental learning. arXiv preprint arXiv:2304.06971, . doi:10.48550/arXiv.2304.06971.
- Research on analysis and application of quantitative investment strategies based on deep learning. Advances in Computer Science and its Applications, . doi:10.25236/AJCIS.2023.061004.
- Back propagation bidirectional extreme learning machine for traffic flow time series prediction. Neural Computing and Applications, . doi:10.1007/s00521-018-3578-y.