基于深度学习的玉米和大豆期货价格智能预测

许钰林, 康孟珍, 王秀娟, 华净, 王浩宇, 沈震

智慧农业(中英文). 2022, 4(4): 156-163

PDF(872 KB)
PDF(872 KB)
智慧农业(中英文) ›› 2022, Vol. 4 ›› Issue (4) : 156-163. DOI: 10.12133/j.smartag.SA20220712
信息处理与决策

基于深度学习的玉米和大豆期货价格智能预测

作者信息 +

Corn and Soybean Futures Price Intelligent Forecasting Based on Deep Learning

Author information +
History +

本文亮点

玉米和大豆为同季旱粮作物,“争地”矛盾十分突出,同时掌握玉米和大豆两者的价格是必要的。相较于现货,农产品期货价格具有价格发现功能。因此,玉米和大豆期货价格分析和预测对种植结构调整和农户作物品种选择均具有重要意义。本研究首先分析了玉米和大豆期货价格的相关性,通过相关性计算和格兰杰因果检验,发现玉米和大豆期货具有较强的正向相关性,且大豆期货价格是玉米期货价格的格兰杰原因;其次,基于长短时记忆(Long Short-Term Memory,LSTM)模型对玉米和大豆期货价格进行预测,并引入注意力机制(Attention)对期货价格预测模型行优化。对比结果表明,与差分整合移动平均自回归模型(Autoregressive Integrated Moving Average Model,ARIMA)和支持向量回归模型(Support Vector Regression,SVR)相比,LSTM模型在各项指标中均为更优,而与单一的LSTM模型相比,加入Attention机制的Attention-LSTM模型在各项指标中均更优。其中,玉米和大豆期货预测结果的平均绝对误差(Mean Absolute Error,MAE)分别提升3.8%和3.3%,均方根误差(Root Mean Square Error,RMSE)分别提升0.6%和1.8%,平均绝对百分误差(Mean Absolute Percentage Error,MAPE)分别提升4.8%和2.9%,证明了Attention机制的加入可以帮助模型提取有效信息,提升性能。最后,使用LSTM模型结合大豆期货历史价格共同预测玉米期货价格,MAE提升了6.9%、RMSE提升了1.1%、MAPE提升了5.3%。试验结果表明,本研究使用Attention-LSTM模型对玉米和大豆期货价格进行预测,相较于通用预测模型,Attention-LSTM模型能够提高大豆和玉米期货价格预测精度,且结合相关农产品期货价格数据,可以提升单个农产品期货模型的预测性能。

HeighLight

Corn and soybean are upland grain in the same season, and the contradiction of scrambling for land between corn and soybean is prominent in China, so it is necessary to explore the price relations between corn and soybean. In addition, agricultural futures have the function of price discovery compared with the spot. Therefore, the analysis and prediction of corn and soybean futures prices are of great significance for the management department to adjust the planting structure and for farmers to select the crop varieties. In this study, the correlation between corn and soybean futures prices was analyzed, and it was found that the corn and soybean futures prices have a strong correlation by correlation test, and soybean futures price is the Granger reason of corn futures price by Granger causality test. Then, the corn and soybean futures prices were predicted using a long short-term memory (LSTM) model. To optimize the futures price prediction model performance, Attention mechanism was introduced as Attention-LSTM to assign weights to the outputs of the LSTM model at different times. Specifically, LSTM model was used to process the input sequence of futures prices, the Attention layer assign different weights to the outputs, and then the model output the prediction results after a layer of linearity. The experimental results showed that Attention-LSTM model could significantly improve the prediction performance of both corn and soybean futures prices compared to autoregressive integrated moving average model (ARIMA), support vector regression model (SVR), and LSTM. For example, mean absolute error (MAE) was improved by 3.8% and 3.3%, root mean square error (RMSE) was improved by 0.6% and 1.8% and mean absolute error percentage (MAPE) was improved by 4.8% and 2.9% compared with a single LSTM, respectively. Finally, the corn futures prices were forecasted using historical corn and soybean futures prices together. Specifically, two LSTM models were used to process the input sequences of corn futures prices and soybean futures prices respectively, two parameters were trained to perform a weighted summation of the output of two LSTM models, and the prediction results were output by the model after a layer of linearity. The experimental results showed that MAE was improved by 6.9%, RMSE was improved by 1.1% and MAPE was improved by 5.3% compared with the LSTM model using only corn futures prices. The results verify the strong correlation between corn and soybean futures prices at the same time. In conclusion, the results verify the Attention-LSTM model can improve the performances of soybean and corn futures price forecasting compared with the general prediction model, and the combination of related agricultural futures price data can improve the prediction performances of agricultural product futures forecasting model.

引用本文

