Bulk commodity price long-term prediction method based on consistent modular operator

By cleaning and smoothing the commodity price data, combining the prediction results of SARIMA, LSTM, and NNAR models, and aggregation is performed using a consistent mode operator, the error and superposition problems in the long-term prediction of commodity prices are solved, and high-precision 30 period forecast.

CN119090526APending Publication Date: 2024-12-06JIANGXI JINGSHU DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410944200.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-15
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The existing commodity price prediction methods have problems such as large errors and inaccurate predictions for multiple periods in long-term predictions, making it difficult to achieve predictions of up to 30 periods within 5% error.

Method used

Using a method based on a consistent mode operator, data cleaning and smoothing of historical data of commodity prices are used, and time series models such as SARIMA, LSTM, and NNAR are used to predict. Finally, multiple prediction results are aggregated through a consistent mode operator to obtain Unbiased prediction value.

Benefits of technology

It significantly reduces prediction errors, improves prediction accuracy, and can achieve long-term prediction of commodity prices for up to 30 periods within a 5% error, and overcomes the prediction deviation and multiple cycle superposition problems of existing methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119090526A_ABST
    Figure CN119090526A_ABST
Patent Text Reader

Abstract

The invention provides a consistent modular operator-based bulk commodity price long-term prediction method and system, and the method comprises the steps: firstly collecting bulk commodity price historical data, carrying out the data cleaning of the bulk commodity price historical data, and obtaining a cleaned available bulk commodity price data set; smoothing the cleaned available bulk commodity price data set for three times to obtain three smoothed available bulk commodity price data sets; then analyzing, processing and predicting the data set by using a plurality of time sequence models to obtain at least six prediction results containing t-period bulk commodity prediction prices; and finally, aggregating at least six prediction results respectively containing t-period bulk commodity prediction prices by means of an aggregation function based on a consistent modular operator to obtain a final t-period unbiased prediction value of the bulk commodity price. The problems that an existing method is large in prediction deviation, multiple-period superposition prediction fails and the like are solved, and long-term price prediction of bulk commodities as long as 30 periods can be achieved within the error of 5%.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data analysis and prediction, and more specifically, to a method for long-term prediction of commodity prices based on a consistent modulus operator. Background Art

[0002] Bulk commodities refer to physical goods that can enter the circulation field but are not in the retail stage, have commodity attributes and are used in industrial and agricultural production and consumption. In the financial investment market, bulk commodities refer to homogeneous, tradable commodities that are widely used as industrial basic raw materials, such as crude oil, non-ferrous metals, agricultural products, iron ore, coal, etc. Bulk commodities include three categories, namely energy commodities, basic raw materials and agricultural and sideline products.

[0003] Commodity trade has always been an important driving force for economic development around the world. These commodities cover a wide range of resources from energy to metals to agricultural products, and have a profound impact on economic growth, employment and industrial upgrading in various countries. In recent years, with the changes in the global economic landscape, the landscape of commodity trade has also been evolving.

[0004] Fluctuations in commodity prices directly affect domestic and foreign manufacturers and traders. On the one hand, rising prices provide development opportunities for related companies, but also bring the risk of rising costs. On the other hand, falling prices may lead to overcapacity in some industries, putting pressure on corporate profits. Long-term forecasts of commodity prices can help companies formulate more reasonable business strategies and reduce market risks. At the same time, the government can also use forecast results to formulate more accurate macroeconomic control policies to ensure stable economic development.

[0005] At present, the methods for predicting commodity prices include time series analysis, regression analysis, VAR models, machine learning, etc. Although these methods and models can predict commodity prices within the sample space, when the prediction period is extended beyond the sample space, especially when the future prediction period is long, huge prediction errors will occur. Summary of the invention

[0006] The purpose of the present invention is to provide a method for long-term forecasting of commodity prices based on a consistent modulus operator, so as to overcome the problems of large prediction deviation and inaccurate prediction of multiple periods superimposed by existing methods, so as to achieve long-term forecasting of commodity prices for up to 30 periods within an error of 5%.

[0007] To achieve the above purpose, the technical solution adopted by the present invention is as follows.

[0008] The present invention provides a method for long-term commodity price forecasting based on a consistent modulus operator. First, historical commodity price data is collected, and data cleaning is performed on the historical commodity price data to obtain a cleaned usable commodity price data set; then the cleaned usable commodity price data set is smoothed three times to obtain three smoothed usable commodity price data sets; then multiple time series models are used to analyze, process and forecast the aforementioned data sets respectively to obtain at least four forecast results each containing a forecast price of the commodity for period t; finally, consistent modulus operator aggregation is performed on at least four forecast results each containing a forecast price of the commodity for period t to obtain the final unbiased forecast value of the commodity price for period t. The method overcomes the problems of large forecast deviation and failure of forecast due to superposition of multiple periods in the existing methods, and can achieve long-term forecast of commodity prices for up to 30 periods within an error of 5%. The method specifically includes the following steps:

[0009] Step S101, collecting historical commodity price data for the past ten years on a daily basis;

[0010] The historical data source is the daily frequency data of commodity prices in the last ten years disclosed by industry websites (such as Sino-Foreign Exchange, China Ferroalloy Online, Mysteel.com, etc.) or internal data of enterprises and institutions; each year of the commodity price data in the last ten years can be 365 natural days or 250-260 trading days, and the specific value may vary depending on different commodities.

[0011] Step S102, performing data cleaning on the commodity price historical data collected in step S101 to obtain a cleaned commodity price data set X1;

[0012] The data cleaning includes filtering invalid data, filling missing data and aligning data cycles.

[0013] Step S103, smoothing and seasonal effect decomposition of the cleaned available commodity price data set X1 obtained in step S102 to obtain five data sets X2, X3, and X4;

[0014] Among them, the method for smoothing the obtained cleaned usable bulk commodity price data set is the moving average method, the window sizes of the three smoothings are 10 days, 20 days and 30 days respectively, and the three smoothings obtain three smoothed usable bulk commodity price data sets X2, X3, and X4.

[0015] Step S104, using one or more of three known time series models to analyze, process and predict the data sets X1, X2, X3 and X4 obtained in steps S102 and S103, respectively, to obtain m prediction results, each of which contains the predicted price of the commodity for period t;

[0016] Among them, the three well-known time series models are SARIMA model, LSTM model, and NNAR model, which can be respectively recorded as models M1, M2, and M3; in step S104, the obtained m prediction results each containing the predicted price of commodities for t periods are recorded as F1, F2, ..., Fm, and the number of prediction results m satisfies: 4≤m≤12, each Fm contains the predicted price of commodities for t periods, where t=1,2,3,..,30 is the number of prediction periods, and t can be 30 at most; when only one of the three time series models is used to analyze, process and predict each data set Xi (1≤i≤4), m=3, when each data set Xi (1≤i≤4) is analyzed, processed and predicted using three time series models, m=12, and in other cases, m is between 6 and 8.

[0017] Step S105, constructing a consistent modulus operator, performing consistent modulus aggregation on the m prediction results in step S104, each of which contains the predicted price of the bulk commodity for period t, to obtain a consistent modulus aggregation prediction result of the bulk commodity price;

[0018] The specific method of performing the consistent modulus operator aggregation on the m prediction results each containing the predicted price of the bulk commodity for the t period in step S104 to obtain the final unbiased prediction value of the bulk commodity price for the t period is as follows:

[0019] Construct the consistent modulus operator umo:

[0020]

[0021] Wherein Fm is the m prediction results obtained in step S104, each of which contains the predicted price of the commodity in period t, 4≤m≤12;

[0022] s g (x) and s v (x) are two aggregation factors in the consistent module, and their forms are:

[0023] s g (x) = log(λx) / (1-x)

[0024] s v (x) = e x / (λ+e x )

[0025] is the influence coefficient of the j-th model on the available commodity historical price data set Xi, imp() is the corresponding influence function, and the model M is recorded j The mean square error of the prediction of the data set Xi is MSD ij , then when m=12, we have (similar conclusions can be obtained when m takes other values):

[0026]

[0027] Further, take Then we can get the aggregation model based on the consistent modulus operator:

[0028]

[0029] Where t=1,2,3,..,30 is the number of prediction periods;

[0030] umo t That is, the aggregated result of the prediction results of all Fm in the tth period, let FF = (FF1, FF2, .., FFt) = (umo1, umo2, .., umo t ), then FF is the aggregated forecast result for the t-period forecast period.

[0031] On the other hand, the present invention also proposes a long-term commodity price forecasting system based on a consistent modulus operator, the system comprising:

[0032] Data collection module: used to collect commodity price historical data in the past ten years on a daily basis;

[0033] The historical data source is the daily frequency data of commodity prices in the last ten years disclosed by industry websites (such as Sino-Foreign Exchange, China Ferroalloy Online, Mysteel.com, etc.) or internal data of enterprises and institutions; each year of the commodity price data in the last ten years can be 365 natural days or 250-260 trading days, and the specific value may vary depending on different commodities.

[0034] Data cleaning module: used to clean the historical commodity price data collected in the data acquisition module, and obtain the commodity price data set X1 after cleaning.

