A futures price prediction scheme design fusing news sentiment features

By combining BERT and MP-LSTM models, a prediction framework for sentiment factors and time series features is constructed, which solves the problem of insufficient integration of market sentiment information and time series data, and achieves high-precision prediction of corn futures prices.

CN122175632APending Publication Date: 2026-06-09GUILIN UNIV OF ELECTRONIC TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUILIN UNIV OF ELECTRONIC TECH
Filing Date
2026-03-27
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing technologies cannot effectively integrate market sentiment information with time series data, resulting in insufficient accuracy in agricultural futures price predictions.

Method used

A prediction framework for sentiment factors and time series features is constructed by fusing BERT and MP-LSTM models. The BERT model is used to quantify the sentiment of news texts, and the MP-LSTM model is used to capture time series relationships for corn futures price prediction.

Benefits of technology

It has improved the accuracy and stability of futures price forecasts, and significantly enhanced forecasting capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122175632A_ABST
    Figure CN122175632A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of financial data analysis and agricultural product futures price prediction, and particularly relates to a corn futures price prediction method based on BERT and MP-LSTM model fusion. The method is based on corn futures market data of 1904 trading days from June 1, 2016 to March 29, 2024, and combined with news text data obtained by a network crawler technology, and market sentiment is quantitatively analyzed through a natural language processing technology. First, a BERT model is used to perform sentiment classification on the news text, and feature information reflecting market sentiment is extracted; subsequently, the sentiment factor and corn futures opening price, closing price, highest price, lowest price, trading volume and related macro variables are jointly used as input to construct an MP-LSTM time series prediction model, and the corn futures price is predicted. The empirical results show that the BERT- MP-LSTM model has high prediction accuracy (R2 reaches 0.87) on the test set, and is significantly better than a traditional single time series model. The application effectively improves the accuracy and stability of the agricultural product futures price prediction by fusing text sentiment information and time series data, and provides a new technical means for agricultural risk management and financial decision-making.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of financial data analysis and artificial intelligence technology, and in particular to a method for predicting agricultural futures prices based on the fusion of natural language processing and deep learning models, specifically a method for predicting corn futures prices based on BERT and MP-LSTM models. Background Technology

[0002] With the development of global economic integration, agricultural futures markets play a crucial role in price discovery and risk management. Corn futures, as an important agricultural futures commodity, not only affect agricultural production decisions but also relate to national food security and macroeconomic stability. Traditional futures price forecasting methods mainly rely on statistical models or empirical analysis, making it difficult to effectively capture complex nonlinear relationships. Meanwhile, market sentiment, as a significant factor influencing price fluctuations, has long been difficult to quantify and utilize. In the current research field of agricultural futures markets, scholars both domestically and internationally have conducted systematic and detailed discussions. Firstly, focusing on the domestic market, scholars have emphasized the price discovery function of agricultural futures markets, the effective assessment of market risk, and the innovative application of the "insurance + futures" model. (Peng Hao, 2004) [1] He Louyingjun (2005) [2] The research focuses on the operational efficiency of my country's agricultural futures market and the characteristics of futures price behavior and market stability mechanisms, providing valuable insights into the internal mechanisms of my country's futures market. In addition, Yu Jingmiao (2011)... [3] Against the backdrop of the financial crisis, this paper provides an in-depth analysis of the price discovery mechanism and risk hedging strategies in China's agricultural futures market, offering important references for policymakers. (Li Yaru, 2018) [4] This research focuses on the design and pricing mechanism of the "insurance + futures" model for agricultural products, providing new ideas for the stable development of the agricultural product market. (Chen Zhuo, 2022) [5] This study has conducted in-depth research on the realization of price discovery in my country's agricultural futures market and comprehensively assessed market risks, providing effective risk management strategies for market participants. International scholars have also achieved significant results in their research on agricultural futures markets. Hoffman (2005) [6] The research, through empirical analysis, demonstrates the application of futures price forecasting models in agricultural product markets, such as the accurate prediction of countercyclical payment rates for US corn. Cortazar et al. (2019) [7] The research, published in the journal *Management Science*, delves into commodity price forecasting, futures price dynamics, and the construction of pricing models, providing a solid theoretical foundation for understanding the price formation mechanism of the futures market. This research not only enriches the theoretical framework of the futures market but also provides strong support for risk management in practice.

[0003] In recent years, with the rapid development of artificial intelligence and machine learning technologies, the research methods for futures prices have undergone revolutionary changes. (Fu Zhineng, 2021) [8] He and Zhang Chengzhao (2016) [9] The research focuses on ultra-short-term prediction of stocks and stock index futures based on text and price-volume data, and an innovative financial market prediction model—the FEPA model. Hu Yan (2022)...

