Price trend prediction method and device for bulk commodities with prices in oscillation environment for long time

By combining multidimensional time series and machine learning models with constrained optimization algorithms, the prediction problem in the context of volatile commodity market prices was solved, improving prediction accuracy and training speed, and enhancing the model's adaptability to changes in market conditions.

CN121390388APending Publication Date: 2026-01-23NANJING IRON & STEEL CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202511386133.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-26
Publication Date
2026-01-23

AI Technical Summary

Technical Problem

Traditional price forecasting models lose their predictive power in the context of long-term price fluctuations in commodity markets, leading to misjudgments in business decisions and increasing financial losses and opportunity costs.

Method used

We employ a multi-dimensional time series forecasting model and a machine learning forecasting model, combined with a constrained optimization algorithm, and construct a price trend forecasting method through time window partitioning and Bollinger Band analysis. We optimize the model parameters to minimize the variance of the forecast results.

Benefits of technology

It improved the accuracy of price trend prediction, enhanced the model's buffering capacity in the face of changes in market conditions, improved the accuracy of daily, weekly and monthly predictions, and increased the model training speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121390388A_ABST
    Figure CN121390388A_ABST
Patent Text Reader

Abstract

The invention discloses a price trend prediction method for bulk commodities whose prices are in an oscillation environment for a long time, and relates to the technical field of data analysis, and the method comprises the steps: obtaining historical data; based on the historical data, constructing a time sequence prediction model of a multi-dimensional time dimension and a machine learning prediction model, obtaining a corresponding time sequence prediction result through the time sequence prediction model of the multi-dimensional time dimension, and obtaining a machine learning prediction result through the machine learning prediction model; and taking the minimum variance of the prediction result as an optimization target, obtaining corresponding weight parameters of the time sequence prediction model and the machine learning prediction model of the multi-dimensional time dimension by applying a constraint optimization algorithm, and combining all prediction results based on the corresponding weight parameters to form a target prediction price. According to the method, multiple prediction models are creatively fused, analysis support is provided for final price trend prediction from multiple dimensions, and the model accuracy is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data analysis, in particular to a price trend prediction method and device for bulk commodities with long-term price fluctuations. BACKGROUND

[0002] At present, in the bulk commodity trading market, the prices of some commodities have long been in a state of violent price fluctuations. In addition, due to factors such as the market environment of spot trading and the driving of market sentiment, the quantification difficulty is exponentially compounded. The traditional price prediction model often loses its predictive ability due to the lag caused by high-frequency changes in the price in such a market environment. The inaccuracy of such a model will misjudge the best procurement, sales, storage, and other key business decisions for enterprises, resulting in unnecessary financial losses and increased opportunity costs. SUMMARY

[0003] The technical problem to be solved by the present application is to overcome the shortcomings of the prior art and provide a price trend prediction method and device for bulk commodities with long-term price fluctuations.

[0004] To solve the above technical problems, the technical solutions of the present application are as follows:

[0005] A price trend prediction method for bulk commodities with long-term price fluctuations, comprising:

[0006] Obtaining historical data, the historical data including target commodity prices and characteristic factor data affecting target commodity prices at corresponding time points;

[0007] Based on the historical data, a multi-dimensional time dimension time series prediction model and a machine learning prediction model are constructed, and a corresponding time series prediction result is obtained through the multi-dimensional time dimension time series prediction model, and a machine learning prediction result is obtained through the machine learning prediction model;

[0008] Taking the minimum variance of the prediction result as the optimization target, the corresponding weight parameters of the multi-dimensional time dimension time series prediction model and the machine learning prediction model are obtained by applying a constraint optimization algorithm, and all prediction results are combined to form a target predicted price based on the corresponding weight parameters.

[0009] As a preferred solution of the price trend prediction method for bulk commodities with long-term price fluctuations, the time series prediction model includes an ARIMA model or a Prophet model, and the machine learning prediction model includes a random forest algorithm model or a support vector machine algorithm model.