[0035] The data cleaning includes filtering invalid data, filling missing data and aligning data cycles.

[0036] Data smoothing and seasonal effect decomposition module: Smooth the cleaned commodity price dataset X1 obtained in the data cleaning module to obtain three datasets X2, X3, and X4;

[0037] Among them, the method for smoothing the obtained cleaned available commodity price data set is the moving average method, and the window sizes of the three smoothings are 10 days, 20 days and 30 days respectively. After smoothing with three different windows, three available commodity price data sets X2, X3 and X4 are obtained.

[0038] Multi-model prediction module: used to use one or more of the three known time series models to analyze, process and predict the data sets X1, X2, X3 and X4 obtained in the data cleaning module and the data smoothing and seasonal effect decomposition module, and obtain m prediction results, each of which contains the predicted price of commodities in period t;

[0039] Among them, the three well-known time series models are SARIMA model, LSTM model, and NNAR model, which can be respectively recorded as models M1, M2, and M3; in step S104, the obtained m prediction results each containing the predicted price of commodities for t periods are recorded as F1, F2, ..., Fm, and the number of prediction results m satisfies: 4≤m≤12, each Fm contains the predicted price of commodities for t periods, where t=1,2,3,..,30 is the number of prediction periods, and t can be 30 at most; when only one of the three time series models is used to analyze, process and predict each data set Xi (1≤i≤4), m=4, when each data set Xi (1≤i≤4) is analyzed, processed and predicted using three time series models, m=12, and in other cases, m is between 4 and 12.

[0040] Consistent modulus operator aggregation module: used to construct a consistent modulus operator, and to perform consistent modulus aggregation on the prediction results of m forecast modules in the multi-model forecast module, each of which contains the forecast price of commodities in period t, to obtain the consistent modulus aggregation forecast result of commodity prices;

[0041] The specific method of performing the consistent modulus operator aggregation on the m prediction results each containing the predicted price of the bulk commodity for the t period in step S104 to obtain the final unbiased prediction value of the bulk commodity price for the t period is as follows:

[0042] Construct the consistent modulus operator umo:

[0043]

[0044] Wherein Fm is the m prediction results obtained in step S104, each of which contains the predicted price of the commodity in period t, 4≤m≤12;

[0045] s g (x) and s v (x) are two aggregation factors in the uniform modulus operator umo, and their forms are:

[0046] s g (x) = log(λx) / (1-x)

[0047] s v (x) = e x / (λ+e x )

[0048] is the influence coefficient of the j-th model on the available commodity historical price data set Xi, imp() is the corresponding influence function, and the model M is recorded j The mean square error of the prediction of the data set Xi is MSD ij , then when m=12, we have (similar conclusions can be obtained when m takes other values):

[0049]

[0050] Further, take Then we can get the aggregation model based on the consistent modulus operator:

[0051]

[0052] Where t=1,2,3,..,30 is the number of prediction periods;

[0053] umo t That is, the aggregated result of the prediction results of all Fm in the tth period, let FF = (FF1, FF2, .., FFt) = (umo1, umo2, .., umo t ), then FF is the aggregated forecast result for the t-period forecast period.

[0054] Compared with the prior art, the present invention has the following beneficial effects:

[0055] (1) For the forecast of commodity prices, the historical data of commodity prices in the past ten years were collected on a daily basis, and the basic data was rich. (2) The collected data were cleaned as necessary to obtain the cleaned commodity price dataset X1, ensuring the validity and reliability of the relevant data. (3) The cleaned commodity price dataset X1 was smoothed three times and decomposed once for seasonal effects, and three smoothed commodity price datasets X2, X3, and X4 were obtained, which was conducive to reducing the impact of noise. (4) The cleaned commodity price dataset X1 and the smoothed commodity price datasets X2, X3, and X4 were analyzed and processed using the well-known SARIMA model, LSTM model, and NNAR model, respectively, to obtain m forecast results containing the forecast prices of commodities in period t; multiple time series models were used for data processing, which enhanced the analysis and processing capabilities of multi-period superimposed data, enhanced the long-term forecasting capabilities, and significantly reduced the forecast bias. (5) A new aggregation model based on the consistent modulus operator is constructed, and on this basis, m prediction results, each of which contains the predicted price of commodities for period t, are aggregated using the consistent modulus operator to obtain the final unbiased prediction value of the commodity price for period t; the aggregation prediction results based on the consistent modulus operator are used to achieve long-term prediction of commodity prices for up to 30 periods, which greatly reduces the prediction error and improves the prediction accuracy. It overcomes the problems of existing methods that are difficult to make long-term predictions, large prediction deviations, and inaccurate predictions of multiple periods. It can achieve long-term predictions of commodity prices for up to 30 periods within an error of 5%. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0057] Figure 1 A schematic flow chart of a method for long-term commodity price prediction based on a consistent modulus operator proposed in Embodiment 1 of the present invention is shown;

