This paper aims to investigate stock price prediction.The volatility of stocks is influenced by various complex economic factors,including economic cycles and financial markets.Predicting stock prices and backtesting quantitative strategies have significant implications for the stable and healthy development of the economy.The research in this paper focuses on three main areas.Firstly,a stock price prediction model called Stock-GNN based on a unidirectional adaptive graph neural network within each sector of the stock market is proposed.The graph learning module trains the graph structure of each sector based on the influence relationship of individual stocks within it.The temporal feature module extracts the temporal characteristics of stocks,while the graph convolution module extracts the spatial features among stocks.Secondly,different methods,such as TCN,GRU,and LSTM,are attempted to extract time-series features in the time-series feature module.The performance of Stock-GNN is compared with five commonly used stock prediction models,including AR,GARCH,CNN-GRU,TPA-LSTM,and CNN-LSTM-Attention.The results indicate that Stock-GNN has the best performance,with TCN achieving the lowest RSE of 0.0941,RAE of 0.0652,and CORR of 0.9787.Additionally,one stock is randomly selected from each of the four major sectors for visualization.The performance of Stock-GNN is also compared to that of All-SGNN,which predicts the prices of all 61 stocks without dividing them into sectors.The results demonstrate that Stock-GNN performs better than All-SGNN and saves on computation time.Thirdly,the prediction data of the four selected stocks are backtested using the Dual Moving Average(DMA)strategy,Moving Average Convergence Divergence(MACD)strategy,and Relative Strength Index(RSI)strategy.Trading signals are determined using the prediction data,and trading is simulated in the actual stock market.The returns of using the quantitative investment strategy with and without using the prediction data are compared.The results show that,except for the liquor sector,all stocks yield higher returns than the actual situation.This indicates that the data predicted by Stock-GNN can be used to determine trading time points in advance and increase returns. |