[0010] As a preferred scheme of the price trend prediction method for the bulk commodity whose price is in a long-term volatile environment, wherein the time series prediction model of the multi-dimensional time dimension comprises a medium-short-term time series prediction model and a long-term time series prediction model.

[0011] As a preferred scheme of the price trend prediction method for the bulk commodity whose price is in a long-term volatile environment, wherein the time series prediction model of the multi-dimensional time dimension comprises a medium-short-term time series prediction model and a long-term time series prediction model.

[0012] The historical data is divided into a medium-short-term data window and a long-term data window respectively.

[0013] The medium-short-term time series prediction model is fitted by the data divided from the medium-short-term data window to obtain a medium-short-term price prediction result.

[0014] The long-term time series prediction model is fitted by the data divided from the long-term data window to obtain a long-term price prediction result.

[0015] As a preferred scheme of the price trend prediction method for the bulk commodity whose price is in a long-term volatile environment, wherein the historical data is divided into a medium-short-term data window and a long-term data window respectively.

[0016] The historical data is divided into a medium-short-term data window and a long-term data window respectively.

[0017]

[0018] The historical data is divided into a medium-short-term data window and a long-term data window respectively.

[0019]

[0020] Wherein, P t is the commodity price, Q t is the characteristic factor data, and b is greater than a.

[0021] As a preferred scheme of the price trend prediction method for the bulk commodity whose price is in a long-term volatile environment, wherein the historical data is divided into a medium-short-term data window and a long-term data window respectively.

[0022] The objective function of the constraint optimization algorithm is:

[0023]

[0024] The constraint function is: β short + β long + βreg = 1;

[0025] The parameter limit is:

[0026] Wherein, P_short is the medium and short term time series prediction result, P_long is the long term time series prediction structure, P_reg is the machine learning prediction result, Respectively, the optimal parameters of the medium and short term time series prediction model, the long term time series prediction model and the machine learning prediction model.

[0027] As a preferred scheme of the price trend prediction method for the bulk commodity whose price is in a long-term shock environment, wherein: the step of combining all the prediction results to form the target prediction price based on the corresponding weight parameters comprises:

[0028] The target prediction price P opt is:

[0029]

[0030] As a preferred scheme of the price trend prediction method for the bulk commodity whose price is in a long-term shock environment, wherein: after the step of taking the minimum variance of the prediction results as the optimization target, obtaining the corresponding weight parameters of the time series prediction model and the machine learning prediction model in the multi-dimensional time dimension by applying the constraint optimization algorithm, and combining all the prediction results to form the target prediction price based on the corresponding weight parameters, the method further comprises:

[0031] According to the price characteristics, a Bollinger channel is constructed, and an index thereof is used to correct the target prediction price.

[0032] As a preferred scheme of the price trend prediction method for the bulk commodity whose price is in a long-term shock environment, wherein: the step of constructing the Bollinger channel according to the price characteristics and using an index thereof to correct the target prediction price comprises:

[0033] Set the current time m, and the simple moving average of each day of the Bollinger band is: Wherein, P m , P m-1 ,..., P m-(n-1) is the historical market price of the target commodity;

[0034] The SMA sequence obtained by rolling calculation constitutes the middle rail of the Bollinger band, and the upper rail and the lower rail of the Bollinger band are obtained by calculating the standard deviation of the SMA sequence:

[0035] upper_band = SMA + (K * sigma)

[0036] lower_band = SMA - (k * phi), where k is the standard deviation of the SMA series, and sigma is the standard deviation impact multiple of the prediction.

[0037] The application also provides a price trend prediction device for commodities whose prices are in a long-term volatile environment, comprising:

[0038] a data acquisition module configured to acquire historical data, wherein the historical data comprises target commodity prices at corresponding time points and characteristic factor data affecting the target commodity prices;

[0039] a model construction module configured to construct a time series prediction model and a machine learning prediction model in a multi-dimensional time dimension based on the historical data, acquire a corresponding time series prediction result through the time series prediction model in the multi-dimensional time dimension, and acquire a machine learning prediction result through the machine learning prediction model;