[0058] Figure 2 A schematic diagram of the structure of a long-term commodity price forecasting system based on a consistent modulus operator proposed in Embodiment 2 of the present invention is shown;

[0059] Figure 3 A comparison chart of the prediction results and market prices in Example 1 of the present invention is shown. DETAILED DESCRIPTION

[0060] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0061] Example 1

[0062] The embodiment of the present invention provides a long-term commodity price forecasting method based on a consistent modulus operator, which obtains long-term commodity price forecasting results by data cleaning, multiple time series model forecasting and a consistent modulus operator aggregating multiple long-term forecasting results, thereby improving the accuracy of commodity price forecasting, especially long-term forecasting.

[0063] like Figure 1 As shown, the method comprises the following steps:

[0064] Step S101, collecting historical commodity price data for the past ten years on a daily basis;

[0065] In this embodiment, the source of historical data is the historical daily frequency data of commodity prices in the past ten years, which is publicly available on industry websites (such as Sino-Foreign Exchange, China Ferroalloy Online, MySteel.com, etc.) or within enterprises and institutions; each year of the commodity price data in the past ten years can be 365 natural days or 250-260 trading days, and the specific value may vary depending on different commodities.

[0066] Step S102, performing data cleaning on the commodity price historical data collected in step S101 to obtain a cleaned and usable commodity price data set X1.

[0067] In this embodiment, the data cleaning includes filtering invalid data, filling missing data, aligning data cycles, etc.

[0068] Step S103, the cleaned available bulk commodity price dataset X1 obtained in step S102 is smoothed with different windows to obtain three datasets X2, X3, and X4.

[0069] In this embodiment, the method for smoothing the obtained cleaned usable commodity price data set is a moving average method, and the window sizes of the three smoothings are 10 days, 20 days and 30 days respectively. After smoothing with three different windows, the commodity price data sets X2, X3 and X4 are obtained.

[0070] Step S104, using three known time series models to analyze, process and predict the data sets X1, X2, X3 and X4 obtained in step S102 and step S103 respectively, and obtaining 12 prediction results each containing the predicted price of the bulk commodity in period t;

[0071] In this embodiment, the three well-known time series models are SARIMA model, LSTM model and NNAR model, which can be respectively recorded as models M1, M2 and M3; in step S104, the 18 prediction results each containing the predicted price of commodities in period t are recorded as F1, F2, ..., F12, wherein the prediction results obtained by the models M1, M2 and M3 for predicting the data set X1 are F1, F2 and F3, and the prediction results obtained by the models M1, M2 and M3 for predicting the data set X2 are F4, F5 and F6, and so on. Finally, the prediction results obtained by the models M1, M2 and M3 for predicting the data set X4 are F10, F11 and F12;

[0072] In this embodiment, the well-known SARIMA model, i.e., seasonal autoregressive integrated moving average model, is an extension of the ARIMA model (autoregressive integrated moving average model), which takes into account the influence of seasonal factors. The name of the SARIMA model consists of several parts: S represents seasonality, A represents autoregressive, I represents integration, and M represents moving average. Specifically, the SARIMA model considers the influence of seasonal factors on the time series by adding seasonal difference terms to the ARIMA model. The seasonal difference term compares the time series with the values ​​of the same time points in the previous periods to capture seasonal fluctuations. The modeling process of the SARIMA model includes several steps: first, seasonally differencing the original time series data to eliminate the influence of seasonal factors; second, fitting the ARIMA model to the time series data after difference to capture non-seasonal trends and cyclical changes; finally, combining the seasonal difference term with the ARIMA model to construct a SARIMA model and make predictions. The advantage of the SARIMA model is that it can handle time series data with seasonal fluctuations well, and can also make full use of historical data for long-term predictions.

[0073] In this embodiment, the well-known LSTM model is a special recurrent neural network (RNN) for processing sequence data, especially those sequences that need to capture long-term dependencies. LSTM solves the gradient vanishing or exploding problem encountered by traditional RNN when processing long sequences by introducing a "gate" structure to control the flow of information. The core idea of ​​LSTM is to maintain a "cell state", which controls the transmission of information like a conveyor belt. LSTM has three gate structures: forget gate, input gate and output gate, which are responsible for deciding how much information to forget, how much new information to update and how to output information. Through these gate structures, LSTM can selectively remember or forget information, so it performs well when processing long sequences.

