Abstract:Cotton price is complex and changeable due to many factors, and the prediction accuracy of cotton price can be improved by selecting appropriate data features and prediction models. In this study, the daily spot price data of cotton are taken as the research target, and nine influencing factors in four aspects of supply and demand, international market, macroeconomy, and industrial chain are collected as features. The extreme gradient boosting (XGBoost) algorithm is used to evaluate and screen the influencing factors of cotton price, and five of them are selected. This study adopts the time convolution network (TCN) with an attention mechanism (Attention), namely TCN-Attention, TCN, long short-term memory (LSTM), gate recurrent unit (GRU), and other models to predict cotton price. Through ablation experiments and comparative experiments, the results show that: (1) After XGBoost feature screening, the mean absolute error (MAE) and root mean square error (RMSE) of TCN-Attention price prediction are 41.47 and 58.76, which are 77.57% and 76.49% lower than those before screening; (2) compared with TCN, LSTM, and GRU, the TCN-Attention model proposed in this study has more accurate prediction results. MAE and RMSE are reduced by more than 50%, and the running time is shortened by 60% compared with LSTM and GRU.