[10] These studies explore innovative applications of deep learning in optimizing dynamic hedging for commodities. These studies not only demonstrate the enormous potential of artificial intelligence in the financial field but also provide new perspectives for the future development of agricultural futures markets. (Ghosh et al.)

[11] A hybrid forecasting method combining ensemble feature selection for optimality and advanced artificial intelligence techniques is proposed. This method improves the accuracy of futures price forecasting by identifying key variables and leveraging AI models to capture complex relationships. (Akyildirim et al.)

[12] This study analyzed news content using text mining techniques to investigate the dynamic relationship between investor sentiment and agricultural commodity prices. They found that investor sentiment has a significant impact on the agricultural commodity market. Furthermore, research has shown that quantifying investor sentiment using deep learning models can significantly improve prediction accuracy, making this another important research focus in the field of futures price forecasting.

[0004] In recent years, advancements in natural language processing (NLP) have made it possible to extract sentiment information from news texts, while deep learning models (such as LSTM) have demonstrated strong capabilities in time series forecasting. However, existing methods often fail to effectively integrate textual sentiment information with time series data, leaving room for improvement in prediction accuracy. Therefore, it is necessary to propose a forecasting method that integrates textual sentiment analysis and time series modeling to improve the accuracy of agricultural futures price forecasts. Summary of the Invention

[0005] In view of the shortcomings of the prior art described above, the purpose of this invention is to provide a corn futures price prediction method based on the fusion of BERT and MP-LSTM models, to solve the problem that existing technologies cannot effectively integrate market sentiment information and time series data. To achieve the above objective, this invention provides a corn futures price prediction method based on BERT and MP-LSTM models, characterized by: combining natural language processing technology and deep learning models, and improving the accuracy of futures price prediction by constructing a prediction framework that fuses sentiment factors and time series features. The method consists of four parts.

[0006] The first part involves: acquiring corn futures data for 1,904 trading days from June 1, 2016 to March 29, 2024, including opening price, closing price, highest price, lowest price, trading volume, and related variables; and simultaneously acquiring news text data for the corresponding dates through web crawling technology, and performing data cleaning and preprocessing.

[0007] The second part involves using the BERT model to train and classify news texts, transforming text sentiment into quantifiable sentiment indicators, and using these indicators as one of the input features of the prediction model.

[0008] The third part involves fusing sentiment features with market price data to construct a BERT-MP-LSTM time series prediction model. This model uses a multi-scale structure to capture short-term and long-term dependencies in the time series, thereby enabling the prediction of corn futures prices.

[0009] The fourth part involves training and testing the model, and using the coefficient of determination (COP). The model performance was evaluated using indicators such as , and the results showed that the model of the present invention has high prediction accuracy and good stability. Attached Figure Description

[0010] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.

[0011] Figure 1 This is a block diagram illustrating the design of a corn futures price prediction scheme based on BERT and MP-LSTM models, as an example of the present invention.

[0012] Figure 2 This is a block diagram of the BERT-MP-LSTM model construction for a corn futures price prediction scheme based on BERT and MP-LSTM models, as an example of the present invention.

[0013] Figure 3 This is a comparison chart of the actual value and prediction result of the final model for corn futures price prediction based on BERT and MP-LSTM models, an example of the present invention. Detailed Implementation

[0014] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention. These all fall within the scope of protection of the present invention.

[0015] refer to Figure 1 This invention proposes a corn futures price prediction scheme based on BERT and MP-LSTM models, comprising the following steps:

[0016] Data Preprocessing: Before performing text classification analysis, the dataset used in this study contained a total of 1904 text records. After preprocessing, punctuation marks, spaces, and special characters were removed as interference. In BERT model training, we selected the first 500 news headlines as training samples and labeled these headlines. Headlines negatively impacting futures prices were labeled as 0, and those positively impacting futures prices were labeled as 1. The model was trained using this labeled dataset. The dataset used for model training contained 500 news headlines, of which 253 had a negative impact on futures prices, while 247 had a positive impact.

[0017] When building a time series model, the factors influencing the closing price of corn futures include: corn futures opening price, corn futures closing price, corn futures highest price, corn futures lowest price, corn futures trading volume, corn starch futures opening price, corn import volume, and news headline sentiment. The corn futures time series is then standardized. Interpolation is used to process the monthly data on imported corn quantities, converting it into daily data.

[0018] Text sentiment feature extraction:

[0019] The BertTokenizer from BERT is used to segment the text and embed it into the model, converting each sentence into a token ID and attention mask required by BERT. The preprocessed data is then encapsulated into a TensorDataset, and the dataset is divided into training and test sets in an 8:2 ratio. Finally, a DataLoader is used to generate batch data. Through these steps, the original text data is successfully preprocessed into a format suitable for BERT model input and ready for training and validation.