[0040] a price prediction module configured to take the minimum variance of the prediction results as an optimization target, acquire corresponding weight parameters of the time series prediction model and the machine learning prediction model in the multi-dimensional time dimension through an application of a constraint optimization algorithm, and combine all the prediction results to form a target predicted price based on the corresponding weight parameters.

[0041] The application has the following beneficial effects:

[0042] (1) The prediction model in the application can have a certain buffering capacity when facing a sudden change from a one-way market to a volatile market (or vice versa) by dividing the historical prices into time windows and constructing a Bollinger band channel based on the price amplitude, which makes the prediction model capable of predicting future price trends in different market states in a timely manner by applying different algorithm logics. Compared with conventional trend prediction models and machine learning models, the accuracy of the model in daily, weekly and monthly trend prediction can be improved by more than 20%.

[0043] (2) The prediction model provided by the application is constructed based on a time series model and a machine learning model, wherein the time series model can further analyze the comprehensive performance of the target in the past period of time, including short-term and medium and long-term price trends, to capture the change law of the price itself in different time ranges, thereby providing a reference for the final trend prediction. At the same time, the model has high human-computer interaction capability and can be adaptively adjusted according to the characteristics of the commodity. For example, if the business personnel judge that the target category is more affected by the market supply and demand, the weight proportion of the machine learning model can be increased; if the target category is in a one-way market for a long time, the minimum and maximum weight proportions of the two time series models can be adjusted to realize special allocation of the model for different market states.

[0044] (3) Conventional model optimization methods in this invention mainly focus on parameter tuning, while the prediction model proposed in this invention innovatively integrates the optimization algorithm into the prediction algorithm, significantly improving the efficiency of model parameter tuning through the operations research optimization solver. Compared with conventional machine learning parameter optimization methods (such as cross-validation), the daily training speed of the model is increased by more than 50%. Attached Figure Description

[0045] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. 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 effort.

[0046] Figure 1 This is a flowchart illustrating the method for predicting price trends of commodities whose prices have been fluctuating for a long time, as provided by the present invention. Detailed Implementation

[0047] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings.

[0048] The difficulty in predicting volatile markets lies primarily in the rapid reversal of price trends, resulting in a significant lag in conventional direct price forecasts, which often fall short of market changes. Therefore, Bollinger Bands can be constructed based on historical market patterns to capture current market trends and assess the likelihood of a shift to a one-sided market or a price reversal. The data matrix of the forecasting model is then reconstructed according to different time windows to build a multi-time-dimensional time series forecasting machine learning system. Finally, a constrained optimization algorithm is used to combine these components to form the final predicted price.

[0049] Figure 1 This is a flowchart illustrating a method for predicting price trends in commodities whose prices have been fluctuating for a long period, as provided in this application embodiment. The method specifically includes the following steps:

[0050] Step S101: Obtain historical data, which includes the target commodity price at the corresponding time point and the characteristic factor data affecting the target commodity price.

[0051] Step S102: Construct a multi-dimensional time series prediction model and a machine learning prediction model based on historical data, and obtain the corresponding time series prediction results through the multi-dimensional time series prediction model and the machine learning prediction results through the machine learning prediction model.

[0052] Specifically, time series forecasting models include the ARIMA model or the Prophet model.

[0053] Regarding the ARIMA model, in time series forecasting, ARIMA (Autoregressive Moving Average) can be used for model fitting. It predicts based on past values ​​of the forecast variable and consists of three parts: AR, I, and MA. AR is the autoregressive component, MA is the moving average component, and I represents the number of differencing iterations to make the time series appear stationary. The ARMAX model is shown below: Among them, z t =(1-L) d y t Represents the time series after differencing, y t The target time series to be predicted.

[0054] Time-varying models incorporate time-varying characteristics into basic forecasting models to infer changes in the overall market environment, thereby characterizing changes in the factors driving commodity prices through variations in model parameters. Available time-varying models include:

[0055] Segmented fitting: Establish the basic logic of market environment changes, divide the time period into different time periods, and fit the prediction model separately in each time period.

[0056] Change point detection: This is used to detect points in a model where significant structural breaks or shifts have occurred, indicating major changes in the market environment. Change point detection algorithms include the CUSUM algorithm and the binary segmentation method.

[0057] Markov mechanism transition model: It represents the changes in market environment and driving factors by introducing implicit states and transitions between states.

[0058] The Prophet model is designed to solve time series data forecasting problems, especially those with significant seasonality, holiday effects, and trend changes. The following is a detailed introduction to the model:

[0059] The core idea of ​​the Prophet model is to decompose time series data into several components, mainly including:

[0060] Trend: Describes the overall change of a time series over time, and can be linear or non-linear. Through its flexible modeling, Prophet allows trends to vary across time series, rather than being limited to fixed growth patterns.

[0061] Seasonality: Describes patterns of cyclical change, such as annual seasonality, weekly seasonality, etc. Prophet uses Fourier series to model seasonality, which can effectively capture different cyclical changes.

[0062] Holiday Effects: Prophet allows users to incorporate specific holidays or special events as additional factors into their models to model the impact of time series on these events.

[0063] Prophet's mathematical model is based on the form of an additive model:

[0064] y(t)=g(t)+s(t)+h(t)+∈ t In this model, g(t) represents the trend component, which can be a linear or nonlinear model; s(t) represents the seasonality component, which can be a periodic function, such as annual or weekly seasonality represented by a Fourier series; h(t) represents the holiday effect, which can be an indicator function for a specific date or a smoothed model. t It is the error term, which is usually considered to be independent and identically distributed noise.

[0065] Prophet allows for two trend models:

[0066] Linear Trend: This assumes that the time series grows or declines linearly in the long run.

[0067] Non-linear growth (Logistic Growth): When there is an upper limit to the growth of data (such as population, sales of goods, etc.), the Sigmoid function can be used to model it. This method is more suitable for situations where the growth rate gradually tends to stabilize.

[0068] Machine learning algorithms can automatically analyze data to obtain models and use these models to predict unknown data. A time window of 1400 days prior to the current date (the specific time window can be expanded or narrowed based on data quality) is used as training data. The first 80% of historical data is used as training data, and an appropriate algorithm is selected based on the characteristics of the data to train the model. The trained model is then evaluated using the remaining 20% ​​of test data. Once the required accuracy is achieved, the model is used for prediction. Machine learning prediction models include random forest algorithms and support vector machine algorithms.

[0069] Random forest is an algorithm based on ensemble learning, consisting of many decision trees, and is widely used in classification and regression tasks. By integrating the predictions of multiple decision trees, random forest can improve the accuracy and robustness of the model and reduce overfitting. Its main principles can be summarized into the following key points:

[0070] 1. The foundation of decision trees:

[0071] Random forests use decision trees as their basic unit. Each decision tree recursively partitions the feature space, generating a model that can classify or regress the input data. The construction of decision trees is based on a greedy algorithm, selecting the optimal features and their split points at each step to minimize classification or regression errors. While single decision trees are easy to understand, they carry the risk of overfitting to the training data; therefore, ensemble methods are needed to improve upon this approach.

[0072] 2.Bagging (Bootstrap Aggregating) technology:

[0073] Random forests generate multiple decision tree models using the Bagging technique:

[0074] Sample randomness: Samples are randomly drawn with replacement from the training data (i.e., bootstrap method) to generate multiple different subsets. Each subset is the same size as the original dataset, but due to the randomness of sampling, some samples will be repeated, while some samples will be missed (called out-of-bag samples).

[0075] Feature randomness: Instead of using all features, a subset of features is randomly selected at each split node of the decision tree. This randomness reduces the correlation between trees and increases the diversity of the model.

[0076] Bagging technology allows each decision tree to be built independently on different training data, ensuring model diversity and thus reducing model variance.

