Abstract:
The fluctuation of the cotton market price index is a very complex nonlinear system with random fluctuation characteristics, which is easily affected by weather, finance, policy, and the international environment. In this paper, based on the existing research on the characteristics of the cotton price data set, such as policy, international environment, import and export, production, the data characteristics of the impact of climate factors on cotton prices such as precipitation, sunshine, humidity were added, and the data were analyzed collection, sorting and pretreatment. Based on the volatility characteristics of cotton prices, a bidirectional long short-term memory(BiLSTM) model to predict cotton prices coupled with Long Short Term Memory Network(LSTM) and LightGbm trees were used in this research. The model was tested for comparison. Since the Stochastic Gradient Descent(SGD) optimizer produced frequent fluctuations during the training process, in most cases, the local optimal value was obtained. This experiment used the SWA(Stochastic Weight Averaging) optimization algorithm to take the multi-point simple average of the SGD trajectory to optimize SGD. This avoided the frequent fluctuation of SGD in the gradient descent process, and enabled the model to converge Loss and loss values to the global optimal to further improve the stability of training. The experimental results showed that the BILSTM model can fit the price curve of the test set well, with the smallest error value and high price prediction accuracy. The LSTM and BILSTM network structures optimized by the SWA algorithm converged to the approximate global optimum, with the average absolute error(MAE) increased by 18% and 43% respectively. This model can represent the law of cotton market price fluctuations more accurately and help cotton market practitioners and investors optimize their business strategies.