[0020] The following statistical evaluation indicators are selected as the evaluation indicators for the model in this invention: accuracy and F1 score are used to judge the robustness and generalization ability of the model.

[0021] ①Accuracy

[0022] Accuracy is the ratio of the number of samples correctly predicted by the model to the total number of samples.

[0023]

[0024] ③ F1 score (F1-Score)

[0025] The F1 score is the harmonic mean of precision and recall, used to balance the two in a single metric.

[0026]

[0027]

[0028]

[0029] The BERT model is used to classify text sentiment. The preprocessed data is fed into the model, and the parameters are set as follows:

[0030] Table 1 BERT model training parameters

[0031] Parameter name illustrate Parameter value MAX_LEN Maximum length of input sequence 128 BATCH_SIZE Batch size 4 EPOCHS Number of iterations 10 tokenizer BERT Tokenizer 'bert-base-chinese' criterion loss function torch.nn.CrossEntropyLoss optimizer Optimizer AdamW, learning rate: 2e-5

[0032] After configuring the parameters, we trained the model using labeled news text data. The training set contained 400 news texts, and the test set contained 100 news texts. The performance of BERT on the training set is as follows:

[0033] Table 2 BERT model training results

[0034] Model evaluation metrics numerical values accuracy 0.97 F1_Score 0.97

[0035] The BERT model achieved a training set accuracy of 97% and an F1 score of 0.97, close to 1, indicating that the BERT model performed very well on the training set and could effectively classify the dataset. The performance of the BERT model on the test set is shown in Table 3 below.

[0036] Table 3 BERT Model Test Results

[0037] Model evaluation metrics numerical values accuracy 0.87 F1_Score 0.86

[0038] Table 4 BERT Model Test Results

[0039] Model evaluation metrics numerical values accuracy 0.87 F1_Score 0.86

[0040] Table 3 shows the BERT model test results, indicating that the model accuracy is 87%. The BERT model performs well on the test set, and its F1 score of 0.86 is close to 1. This demonstrates that in this study, the BERT model can effectively identify text information and classify texts according to sentiment.

[0041] Time series model construction:

[0042] refer to Figure 2 This paper demonstrates the Bert-MP-LSTM model architecture designed in this patent, and uses the Bert-MP-LSTM model to analyze corn futures time series data. The total data volume is 1904 records, and the ratio of training set to test set is set to 8:2.

[0043] Model training and performance evaluation:

[0044] This paper selects four evaluation indicators—RMSE, MAE, MAPE, and R-squared—as evaluation criteria for time series models.

[0045] RMSE (Root Mean Square Error) is the root mean square error, and its formula is as follows:

[0046]

[0047] MAPE (Mean Absolute Percentage Error) is widely used in predictive models. A MAPE of 0% indicates a perfect model, while a MAPE greater than 100% indicates a poor model. The formula is as follows:

[0048]

[0049] R-squared (coefficient of determination): Indicates how well the model fits the data. The R² value is between 0 and 1, and the closer the value is to 1, the stronger the model's ability to explain the data.

[0050]

[0051] The model settings are shown in Table 5 below:

[0052] Table 5 Model Parameters

[0053] Model parameters Parameter value filters 64 activation ReLU Pooling GlobalMaxPooling1D() LSTM layer 50 hidden units optimize Adam learning_rate 0.001 epochs 100 batch_size 32

[0054] Table 6 Model Training Results

[0055] Model evaluation metrics numerical values RMSE 31.28 MAE 20.88 MAPE 0.95% R-squared 0.94

[0056] As shown in Table 5, the MAPE value of the BERT-MP-LSTM model on the test set is 1.68%, and the R-squared value is 0.87, indicating that the BERT-MP-LSTM model has an excellent fitting effect on the fluctuation trend of corn futures price data.

[0057] refer to Figure 3 Based on the simulated data results, the actual and predicted opening prices of corn futures in the test set show roughly the same trend, with similar centers of fluctuation trajectories but slightly different fluctuation amplitudes. This indicates that the MP-LSTM model performs well, can respond to changes in various influencing factors, accurately predict futures price trends, and has a small gap between predicted and actual values, thus providing a basis for real-world judgments.

[0058] Compared with the prior art, the present invention has the following advantages:

[0059] (1) Introduce the BERT model to achieve effective quantification of market sentiment;

[0060] (2) Integrate sentiment factors with time series data to improve predictive ability;

[0061] (3) The MP-LSTM structure enhances the ability to model complex time dependencies;

[0062] (4) The overall model is superior to traditional methods in terms of prediction accuracy and stability.