[0077] 3. Construction of the decision tree:

[0078] In a random forest, the construction process of each decision tree is as follows:

[0079] Use a training subset (Bagging) generated by random sampling.

[0080] When splitting at each node, a subset of features is randomly selected from all features (by setting hyperparameters). Or d / 3, where d is the total number of features).

[0081] Find the optimal split point based on splitting criteria (such as Gini impurity, information gain, or mean square error).

[0082] Repeat the splitting until the stopping condition (such as maximum depth or minimum number of samples) is met.

[0083] Each tree is trained independently without pruning, resulting in decision trees that are generally quite "deep," thus enabling them to capture complex patterns in the data.

[0084] 4. Model Prediction:

[0085] Random forest predictions are achieved by integrating the predictions from all decision trees:

[0086] Classification task: For the classification results of each tree, a voting method is used to select the category that appears most frequently as the final prediction.

[0087] Regression task: Take the average of the regression results for each tree as the final prediction.

[0088] This ensemble approach effectively reduces the bias and variance of individual decision trees, thereby improving the stability and predictive ability of the model.

[0089] 5. Out-of-Bag Error:

[0090] Since the training dataset for each tree is generated through sampling with replacement, approximately 1 / 3 of the samples are not used for training that tree (i.e., out-of-bag samples). Random forests use out-of-bag samples for model validation, eliminating the need for additional validation set splitting. OOB error is an important performance metric for random forest models.

[0091] 6. Feature Importance Evaluation:

[0092] Random forests can assess the importance of features:

[0093] Feature importance based on split points: Count the number of splits of each feature in all trees and its contribution to impurity (such as Gini impurity or information gain).

[0094] Based on the importance of permutation: Randomly shuffle the values ​​of a feature and observe the degree of decline in model performance. The greater the decline, the higher the importance of that feature.

[0095] Feature importance analysis helps in understanding the model and identifying key features.

[0096] Support Vector Machines (SVMs) are a classic supervised learning algorithm widely used in classification and regression tasks, especially suitable for scenarios with small sample sizes and high-dimensional data. SVMs achieve efficient classification and prediction by constructing an optimal decision boundary (hyperplane) to maximize the classification margin. The following section details the principles of SVMs, from their basic ideas to their core technologies.

[0097] 1. Basic idea: Finding the optimal hyperplane. The core task of SVM is to find a hyperplane that separates data points of different classes as much as possible, while maximizing the margin of the classification boundaries.

[0098] Hyperplane: In n-dimensional space, a hyperplane is an n-1 dimensional plane, expressed by the formula: w·x+b=0, where w is the normal vector of the hyperplane, which determines the direction of the plane; b is the offset, which determines the distance between the plane and the origin.

[0099] Classification margin: The distance between the closest points of two classes of data points to the hyperplane is called the margin. SVM ensures the model's generalization ability by maximizing the margin.

[0100] Support vectors: The data points closest to the hyperplane play a crucial role in determining the classification boundary; these points are called support vectors. The construction of the hyperplane depends solely on the support vectors and is independent of other data points.

[0101] 2. Linearly separable scenarios:

[0102] When the data is linearly separable, SVM finds the optimal hyperplane by constraining the maximization of the classification margin. The objective function is: The constraints are: Where y i Let be the category label of sample i, with values ​​of {-1, +1}.

[0103] Using the Lagrange duality method, SVM transforms the optimization problem into a dual form and solves it using convex optimization to obtain w and b, thereby determining the optimal hyperplane.

[0104] 3. Linearly inseparable scenarios: soft-margin and kernel methods.

[0105] In practical problems, data is often linearly inseparable, so the following two methods are introduced:

[0106] (1) Soft Margin

[0107] For data with noise or a small number of misclassifications, SVM allows for a certain degree of classification error by introducing a slack variable ξ. i To measure the degree of misclassification. The optimization objective becomes: Where C is the regularization parameter, used to balance the relationship between the size of the margin and the penalty for misclassification.