[0074] In this embodiment, the well-known NNAR model, namely the neural network autoregression model, is a time series prediction model based on a neural network. The model takes the lagged value of the time series as input, and predicts future values ​​through learning and fitting of the neural network. The NNAR model generally includes an input layer, a hidden layer, and an output layer, wherein there may be one or more hidden layers for capturing nonlinear relationships in the time series. During the training process, the NNAR model optimizes the model parameters by minimizing the error between the predicted value and the actual value. The NNAR model is characterized by being able to process nonlinear and non-stationary time series data, and being able to automatically extract features from the data. Compared with the traditional linear autoregression model, the NNAR model has stronger fitting ability and prediction accuracy. In addition, the NNAR model also has good generalization ability and can predict future trends based on limited historical data.

[0075] Step S105, constructing a consistent modulus operator, performing consistent modulus aggregation on the m prediction results in step S104, each of which contains the predicted price of the bulk commodity for period t, to obtain a consistent modulus aggregation prediction result of the bulk commodity price;

[0076] In this embodiment, the constructed consistent modulus operator performs consistent modulus operator aggregation on m prediction results each containing a forecast price of a bulk commodity for period t in step S104 to obtain the final unbiased forecast value of the bulk commodity price for period t. The specific method is:

[0077] Construct the uniform modulus operator umo:

[0078]

[0079] Wherein Fm is the m prediction results obtained in step S104, each of which contains the predicted price of the commodity in period t, 4≤m≤12;

[0080] s g (x) and s v(x) are two aggregation factors in the uniform modulus operator umo, and their forms are:

[0081] s g (x) = log(λx) / (1-x)

[0082] s v (x) = e x / (λ+e x )

[0083] is the influence coefficient of the j-th model on the available commodity historical price data set Xi, imp() is the corresponding influence function, and the model M is recorded j The mean square error of the prediction of the data set Xi is MSD ij , then when m=12, we have (similar conclusions can be obtained when m takes other values):

[0084]

[0085] Further, take Then we can get the aggregation model based on the consistent modulus operator:

[0086]

[0087] Where t=1,2,3,..,30 is the number of prediction periods;

[0088] umo t That is, the aggregated result of the prediction results of all Fm in the tth period, let FF = (FF1, FF2, .., FFt) = (umo1, umo2, .., umo t ), then FF is the aggregated forecast result for the t-period forecast period.

[0089] The long-term commodity price prediction method based on the consistent modulus operator of the present invention aims at commodity price prediction, and collects the historical commodity price data of the last ten years in units of days. The historical data source is the historical daily frequency data of the last ten years of commodity prices disclosed by industry websites (such as Sino-Foreign Exchange, China Ferroalloy Online, MySteel.com, etc.) or internal enterprises and institutions; each year of the commodity price data of the last ten years can be 365 natural days or 250-260 trading days, and the specific value can be different depending on different commodities. (2) The collected data is subjected to necessary data cleaning processing to obtain the cleaned available commodity price data set X1, ensuring the validity and reliability of the relevant data. (3) The cleaned available commodity price data set X1 is respectively smoothed three times to obtain X2, X3, and X4, which is conducive to extracting multiple periodic information of the data and reducing the influence of noise. (4) The cleaned available commodity price data set X1 and the smoothed available commodity price data sets X2, X3, and X4 are analyzed and processed using the well-known SARIMA model, LSTM model, and NNAR model, respectively, to obtain m forecast results containing the forecast prices of commodities for t periods; multiple time series models are used for data processing, which enhances the analysis and processing capabilities of multi-period superimposed data, enhances the long-term forecasting capabilities, and significantly reduces the forecast deviation. (5) A new aggregation model based on the consistent modulus operator is constructed, and on this basis, the consistent modulus operator is used to aggregate the m forecast results containing the forecast prices of commodities for t periods, and the final unbiased forecast value of the commodity price for t period is obtained; the consistent modulus operator is used to aggregate the forecast results, and the long-term forecast of commodity prices for up to 30 periods is realized, which greatly reduces the forecast error and improves the forecast accuracy, overcomes the problems of the existing methods that are difficult to make long-term forecasts, large forecast deviations, and inaccurate forecasts of multiple period superimposed forecasts, and can achieve long-term forecasts of commodity prices for up to 30 periods within an error of 5%.

[0090] Based on the historical commodity price data as of October 31, 2023, the 30-day price forecast from November 1 to November 30, 2023 was predicted using the long-term commodity price forecasting method based on the consistent modulus operator provided by the present invention. The forecast results are shown in Tables 1 and Figure 3 As shown:

[0091] Table 1

[0092] Product Name Specification Place of delivery date Market Price Market Price Predicting Prices Error rate East China Aluminum Ingot AL99.70 East China Market 2023 / 9 / 1 19610 19869 19,818 -0.25% East China Aluminum Ingot AL99.70 East China Market 2023 / 9 / 4 19410 19868 19,978 0.55% East China Aluminum Ingot AL99.70 East China Market 2023 / 9 / 5 19240 19867 19,949 0.41% East China Aluminum Ingot AL99.70 East China Market 2023 / 9 / 6 19310 19866 19,934 0.34% East China Aluminum Ingot AL99.70 East China Market 2023 / 9 / 7 19470 19865 19,749 -0.59% East China Aluminum Ingot AL99.70 East China Market 2023 / 9 / 8 19420 19864 19,778 -0.44% East China Aluminum Ingot AL99.70 East China Market 2023 / 9 / 11 19450 19863 19,974 0.56% East China Aluminum Ingot AL99.70 East China Market 2023 / 9 / 12 19520 19862 19,670 -0.97% East China Aluminum Ingot AL99.70 East China Market 2023 / 9 / 13 19440 19861 19,861 0.00% East China Aluminum Ingot AL99.70 East China Market 2023 / 9 / 14 19440 19860 19,846 -0.07% East China Aluminum Ingot AL99.70 East China Market 2023 / 9 / 15 19540 19859 19,566 -1.48% East China Aluminum Ingot AL99.70 East China Market 2023 / 9 / 18 19380 19858 19,879 0.11% East China Aluminum Ingot AL99.70 East China Market 2023 / 9 / 19 19510 19857 20,295 2.20% East China Aluminum Ingot AL99.70 East China Market 2023 / 9 / 20 19490 19856 19,671 -0.93% East China Aluminum Ingot AL99.70 East China Market 2023 / 9 / 21 19650 19855 20,058 1.02% East China Aluminum Ingot AL99.70 East China Market 2023 / 9 / 22 19740 19854 19,576 -1.40% East China Aluminum Ingot AL99.70 East China Market 2023 / 9 / 25 19730 19853 20,242 1.96% East China Aluminum Ingot AL99.70 East China Market 2023 / 9 / 26 19800 19852 19,674 -0.90% East China Aluminum Ingot AL99.70 East China Market 2023 / 9 / 27 19780 19851 19,550 -1.52% East China Aluminum Ingot AL99.70 East China Market 2023 / 9 / 28 19850 19850 19,312 -2.71%

[0093] Example 2

[0094] The embodiment of the present invention also proposes a long-term commodity price prediction system based on a consistent modulus operator, such as Figure 2 As shown, the system comprises:

[0095] Data collection module: used to collect commodity price historical data in the past ten years on a daily basis;

[0096] In a specific application scenario, the source of historical data is the historical daily frequency data of commodity prices in the past ten years, which is publicly available on industry websites (such as Sino-Foreign Exchange, China Ferroalloy Online, MySteel.com, etc.) or within enterprises and institutions; each year of the commodity price data in the past ten years can be 365 natural days or 250-260 trading days, and the specific value may vary depending on different commodities.

[0097] Data cleaning module: used to clean the commodity price historical data collected in step S101 to obtain a usable commodity price data set X1 after cleaning.

[0098] In a specific application scenario, the data cleaning includes filtering invalid data, filling in missing data, and aligning data cycles.

[0099] Data smoothing and seasonal effect decomposition module: the user smoothes the cleaned available commodity price data set X1 obtained in step S102 to obtain three data sets X2, X3, and X4;

[0100] In a specific application scenario, the method for smoothing the cleaned available bulk commodity price data set is a moving average method, and the window sizes of the three smoothings are 10 days, 20 days, and 30 days, respectively. The three smoothings obtain three smoothed available bulk commodity price data sets X2, X3, and X4;

[0101] Multi-model prediction module: used to use three well-known time series models to analyze, process and predict the data sets X1, X2, X3, and X4 obtained in step S102 and step S103, respectively, to obtain 12 prediction results, each containing the predicted price of commodities in period t.

[0102] In a specific application scenario, the three well-known time series models are SARIMA model, LSTM model, and NNAR model, which can be recorded as models M1, M2, and M3, respectively; in step S104, the 12 prediction results each containing the predicted price of commodities in period t are recorded as F1, F2, ..., F12, wherein the prediction results obtained by predicting the data set X1 by models M1, M2, and M3 are F1, F2, and F3, and the prediction results obtained by predicting the data set X2 by models M1, M2, and M3 are F4, F5, and F6, and so on. Finally, the prediction results obtained by predicting the data set X4 by models M1, M2, and M3 are F10, F11, and F12.