导出引用
许钰林 , 康孟珍 , 王秀娟 , 华净 , 王浩宇 , 沈震. 基于深度学习的玉米和大豆期货价格智能预测. 智慧农业. 2022, 4(4): 156-163 https://doi.org/10.12133/j.smartag.SA20220712
Yulin XU , Mengzhen KANG , Xiujuan WANG , Jing HUA , Haoyu WANG , Zhen SHEN. Corn and Soybean Futures Price Intelligent Forecasting Based on Deep Learning. Smart Agriculture. 2022, 4(4): 156-163 https://doi.org/10.12133/j.smartag.SA20220712

参考文献

1
薛钦峰. 国产大豆之困[J]. 瞭望, 2021(22): 2.
2
王德军.秋作争地 玉米“力压”大豆[J].乡村科技, 2011(7): 10-11.
3
CARTER C A. Commodity futures markets: A survey[J]. Australian Journal of Agricultural & Resource Economics, 1999, 43(2): 209-247.
4
XU Y, PAN F, WANG C, et al. Dynamic price discovery process of Chinese agricultural futures markets: An empirical study based on the rolling window approach[J]. Journal of Agricultural and Applied Economics, 2019, 51(4): 664-681.
5
ZIEGEL E R. Time series analysis, forecasting and control[J]. Technometrics, 2012, 37(2): 238-242.
6
ENGLE R F. Autoregressive conditional heteroscedasticity with estimates of the variance of United Kingdom inflation[J]. Econometrica: Journal of the Econometric Society, 1982: 987-1007.
7
BOLLERSLEV T. Generalized autoregressive conditional heteroskedasticity[J]. Journal of Econometrics, 1986, 31(3): 307-327.
8
刘锦源.面向农产品期货价格预测的改进LSTM方法[J]. 江苏科技信息, 2019, 36(27): 48-52.
LIU J. Research on the improved LSTM method for agricultural futures prices forecasting[J]. Jiangsu Science & Technology Information, 2019, 36(27): 48-52.
9
罗千惠. 基于分解和LSTM的我国玉米期货价格预测研究[D]. 武汉: 中南财经政法大学, 2021.
LUO Q. Prediction of corn futures price based on decomposition and LSTM[D]. Wuhan: Zhongnan University of Economics and Law, 2021.
10
JARRAH M, SALIM N. A recurrent neural network and a discrete wavelet transform to predict the Saudi stock price trends[J]. International Journal of Advanced Computer Science and Applications, 2019, 10(4): 155-162.
11
王承宇. 基于LSTM神经网络的大豆期货价格预测[D]. 重庆: 重庆大学, 2021.
WANG C. Soybean futures price prediction based on LSTM neural network[D]. Chongqing: Chongqing University, 2021.
12
刘璐. 基于RNN-LSTM的黄金期货价格预测与对比研究[D]. 长春: 长春理工大学, 2021.
LIU L. Gold futures price prediction and comparative Study based on RNN-LSTM[D]. Changchun: Changchun University of Science and Technology, 2021.
13
SELVIN S, VINAYAKUMAR R, GOPALAKRISHNAN E A, et al. Stock price prediction using LSTM, RNN and CNN-sliding window model[C]// 2017 International Conference on Advances in Computing, Communications and Informatics (ICACCI). Piscataway, New York, USA: IEEE, 2017: 1643-1647.
14
SAUD A S, SHAKYA S. Analysis of look back period for stock price prediction with RNN variants: A case study on banking sector of NEPSE[J]. Procedia Computer Science, 2020, 167: 788-798.
15
MNIH V, HEESS N, GRAVES A. Recurrent models of visual attention[J]. Advances in Neural Information Processing Systems, 2014, 3: 27-35.
16
VASWANI A, SHAZEER N, PARMAR N, et al. Attention Is All You Need[J/OL]. arXiv:1706.03762[cs.CL], 2017.
17
GUO M, LIU Z, MU T, et al. Beyond self-attention: External attention using two linear layers for visual tasks[J/OL]. arXiv:2105.02358 [cs.CV]. 2021.
18
徐丸絮, 沈吟东. 基于Attention-LSTM神经网络的公交行程时间预测[J]. 现代电子技术, 2022, 45(3): 83-87.
XU W, SHEN Y. Bus travel time prediction based on Attention-LSTM neural network[J]. Modern Electronic Technology, 2022, 45(3): 83-87.
19
OUYANG Z, LAI Y. Systemic financial risk early warning of financial market in China using Attention-LSTM model[J]. The North American Journal of Economics and Finance, 2021, 56: ID 101383.
20
范俊明. 基于EEMD和LSTM组合模型的大豆期货价格预测研究[D]. 杭州: 浙江农林大学, 2020.
FAN J. Research on soybean futures price forecast based on EEMD and LSTM combination model[D]. Hangzhou: Zhejiang A&F University, 2020.
21
HOCHREITER S, SCHMIDHUBER J. Long short-term memory[J]. Neural Computation, 1997, 9(8): 1735-1780.

基金

国家自然科学基金(62076239)
PDF(872 KB)

文章所在专题

智慧农业

412

Accesses

0

Citation

Detail

段落导航
相关文章

/