[0108] (2) Kernel Trick

[0109] When data is inseparable in a low-dimensional space, SVM uses kernel functions to map the data to a high-dimensional space, making it linearly separable in that space. Essentially, kernel functions replace explicit high-dimensional mappings with dot products, significantly reducing computational complexity.

[0110] Commonly used kernel functions include:

[0111] Linear kernel: K(x, x′) = x·x′|

[0112] Polynomial kernel: K(x, x′) = (x·x′ + c) d

[0113] Gaussian kernel (RBF kernel):

[0114] Sigmoid kernel: K(x, x′)=tanh(αx·x′+c)

[0115] 4. Support Vector Regression (SVR)

[0116] SVM can also be used for regression tasks, known as Support Vector Regression (SVR). SVR introduces an ∈-insensitive loss function, which makes the error of the predicted value within the range of ±∈ of the true value ignored, while maximizing the margin and controlling the error.

[0117] 5. Model prediction.

[0118] The prediction function of SVM is: Where, x i It is a support vector; y i These are the class labels of the support vectors; α i It is a Lagrange multiplier; K(x) i ,x) is the kernel function.

[0119] For a new data point x, its classification result is obtained by calculating its kernel function value with respect to all support vectors.

[0120] Based on the historical data already obtained, a multidimensional time series forecasting model can be constructed by dividing the data into time windows. Let t represent the time of the latest acquired data day, t-1 represent the time of the day before the current date, and so on. The data time window division can be referenced as follows:

[0121]

[0122] Multidimensional time series forecasting uses 5 days as the short-to-medium term and 22 days as the long-term term as different periods to divide the data window. It then averages the price and feature factors to derive the price and feature factor data for the current window. After dividing historical data into different time windows, the aforementioned time series model can be used to fit and predict price trends to obtain short-to-medium and long-term price movements. The specific division can be referenced in the following formula, where n is any non-negative integer:

[0123] The short-to-medium term data window is divided into:

[0124]

[0125] The long-term data window is divided into:

[0126]

[0127] After dividing the data into different windows, the short-term and long-term price forecasts can be obtained by fitting a time series model.

[0128] Step S103: Taking the minimum variance of the prediction results as the optimization objective, the corresponding weight parameters of the time series prediction model and the machine learning prediction model in the multi-dimensional time dimension are obtained by applying the constrained optimization algorithm, and all prediction results are combined based on the corresponding weight parameters to form the target predicted price.

[0129] Specifically, constraint optimization is a mathematical method that seeks the optimal solution to a given objective function while satisfying design constraints. Its purpose is to transform complex real-world problems into mathematical models, thereby finding the best feasible solution under numerous practical limitations.

[0130] After each prediction model completes its forecast, we obtain three different prediction results: a short-to-medium-term time series prediction result, denoted as P_short; a long-term time series prediction result, denoted as P_long; and a machine learning prediction result, denoted as P_reg. These three prediction results respectively reflect the price trends of the commodity in the short-to-medium-term, long-term, and current market conditions. By applying a constrained optimization algorithm, with the goal of minimizing the variance of the three prediction results, and by assigning different weight parameters to each model, the results of the three prediction models can be combined into the final predicted price.

[0131] The objective function is:

[0132]

[0133] The constraint function is: β short +β long +β reg =1;

[0134] The parameter limits are:

[0135] The above combined algorithm assigns a weight parameter to each of the three predicted prices, and calculates the final optimal parameters with the goal of minimizing the variance between prices: The final best predicted price (P) opt Then, the final result can be obtained from the current combination:

[0136]

[0137] Step S104: Construct Bollinger Bands based on price characteristics and use their indicators to correct the target predicted price.

[0138] Specifically, Bollinger Bands (also known as Bollinger Channels) are a technical analysis tool invented by John Bollinger. In the trading market, they are often used by traders to measure market volatility and the high and low limits of price trends, thereby helping traders to discover potential trading opportunities.