[0103] A consistent modulus operator aggregation module: used to construct a consistent modulus operator, and to perform consistent modulus aggregation on the m prediction results in step S104, each of which contains the predicted price of the bulk commodity for period t, to obtain a consistent modulus aggregation prediction result of the bulk commodity price;

[0104] In a specific application scenario, the constructed consistent modulus operator performs consistent modulus operator aggregation on m prediction results each containing a forecast price of a commodity for period t in step S104 to obtain the final unbiased forecast value of the commodity price for period t as follows:

[0105] Construct the uniform modulus operator umo:

[0106]

[0107] Wherein Fm is the m prediction results obtained in step S104, each of which contains the predicted price of the commodity in period t, 6≤m≤18;

[0108] s g (x) and s v (x) are two aggregation factors in the uniform modulus operator umo, and their forms are:

[0109] s g (x) = log(λx) / (1-x)

[0110] s v (x) = e x / (λ+e x )

[0111] is the influence coefficient of the j-th model on the available commodity historical price data set Xi, imp() is the corresponding influence function, and the model M is recorded j The mean square error of the prediction of the data set Xi is MSD ij , then when m=12, we have (similar conclusions can be obtained when m takes other values):

[0112]

[0113] Further, take Then we can get the aggregation model based on the consistent modulus operator:

[0114]

[0115] Where t=1,2,3,..,30 is the number of prediction periods;

[0116] umo t That is, the aggregated result of the prediction results of all Fm in the tth period, let FF = (FF1, FF2, .., FFt) = (umo1, umo2, .., umot ), then FF is the aggregated forecast result for the t-period forecast period.

[0117] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not drive the essence of the corresponding technical solutions away from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for long-term commodity price forecasting based on a consistent modulus operator, characterized in that: The method comprises: Step S101, collecting historical commodity price data for the past ten years on a daily basis; Step S102, performing data cleaning on the commodity price historical data collected in step S101 to obtain a cleaned commodity price data set X1; Step S103, smoothing the cleaned available bulk commodity price data set X1 obtained in step S102 to obtain three data sets X2, X3, and X4; Step S104, using one or more of three known time series models to analyze, process and predict the data sets X1, X2, X3 and X4 obtained in steps S102 and S103, respectively, to obtain m prediction results, each of which contains the predicted price of the commodity for period t; Step S105, constructing an aggregation model based on a consistent modulus operator, aggregating the m prediction results in step S104, each of which contains the predicted prices of commodities for t periods, to obtain an aggregated prediction result of the commodity prices.

2. The method for long-term commodity price prediction based on consistent modulus operator according to claim 1, characterized in that: In step S101, each year of the commodity price data of the past ten years can be 365 natural days or 250-260 trading days, and the specific value may vary depending on different commodities; in step S102, the data cleaning includes filtering invalid data, filling missing data and aligning data periods; in step S103, the method for smoothing the obtained cleaned usable commodity price data set is the moving average method, and the window sizes of the three smoothings are 10 days, 20 days and 30 days respectively. The three smoothings obtain three smoothed usable commodity price data sets X2, X3 and X4.

3. The method for long-term commodity price prediction based on consistent modulus operator according to claim 1, characterized in that: In step S104, the three well-known time series models are seasonal autoregressive integrated moving average model, long short-term memory model, and neural network autoregressive model, which can be recorded as models M1, M2, and M3 respectively; in step S104, the obtained m prediction results each containing the predicted price of commodities for t periods are recorded as F1, F2, ..., Fm, and the number of prediction results m satisfies: 4≤m≤12, each Fm contains the predicted price of commodities for t periods, where t=1,2,3,..,30 is the number of prediction periods, and t can be 30 at most; in step S104, when only one of the three time series models is used to analyze, process and predict each data set Xi (1≤i≤4), m=4; when each data set Xi (1≤i≤4) is analyzed, processed and predicted using the three time series models, m=12, and in other cases, m is between 4 and 12.