[0063] In summary, based on empirical analysis of historical trading data, the BERT-MP-LSTM model proposed in this invention demonstrates superior performance in predicting agricultural futures prices. Compared to single time series forecasting models that do not incorporate market sentiment factors, this model achieves significantly improved prediction accuracy and stability. This achievement provides producers, traders, and investors in the agricultural market with more accurate price trend references, aiding in risk management and decision optimization. Furthermore, the "text sentiment analysis-time series feature fusion" framework constructed by this model provides a valuable technical path for other financial time series forecasting or broader economic indicator forecasting research.

[0064] The above embodiments should be understood as illustrative only and not as limiting the scope of protection of the present invention. After reading the description of the present invention, those skilled in the art can make various alterations or modifications to the present invention, and these equivalent changes and modifications also fall within the scope defined by the claims of the present invention.

[0065] References:

[0066] [1] Peng Hao. A Study on the Efficiency Problems of China's Agricultural Futures Market [D]. Supervisor: Lü Huoming. Southwestern University of Finance and Economics, 2004.

[0067] [2] Lou Yingjun. A Study on Futures Price Behavior and Market Stabilization Mechanism in my country [D]. Advisor: Yang Yiqun. Zhejiang University, 2005.

[0068] [3] Yu Jingmiao. A Study on Price Discovery and Risk Hedging in China's Agricultural Futures Market under the Background of Financial Crisis [D]. Supervisor: Liu Zhongqin. Shenyang Agricultural University, 2011.

[0069] [4] Li Yaru. Design and pricing of agricultural product insurance + futures scheme [D]. Supervisor: Sun Rong. Southwestern University of Finance and Economics, 2018.

[0070] [5] Chen Zhuo. A Study on Price Discovery Function and Market Risk Assessment of China's Agricultural Futures Market [D]. Supervisor: Yan Bo. South China University of Technology, 2022.

[0071] [6]Hoffman L A. Forecasting the counter-cyclical payment rate for UScorn: An application of the futures price forecasting model[J]. FORECASTERS,2005: 249.

[0072] [7]Cortazar G, Millard C, Ortega H, et al. Commodity price forecasts, futures prices, and pricing models[J]. Management Science, 2019, 65(9): 4141-4155.

[0073] [8] Fu, Zhineng. Research on ultra-short-term prediction of stocks and stock index futures based on text and price-volume data [D]. Supervisor: Xu, Weijun. South China University of Technology, 2021.

[0074] [9] Zhang Chengzhao. A deep learning model for financial market prediction: FEPA model [D]. Supervisor: Pan Heping. University of Electronic Science and Technology of China, 2016.

[0075]

[10] Hu Yan. Research on Deep Learning-Driven Dynamic Hedging Optimization Method for Bulk Commodities [D]. Supervisor: Ni Jian. Southwestern University of Finance and Economics, 2022.

[0076]

[11] Akyildirim E, Cepni O, Pham L, et al. How connected is theagricultural commodity market to the news-based investor sentiment?[J].Energy Economics, 2022, 113: 106174.

Claims

1. A method for intelligently predicting agricultural futures prices based on financial market sentiment, characterized in that, This study combines BERT model sentiment analysis of news texts with MP-LSTM time series forecasting to predict agricultural futures prices. The BERT model deeply analyzes text semantics and quantifies financial market sentiment. The MP-LSTM model captures the complex temporal dynamics between price series and sentiment factors through multiple time windows, achieving accurate predictions.

2. The intelligent prediction method for agricultural futures prices based on financial market sentiment as described in claim 1, characterized in that: The dataset used includes opening prices, closing prices, highest prices, lowest prices, and trading volumes for corn futures, corn starch futures opening prices, and corn import volumes for 1904 trading days, as well as news headlines related to agricultural products and their sentiment classification results for the corresponding trading days. A portion of the trading day data was randomly selected for model training, while the remaining trading day data served as a test set to evaluate the predictive performance of the proposed BERT-MP-LSTM combined model compared to other benchmark models.

3. The intelligent prediction method for agricultural futures prices based on financial market sentiment as described in claim 2, characterized in that: By combining multidimensional time series data from the futures market with quantified financial market sentiment factors, a deep learning model is trained to construct the final futures price prediction model.

4. The intelligent prediction method for agricultural futures prices based on financial market sentiment as described in claim 3, characterized in that: The core prediction model is MP-LSTM (Multi-Perspective LSTM), which incorporates numerical sentiment factors generated by the BERT model as input. The model can learn the nonlinear relationship between historical prices, trading volume, related commodity prices, import volume and market sentiment from multiple time scales.

5. The intelligent prediction method for agricultural futures prices based on financial market sentiment as described in claim 4, characterized in that: After training on all datasets, the performance was validated on an independent test set. The prediction results of the proposed BERT-MP-LSTM model were compared with those of benchmark models such as the single MP-LSTM model and the ARIMA model to demonstrate the contribution of introducing the financial market sentiment factor to improving prediction accuracy.