[0139] In the bulk trading market for commodities such as nickel plates, the market price fluctuates frequently due to the high influence of related futures prices. Constructing Bollinger Bands can capture the current market situation and provide models with potential signals of an impending shift to a one-sided market or continued fluctuation. The specific calculations for Bollinger Band indicators are as follows:

[0140] Let the current time be m, and n be the moving average date. The daily simple moving average (SMA) of the Bollinger Bands is the average of the market prices over the past n days. Considering the past market prices as P... m ,P m-1 ,...,P m-(n-1) ,but

[0141] The SMA sequence obtained through rolling calculation forms the middle band of the Bollinger Bands. By calculating the standard deviation of the SMA sequence, the upper and lower bands of the Bollinger Bands can be further obtained.

[0142] upper_band = SMA + (K*σ)

[0143] lower_bandd = SMA - (K*σ).

[0144] In the above equation, ∈ represents the standard deviation influence factor of the prediction (which can be adjusted according to the commodity market situation). After the Bollinger Bands are constructed, constraint optimization can be used to adjust the weight of each prediction model in the final model construction based on the current market situation. For example, if the current market has broken through the upper or lower Bollinger Band, a higher minimum and maximum value of the medium-to-short-term model weight parameters can be manually set, indicating that the current commodity is in a strong unilateral market. Specific adjustments can be designed according to the actual situation of the commodity.

[0145] In addition, this application also provides a price trend prediction device for commodities whose prices have been fluctuating for a long time. The device includes: a data acquisition module, a model building module, and a price prediction module.

[0146] Specifically, the data acquisition module is used to acquire historical data, which includes the target commodity price at the corresponding time point and the characteristic factor data affecting the target commodity price.

[0147] The model building module is used to build multi-dimensional time series prediction models and machine learning prediction models based on historical data. It obtains the corresponding time series prediction results through the multi-dimensional time series prediction model and the machine learning prediction results through the machine learning prediction model.

[0148] The price prediction module aims to minimize the variance of the prediction results. It obtains the corresponding weight parameters of the time series prediction model and the machine learning prediction model in the multi-dimensional time dimension by applying a constrained optimization algorithm, and combines all prediction results based on the corresponding weight parameters to form the target predicted price.

[0149] Preferably, the aforementioned price trend prediction device for commodities whose prices have been fluctuating for a long time also includes a price correction module, which is used to construct Bollinger Bands based on price characteristics and use its indicators to correct the target predicted price.

[0150] Therefore, the technical solution of this application innovatively integrates multiple prediction models, providing analytical support for the prediction of final price trends from multiple dimensions. While greatly improving the accuracy of the models, it also provides more assistance for business decision-making and helps to capture potential procurement opportunities.

[0151] In addition to the above embodiments, the present invention may have other implementation methods; all technical solutions formed by equivalent substitution or equivalent transformation fall within the protection scope claimed by the present invention.

Claims

1. A method for predicting price trends of commodities whose prices have been fluctuating for a long time, characterized by: include: Acquire historical data, which includes the target commodity price at the corresponding point in time and the characteristic factor data affecting the target commodity price; Based on historical data, a multi-dimensional time series prediction model and a machine learning prediction model are constructed. The corresponding time series prediction results are obtained through the multi-dimensional time series prediction model, and the machine learning prediction results are obtained through the machine learning prediction model. The optimization objective is to minimize the variance of the prediction results. By applying a constrained optimization algorithm, the corresponding weight parameters of the time series prediction model and the machine learning prediction model in the multi-dimensional time dimension are obtained. Based on the corresponding weight parameters, all prediction results are combined to form the target predicted price.

2. The method for predicting price trends of commodities whose prices have been fluctuating for a long time, as described in claim 1, is characterized in that: The time series prediction model includes the ARIMA model or the Prophet model, and the machine learning prediction model includes the random forest algorithm model or the support vector machine algorithm model.