4. The method for long-term commodity price prediction based on consistent modulus operator according to claim 1, characterized in that: In step S105, the aggregation model based on the consistent modulus operator is constructed to aggregate the m prediction results in step S104, each of which contains the predicted price of the bulk commodity for the t period, and the specific method for obtaining the final unbiased prediction value of the bulk commodity price for the t period is: Constructing the aggregation model umo based on the consistent modulus operator: Wherein Fm is the m prediction results obtained in step S104, each of which contains the predicted price of the commodity in period t, 4≤m≤12; s g (x) and s v (x) are two aggregation factors of the consistent modular operator, and their forms are: s g (x)=log(λx) / (1-x) s v (x)=e x / (λ+e x ) is the influence coefficient of the j-th model on the available commodity historical price data set Xi, imp() is the corresponding influence function, and the model M is recorded j The mean square error of the prediction of the data set Xi is MSD ij , then when m=12, we have: Further, take Then we can get the aggregation model based on the consistent modulus operator: Where t=1,2,3,..,30 is the number of prediction periods; umo t That is, the aggregated result of the prediction results of all Fm in the tth period, let FF = (FF1, FF2, .., FFt) = (umo1, umo2, .., umo t ), then FF is the consistent model aggregation prediction result of the t-period prediction period.

5. A long-term commodity price forecasting system based on a consistent modulus operator, characterized in that: The system comprises: Data collection module, used to collect ten years of commodity price historical data on a daily basis; A data cleaning module is used to clean the commodity price historical data collected in the data collection module to obtain a usable commodity price data set X1 after cleaning; Data smoothing module: Smoothing the cleaned commodity price dataset X1 obtained in the data cleaning module to obtain three datasets X2, X3, and X4; The multi-model prediction module is used to use one or more of the three known time series models to analyze, process and predict the data sets X1, X2, X3 and X4 obtained in the data cleaning module and the data smoothing and seasonal effect decomposition module, respectively, to obtain m prediction results each containing the predicted price of commodities for period t; The consistent modulus operator aggregation module is used to construct an aggregation model based on the consistent modulus operator, aggregate the prediction results of m multiple model prediction modules, each of which contains the predicted prices of commodities for t periods, and obtain the aggregated prediction results of commodity prices.

6. The long-term commodity price forecasting system based on the consistent modulus operator according to claim 5, characterized in that: In the data acquisition module, the historical data source is publicly available on industry websites, including historical daily data of commodity prices in the past ten years from Sino-Foreign Exchange, China Ferroalloy Online, MySteel.com or internal enterprises and institutions. Each year of the commodity price data in the past ten years can be 365 natural days or 250-260 trading days, and the specific value may vary depending on different commodities; in the data cleaning module, the data cleaning includes filtering invalid data, filling missing data and aligning data cycles; in the data smoothing and seasonal effect decomposition module, the method for smoothing the cleaned available commodity price data set is the moving average method, and the window sizes of the three smoothings are 10 days, 20 days and 30 days respectively. The three smoothings obtain three available commodity price data sets X2, X3 and X4 after smoothing.

7. The long-term commodity price forecasting system based on consistent modulus operator according to claim 5, characterized in that: In the multi-model prediction module, the three well-known time series models are SARIMA, LSTM, and NNAR, which can be recorded as models M1, M2, and M3 respectively; in the multi-model prediction module, the m prediction results each containing the predicted price of commodities for t periods are recorded as F1, F2, ..., Fm, and the number of prediction results m satisfies: 6≤m≤18, each Fm contains the predicted price of commodities for t periods, where t=1,2,3,..,30 is the number of prediction periods, and t can be 30 at most; in the multi-model prediction module, when only one of the three time series models is used to analyze, process and predict each data set Xi (1≤i≤4), m=4, when each data set Xi (1≤i≤4) is analyzed, processed and predicted using three time series models, m=12, and in other cases, m is between 6 and 8.

8. The long-term commodity price forecasting system based on consistent modulus operator according to claim 5, characterized in that: In the consistent modulus operator aggregation module, the constructed consistent modulus operator performs consistent modulus operator aggregation on m prediction results each containing a t-period commodity forecast price in the multi-model forecast module, and obtains the final unbiased forecast value of the commodity price for the t-period. The specific method is: Constructing the aggregation model umo based on the consistent modulus operator: Where Fm is the m prediction results obtained in the multi-model prediction module, each of which contains the predicted price of commodities in period t, 4≤m≤12; s g (x) and s v (x) are two aggregation factors of the consistent modular operator, and their forms are: s g (x)=log(λx) / (1-x) s v (x)=e x / (λ+e x ) is the influence coefficient of the j-th model on the available commodity historical price data set Xi, imp() is the corresponding influence function, and the model M is recorded j The mean square error of the prediction of the data set Xi is MSD ij , then when m=12, we have: Further, take Then we can get the aggregation model based on the consistent modulus operator: Where t=1,2,3,..,30 is the number of prediction periods; umo t That is, the aggregated result of the prediction results of all Fm in the tth period, let FF = (FF1, FF2, .., FFt) = (umo1, umo2, .., umo t ), then FF is the aggregated forecast result for the t-period forecast period.