3. The method for predicting price trends of commodities whose prices have been fluctuating for a long time, as described in claim 1, is characterized in that: The multi-dimensional time series forecasting model includes short-to-medium-term time series forecasting models and long-term time series forecasting models.

4. The method for predicting price trends of commodities whose prices have been fluctuating for a long time, as described in claim 3, is characterized in that: The process of obtaining the corresponding time series prediction results through a multi-dimensional time series prediction model includes: Historical data is divided into short- and medium-term data windows and long-term data windows; The data obtained by dividing the data window into medium and short term segments are fitted with a medium and short term time series forecasting model to obtain medium and short term price forecasting results; Long-term price forecasts are obtained by fitting the data obtained from dividing the long-term data window into a long-term time series forecast model.

5. The method for predicting price trends of commodities whose prices have been fluctuating for a long time, as described in claim 4, is characterized in that: The division of historical data into short-term and long-term data windows includes: Historical data is divided according to short- to medium-term data windows: ; Historical data is divided according to short- to medium-term data windows: ; Among them, P t Q represents the price of the commodity. t For feature factor data, b is greater than a.

6. The method for predicting price trends of commodities whose prices have been fluctuating for a long time, as described in claim 5, is characterized in that: The optimization objective of minimizing the variance of the prediction results, and the acquisition of corresponding weight parameters for the multi-dimensional time series prediction model and the machine learning prediction model through the application of constrained optimization algorithms, include: The objective function of the applied constraint optimization algorithm is: ; The constraint function is: ; The parameter limits are: ; in, These are short- to medium-term time series forecast results. For long-term time series forecasting structure, For machine learning prediction results, These are the optimal parameters for the short-to-medium-term time series forecasting model, the long-term time series forecasting model, and the machine learning forecasting model, respectively.

7. The method for predicting price trends of commodities whose prices have been fluctuating for a long time, as described in claim 6, is characterized in that: The process of combining all prediction results based on corresponding weight parameters to form the target predicted price includes: Target Predicted Price for: .

8. The method for predicting price trends of commodities whose prices have been fluctuating for a long time, as described in claim 1, is characterized in that: After taking the minimum variance of the prediction results as the optimization objective, obtaining the corresponding weight parameters of the multi-dimensional time series prediction model and the machine learning prediction model by applying a constrained optimization algorithm, and combining all prediction results based on the corresponding weight parameters to form the target predicted price, the method further includes: Bollinger Bands are constructed based on price characteristics, and their indicators are used to correct the target predicted price.

9. The method for predicting price trends of commodities whose prices have been fluctuating for a long time, as described in claim 8, is characterized in that: The step of constructing Bollinger Bands based on price characteristics and using its indicators to correct the target predicted price includes: Given the current time m and the moving average date n, the daily simple moving average of the Bollinger Bands is: ,in, The historical market price of the target commodity; The SMA sequence obtained through rolling calculation forms the middle band of the Bollinger Bands, and the upper and lower bands of the Bollinger Bands are obtained by calculating the standard deviation of the SMA sequence. Where k is the standard deviation of the SMA sequence, This represents the factor of the standard deviation of the forecast.

10. A price trend prediction device for commodities whose prices have been fluctuating for a long time, characterized in that: include: The data acquisition module is used to acquire historical data, which includes the target commodity price at the corresponding time point and the characteristic factor data affecting the target commodity price. The model building module is used to build multi-dimensional time series prediction models and machine learning prediction models based on historical data, and to obtain corresponding time series prediction results through the multi-dimensional time series prediction models and machine learning prediction results through the machine learning prediction models. The price prediction module aims to minimize the variance of the prediction results. It obtains the corresponding weight parameters of the time series prediction model and the machine learning prediction model in the multi-dimensional time dimension by applying a constrained optimization algorithm, and combines all prediction results based on the corresponding weight parameters to form the target predicted price.

Citation Information

Cited By

  • Long-tail commodity procurement prediction method, device and equipment

    CN121767032A

  • A method, device and equipment for purchasing prediction of long-tail commodities

    CN121767032B