Base oil price prediction method based on multivariate time series

The base oil price prediction method uses multivariate time series analysis with a vector autoregression model and LSTM network to enhance forecasting accuracy by considering various factors, achieving a high correlation and low error in predicting base oil prices.

CN119168673APending Publication Date: 2024-12-20PETROCHINA CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310728581.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-19
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

Existing methods struggle to accurately predict base oil prices by considering a comprehensive set of influencing factors, leading to insufficient correlation coefficients and prediction errors in base oil price fluctuations.

Method used

A base oil price prediction method using multivariate time series analysis, incorporating a vector autoregression model and a long short-term memory network (LSTM) to analyze and forecast base oil prices, considering factors like international market, macroeconomics, and related oil product prices, with specific data processing and model parameters tailored for lubricant companies.

Benefits of technology

The method achieves a high correlation coefficient and low standardized root mean square error, providing a reliable and accurate prediction of base oil prices, addressing the limitations of previous methods by enhancing the consideration of key influencing factors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119168673A_ABST
    Figure CN119168673A_ABST
Patent Text Reader

Abstract

The invention discloses a base oil price prediction method based on a multivariate time sequence. The base oil price prediction method is specifically implemented according to the following steps: step 1, qualitatively analyzing factors influencing base oil price fluctuation and acquiring related data; 2, establishing a vector autoregression model, and screening predictive variables; and 3, establishing a long-short-term memory network model, and predicting the price of the base oil. According to the method, various factors influencing the domestic base oil price are comprehensively considered, the variance contribution rate of the prediction variable to the response variable can be obtained while the optimal prediction sequence is obtained, and particularly, the defect that the correlation coefficient of the prediction sequence and the observation sequence in an existing base oil price prediction method is too small is overcome.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of oil price prediction methods, and in particular relates to a base oil price prediction method based on multivariate time series. Background Art

[0002] Competition in the lubricant industry is becoming increasingly fierce. In addition to product quality and service, price is also an important factor affecting product market share. Lubricant prices are largely affected by base oil prices. How to control base oil costs has become the focus of this round of competition.

[0003] Fluctuations in base oil prices have a direct impact on the production and sales profits of lubricant companies. Therefore, it is necessary to study the factors affecting base oil prices and analyze the changing patterns of base oil prices. Summary of the invention

[0004] The purpose of the present invention is to provide a base oil price prediction method based on multivariate time series, which can qualitatively analyze the factors affecting the base oil price.

[0005] The technical solution adopted by the present invention is a base oil price prediction method based on multivariate time series, which is specifically implemented according to the following steps:

[0006] Step 1: Qualitatively analyze the factors affecting base oil price fluctuations and obtain relevant data;

[0007] Step 2: Establish a vector autoregression model and select predictor variables;

[0008] Step 3: Establish a long short-term memory network model to predict the base oil price.

[0009] The present invention is also characterized in that:

[0010] In step 1, the factors affecting base oil prices are determined by voting by industry experts as the international market, macroeconomics and the linkage of related oil product prices.

[0011] The vector autoregression model in step 2 constructs the model by taking each endogenous variable in the system as a function of the lagged values ​​of all endogenous variables in the system, thereby generalizing the univariate autoregression model to a vector autoregression model composed of multivariate time series, which is in the form of:

[0012] y t =β1y t-1 +β2y t-2 +… (1)

[0013] In the formula, y t-1 is its own lag term, β1 is the coefficient

[0014] In addition to analyzing the impact of its own lag terms, the vector autoregression model also analyzes the impact of the lag terms of other related factors on future values. The form of the model is:

[0015] y t =β1y t-1 +α1x t-1 +β2y t-2 +α2x t-2 +… (2)

[0016] In the formula, x t-1 is the lag term of other factors, and α1 is the influence coefficient.

[0017] Step 2 is implemented as follows:

[0018] Step 2.1, conduct correlation analysis and stationarity test;

[0019] Step 2.2, conduct Granger causality test or cointegration test;

[0020] Step 2.3, determine the lag order and estimate the parameters, and perform parameter stability test;

[0021] Step 2.4: Perform impulse response analysis and variance decomposition analysis.

[0022] Step 2.1 is as follows: draw a correlation diagram of N variable sequences, calculate the correlation coefficient, check its linear correlation, and perform a stationarity test on the variables before fitting the VAR model. According to the test results, if the variables are stationary, a Granger causality test can be performed; if the variables are non-stationary but cointegrated at the same order, a cointegration test can be performed.

[0023] Step 2.3 is as follows: comprehensively analyze various criteria, select the order that makes various test criteria reach the minimum value the most times as the lag order of the model, and after the order is determined, fit the model, estimate the parameters, and check the significance of the parameters.

[0024] Step 2.4 is as follows: examine the impact of a standard deviation shock on the random error term of a certain variable on the current and future values ​​of other variables, analyze the contribution ratio of the shock of each endogenous variable to the target endogenous variable, and then judge the importance of each variable.

[0025] Step 3 specifically processes the original data into a format that the LSTM model can recognize, and maintains the input format requirements of the LSTM model. At the same time, the data set is divided into a training set and a test set at a ratio of 9:1. After experiments and comparison of the experimental results, the parameters of the LSTM model finally designed are as follows: 3 neurons in the input layer, 2 hidden layers with 200 neurons each, 2 neurons in the output layer, Relu as the activation function, Adam as the optimization algorithm, 250 epochs in the model and 6 batches of size for each batch, and shuffle is set to False. Based on the actual needs of lubricant companies, the loss function uses a custom function DISO, which is defined as:

[0026]

[0027] Among them, R is the correlation coefficient and NRMSE is the standardized root mean square error.

[0028] The beneficial effect of the present invention is that the base oil price prediction method based on multivariate time series of the present invention comprehensively considers various factors that affect the domestic base oil price, and while obtaining the optimal prediction sequence, it can also obtain the variance contribution rate of the prediction variable to the response variable, especially making up for the defect that the correlation coefficient between the prediction sequence and the observation sequence in the existing base oil price prediction method is too small. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 is a calculation flow chart of the present invention;

[0030] Figure 2 is a price time series diagram of the response variable ICIS150N of the present invention;

[0031] Figure 3 is a scatter plot matrix of some variables of the present invention;

[0032] Figure 4 It is the parameter stability test result of the present invention.

[0033] Figure 5 It is the impulse response result of the response variable ICIS150N of the present invention to some variables;

[0034] Figure 6 is the variance decomposition analysis result of the response variable ICIS150N of the present invention;

[0035] Figure 7 It is the calculation principle of the hidden layer in RNN;

[0036] Figure 8 It is the training process of LSTM neural network;

[0037] Fig. 9is the prediction effect of the LSTM model of the present invention on the validation set;

[0038] Fig.10 It is the prediction effect of the LSTM model backtesting the training set of the present invention;

[0039] Fig.11 It is the loss function image in the LSTM model training process of the present invention. DETAILED DESCRIPTION

[0040] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0041] The base oil price prediction method based on multivariate time series of the present invention is as follows: Figure 1 As shown, the specific implementation steps are as follows:

[0042] Step 1: Qualitatively analyze the factors affecting base oil price fluctuations and obtain relevant data;

[0043] In step 1, the influencing factors of base oil prices are determined by voting by industry experts as the international market, macroeconomics and the linkage of related oil product prices, among which the international market is represented by Brent crude oil prices and WTI light crude oil prices; the macroeconomics is represented by my country's GDP, CPI, PPI, and HSBC PMI; the linkage of related oil product prices is represented by white oil prices and diesel prices;

[0044] Step 2: Establish a vector autoregression model and select predictor variables;

[0045] The vector autoregression model in step 2 is an econometric model based on the statistical properties of the data. Each endogenous variable in the system is used as a function of the lagged values ​​of all endogenous variables in the system to construct the model, thereby extending the univariate autoregression model to a vector autoregression model composed of multivariate time series. Its form is:

[0046] y t =β1y t-1 +β2y t-2 +… (1)

[0047] In the formula, y t-1 is its own lag term, and β1 is the coefficient;

[0048] In addition to analyzing the impact of its own lag terms, the vector autoregression model also analyzes the impact of the lag terms of other related factors on future values. The form of the model is:

[0049] y t =β1y t-1 +α1x t-1 +β2y t-2 +α2x t-2 +… (2)

[0050] In the formula, x t-1 is the lag term of other factors, α1 is the influence coefficient;

[0051] In summary, the vector autoregression model is a comprehensive model that combines the advantages of multiple linear regression (multiple factors can be added) and time series model (the influence of lag terms can be analyzed);

[0052] Step 2 is implemented as follows:

[0053] Step 2.1, conduct correlation analysis and stationarity test;

[0054] Step 2.1 is as follows: draw the correlation diagram of N variable sequences, calculate the correlation coefficient, check its linear correlation, and perform a stationarity test on the variables before fitting the VAR model. The VAR model can be fitted only when the endogenous variables to be fitted are all stationary or cointegrated at the same order. According to the test results, if the variables are stationary, a Granger causality test can be performed. If the variables are non-stationary but cointegrated at the same order, a cointegration test can be performed. Before the stationarity test, the variables need to be logarithmic to eliminate the influence of heteroscedasticity of the time series.

[0055] Step 2.2, conduct Granger causality test or cointegration test;

[0056] Granger Causality Test:

[0057] In the VAR model, the causal relationship of the Granger test refers to whether a variable can be used to improve the predictive ability of other variables. That is, the essence of Granger causality is a "prediction" relationship. Its essence is to examine whether the lag of a variable can be added to the formula of other variables. When a variable is indeed affected by the lag of other variables, it can be said that there is a Granger causal relationship between the two variables.

[0058] Cointegration test:

[0059] Non-stationary series are likely to have pseudo-regression phenomenon. The significance of cointegration test is to test whether the causal relationship described by their regression equation is pseudo-regression, that is, to test whether there is a long-term equilibrium relationship between the variables. Therefore, the causal relationship test of non-stationary series is cointegration test;

[0060] Step 2.3, determine the lag order and estimate the parameters, and perform parameter stability test;

[0061] Before fitting the VAR model, it is also necessary to determine the order of the VAR model to be fitted, that is, to determine the lag order. The determination of the lag order needs to consider the following two issues: if the lag order p is too small, the random error term will have autocorrelation problems; when the lag order p is too large, the model needs to estimate too many parameters, which will lead to the problem of too small degrees of freedom of the model;

[0062] Step 2.3 is as follows: comprehensively analyze various criteria (AIC criterion, SC criterion, HQ criterion, final prediction error (FPE)), select the order that makes various test criteria reach the minimum value the most times as the lag order of the model, and after the order is determined, fit the model, estimate the parameters, and check the significance of the parameters;

[0063] In addition, the parameters estimated by the VAR model need to be tested for stability. This is to check whether the data sample has undergone structural changes when the model is fitted. Only models that pass the parameter stability test have predictive capabilities, and subsequent impulse response and variance decomposition analysis are meaningful.

[0064] Step 2.4, perform impulse response analysis and variance decomposition analysis;

[0065] In the VAR model, the role of impulse response analysis is to analyze the time and magnitude of the impact of a certain variable on other variables. Its essence is to describe the response of a certain endogenous variable to the residual shock.

[0066] Variance decomposition is used to analyze the degree of explanation of a variable to other variables, that is, the variance contribution rate of the endogenous variable to the target variable. If the impulse response function describes the impact of any endogenous variable in the model on other variables, then variance decomposition is to analyze the contribution ratio of the impact of each endogenous variable to the target endogenous variable, and then judge the importance of each variable;

[0067] Step 2.4 is as follows: examine the impact of a standard deviation shock on the random error term of a certain variable on the current and future values ​​of other variables, analyze the contribution ratio of the shock of each endogenous variable to the target endogenous variable, and then judge the importance of each variable;

[0068] Step 3: Establish a long short-term memory network model to predict the base oil price;

[0069] The most commonly used tool for time series models is the recurrent neural network (RNN). Compared with the independent characteristics of the calculation results of ordinary neural networks, the calculation results of each hidden layer of RNN are related to the current input and the previous hidden layer results, such as Figure 7As shown in the figure, through this method, the calculation results of RNN have the characteristics of memorizing the previous results;

[0070] The advantage of RNN is that it combines time series data with neural networks, and retains the impact of the previous moment on the present, retaining the time series of data. However, as the time series grows, studies have found that RNN has a weak ability to process long sequences, which means that the long-term memory effect of RNN is not very ideal. In addition, when the RNN model realizes long-term memory, it needs to link the calculation of the current implicit state with the calculation of the previous n times, that is,

[0071] S t =f(UX t +W1S t-1 +W2S t-2 +…+W n S t-n )

[0072] Therefore, the amount of calculation will increase exponentially, resulting in a significant increase in the model training time. When calculating the gradient, it is impossible to avoid the problems of gradient vanishing and gradient exploding. These problems are areas where RNN needs to be improved, and the long short-term memory neural network model (LSTM) solves these problems well.

[0073] The LSTM (Long Short-Term Memory) model is a variant of RNN. The characteristic of LSTM is that valve nodes are added to each layer outside the RNN structure. There are three types of valves: forget gate, input gate and output gate. These valves can be opened or closed to determine whether the output result of the memory state of the model network (the previous state of the network) at this layer reaches the threshold and is added to the calculation of the current layer. If the output result reaches the threshold, the valve output is multiplied by the calculation result of the current layer as the input of the next layer. If the threshold is not reached, the output result is forgotten. Therefore, by adjusting the switch of the valve, we can realize the influence of the early sequence on the final result.

[0074] LSTM neural network is similar to traditional feedforward network, such as Figure 8As shown in the figure, the forward calculation process is carried out in the direction of the black arrow, and the back propagation of the error is carried out in the direction of the red arrow. First, the network structure and loss function of LSTM must be determined; secondly, each parameter is initialized, and then the accuracy of the model is calculated through the loss function. If the required accuracy is not achieved, the parameters need to be updated; the update standard of weights and bias items should be to minimize the loss of the specified objective function in the training sample, that is, to obtain the gradient information when the loss function is derived for the parameters, and then update the parameters in combination with the learning rate of the model. Generally, we will choose the corresponding optimization algorithm to update the gradient, and repeat this cycle. When the gradient reaches the accuracy we require, the parameters of the model can be determined, the modeling of the LSTM model can be completed, and it can be applied to prediction or classification;

[0075] Since there is a lot of noise in oil price data, when using traditional methods to estimate parameters, it is often found that there is a large error between the result and the true value. The Adam algorithm is an efficient random optimization method. The efficiency of this method is due to further optimization. It uses the low-order moment estimation of the sample gradient (generally below the second order), which greatly improves the computational efficiency. Through this method, Adam can calculate the adaptive learning rate of each parameter for different parameters, thereby achieving the purpose of parameter update. The Adam algorithm improves the framework of the stochastic gradient descent algorithm to maintain a single learning rate training data. Its advantages are high computational efficiency, less memory required, and good optimization effect for processing noisy data sets, especially when the parameters are updated, the angular scaling of the gradient remains unchanged;

[0076] Step 3 specifically processes the original data into a format that the LSTM model can recognize, and maintains the input format requirements of the LSTM model. At the same time, the data set is divided into a training set and a test set at a ratio of 9:1. After experiments and comparison of the experimental results, the parameters of the LSTM model finally designed are as follows: 3 neurons in the input layer, 2 hidden layers with 200 neurons each, 2 neurons in the output layer, Relu as the activation function, Adam as the optimization algorithm, 250 epochs in the model and 6 batches of size for each batch, and shuffle is set to False. Based on the actual needs of lubricant companies, the loss function uses a custom function DISO, which is defined as:

[0077]

[0078] Among them, R is the correlation coefficient and NRMSE is the standardized root mean square error.

[0079] The base oil price prediction method based on multivariate time series of the present invention is specifically implemented according to the following steps:

[0080] Step 1: Qualitatively analyze the factors affecting base oil price fluctuations and obtain relevant data;

[0081] Example 1

[0082] For the prediction variables, in the international market, since the Brent crude oil market is the core of the world's crude oil trade, and the Brent crude oil trading volume accounts for two-thirds of the world's crude oil trading volume, the experiment selects Brent crude oil futures prices to represent the international crude oil prices, which can more comprehensively examine the price linkage relationship between the upstream and downstream products of the crude oil industry; in terms of macroeconomics, since the original GDP data is too sparse, incorporating it into the prediction variables will greatly reduce the data sample dimension, thereby affecting the training effect of the deep learning network, so only CPI, PPI, PMI and other indicators are selected; in terms of the price linkage of related oil products, according to the needs of domestic lubricant companies, the weekly prices of Panjin Beili 10# and Hengli Petrochemical 32# industrial white oil are selected for white oil, and the wholesale price of Shanghai Sinopec National VI 0# is selected for diesel. As for the response variable, according to the needs of domestic lubricant companies, the weekly average price of ICIS150N in Class II oil in East China is selected as the initial data sample, such as Figure 2 shown.

[0083] Step 2: Establish a vector autoregression model and select predictor variables;

[0084] Correlation analysis

[0085] Example 2

[0086] Taking the weekly prices of ICIS150N, Brent crude oil, Panjin Beili 10#, and Hengli Petrochemical 32# industrial white oil as examples, draw a scatter plot matrix of N variable sequences, such as Figure 3 As shown, the correlation coefficient is calculated, as shown in Table 1, to check the linear correlation between the variables.

[0087] Table 1 Correlation coefficient matrix of each variable sequence

[0088]

[0089] Stationarity test

[0090] Taking the price of base oil ICIS150N as an example, the ADF test is performed on it, and the test statistic obtained falls into the rejection domain, so the sequence is not stable. Therefore, the first-order difference is performed on it, and the ADF test shows that the difference sequence is stable. Then, the first-order difference of each variable sequence is performed and the ADF test is performed. The experimental results show that each difference sequence is stable, that is, the selected variable sequence is first-order cointegrated.

[0091] Cointegration Test

[0092] The Johansen test was performed on each variable sequence, and it was found that the test statistic for r=0 (no cointegration relationship) was greater than the critical value. Therefore, the original hypothesis was rejected, and it was believed that there was a cointegration relationship between the selected variable sequences.

[0093] Determine the lag order

[0094] To determine the lag order, you need to use the VARselect function in the vars package. Based on the results, select the lag order p=5.

[0095] Table 2 Optimal lag order under each information criterion

[0096]

[0097] Estimate parameters and perform parameter stability tests

[0098] Use the "OLS-CUSUM" function to test the parameter stability. This function gives the residual cumulative sum. In the curve graph generated by this test, the residual cumulative sum curve uses time as the horizontal axis, and two critical lines are drawn in the graph. If the cumulative sum exceeds these two critical lines, it means that the parameter is not stable. The results show that the parameter is stable, such as Figure 4 shown.

[0099] Pulse response analysis

[0100] Example 3

[0101] Taking the price of ICIS150N as an example, the impulse response graph of each variable to the variable is made to check the time and magnitude of the impact of each variable on the variable. The experimental results show that, in addition to the price of ICIS150N itself, the only variables that have a significant impact on it are Brent crude oil prices and the Purchasing Managers Index (PMI). Figure 5 Shown is an image of the impulse response of ICIS150N's price to itself.

[0102] Variance decomposition analysis

[0103] Taking the price of ICIS150N as an example, we can make a variance decomposition graph of the variable and check the contribution ratio of the impact of each variable to the fluctuation of the variable, such as Figure 6 The experimental results further show that the variables that have a significant impact on the price fluctuation of ICIS150N are only its own past price, Brent crude oil price and Purchasing Managers Index (PMI).

[0104] According to the experimental results of the above impulse response analysis and variance decomposition analysis, the initial data of ICIS150N price, Brent crude oil price and Purchasing Managers Index PMI were entered into Python. In order to solve the problem of inconsistent date indexes of different variables, the variables were unified into monthly data from January 2013 to July 2021, and finally a multivariate time series with 103 rows and 3 columns was generated.

[0105] Building a long short-term memory network model to predict base oil prices

[0106] The original data is processed into a format that the LSTM model can recognize, and the input format requirements of the LSTM model (samples, timesteps, features) are maintained. At the same time, the data set is divided into a training set and a test set in a ratio of 9:1. After repeated experiments and comparison of the test results, the parameters of the LSTM model are finally designed as follows:

[0107] The input layer has 3 neurons, the 2 hidden layers have 200 neurons each, the output layer has 2 neurons, the activation function uses Relu, the optimization algorithm uses Adam, the model uses 250 epochs and the size of each batch is 6, and the shuffle is set to False. Based on the actual needs of domestic lubricant companies, the loss function uses the custom function DISO (Distance between Indices of Simulation and Observation), which is defined as:

[0108]

[0109] Where R is the correlation coefficient and NRMSE is the normalized root mean square error.

[0110] Compared with commonly used statistical indicators, DISO can achieve comprehensive quantification of the multi-dimensional accuracy of the model. The essence of DISO is the distance between the model prediction sequence and the observation sequence indicators. The smaller the distance, the higher the accuracy; conversely, the lower the accuracy.

[0111] According to the above steps, the prediction sequence and corresponding observation sequence of the final model for base oil ICIS150N are as follows: Fig. 9 As shown in the figure, the correlation coefficient of the two sequences is calculated to be r = 0.948, and the standardized mean square error nrmse = 0.019. It can be found that the fluctuation trends of the predicted sequence and the observed sequence are highly consistent, and the error between the two is also controlled within a reasonable range. To further verify the prediction effect, the obtained model is used to backtest the training set data, and the verification results are as follows: Fig.10As shown in , it can be found that the obtained model also has good prediction effect on the training set. During the model training process, the loss function of 250 epochs is as follows Fig.11 As shown, it can be found that after about 200 epochs, the loss function of the model has dropped to a small enough level and remains basically stable.

[0112] The present invention makes up for the deficiency of existing methods that it is difficult to take into account both the large enough correlation coefficient between the prediction sequence and the observation sequence and the small enough mean square error based on a comprehensive analysis of the main factors affecting the fluctuation of domestic base oil prices. Various indicators from the perspectives of international market, macroeconomics and the linkage of related oil prices are comprehensively considered. Prediction variables are further screened out by establishing a vector autoregression model and performing impulse response analysis and variance decomposition analysis. Finally, a long short-term memory network model is designed. Taking into account the actual needs of domestic lubricant companies, a statistical indicator that can comprehensively quantify the multi-dimensional accuracy of the model is used as a loss function, thereby achieving a reasonable prediction of domestic base oil prices. The final model has a good prediction effect on the price of base oil ICIS150N.

Claims

1. A method for predicting base oil prices based on multivariate time series, characterized in that: Follow the steps below to implement it: Step 1: Qualitatively analyze the factors affecting base oil price fluctuations and obtain relevant data; Step 2: Establish a vector autoregression model and select predictor variables; Step 3: Establish a long short-term memory network model to predict the base oil price.

2. The method for predicting base oil prices based on multivariate time series according to claim 1, characterized in that: In step 1, the factors affecting the base oil price are determined by voting by industry experts as the international market, macroeconomics and the linkage of related oil product prices.

3. The method for predicting base oil prices based on multivariate time series according to claim 1, characterized in that: The vector autoregression model in step 2 constructs a model by taking each endogenous variable in the system as a function of the lagged values ​​of all endogenous variables in the system, thereby generalizing the univariate autoregression model to a vector autoregression model composed of multivariate time series, which is in the form of: y t =β1y t-1 +β2y t-2 +…(1) In the formula, y t-1 is its own lag term, and β1 is the coefficient; In addition to analyzing the impact of its own lag terms, the vector autoregression model also analyzes the impact of the lag terms of other related factors on future values. The form of the model is: y t =β1y t-1 +α1x t-1 +β2y t-2 +α2x t-2 +…(2) In the formula, x t-1 is the lag term of other factors, and α1 is the influence coefficient.

4. The method for predicting base oil prices based on multivariate time series according to claim 1, characterized in that: The step 2 is specifically implemented according to the following steps: Step 2.1, conduct correlation analysis and stationarity test; Step 2.2, conduct Granger causality test or cointegration test; Step 2.3, determine the lag order and estimate the parameters, and perform parameter stability test; Step 2.4: Perform impulse response analysis and variance decomposition analysis.

5. The method for predicting base oil prices based on multivariate time series according to claim 4, characterized in that: The step 2.1 is specifically as follows: draw a correlation diagram of N variable sequences, calculate the correlation coefficient, check its linear correlation, and perform a stationarity test on the variables before fitting the VAR model. According to the test results, if the variables are stationary, a Granger causality test can be performed; if the variables are non-stationary but cointegrated at the same order, a cointegration test can be performed.

6. The method for predicting base oil prices based on multivariate time series according to claim 4, characterized in that: The step 2.3 is specifically as follows: comprehensively analyze various criteria, select the order that makes various test criteria reach the minimum value the most times as the lag order of the model, and after the order is determined, fit the model, estimate the parameters, and check the significance of the parameters.

7. The method for predicting base oil prices based on multivariate time series according to claim 4, characterized in that: The step 2.4 is specifically as follows: examine the impact of applying a standard deviation shock to the random error term of a certain variable on the current and future values ​​of other variables, analyze the contribution ratio of the shock of each endogenous variable to the target endogenous variable, and then judge and analyze the importance of each variable.

8. The method for predicting base oil prices based on multivariate time series according to claim 1, characterized in that: The step 3 is specifically to process the original data into a format that can be recognized by the LSTM model, and maintain the input format requirements of the LSTM model. At the same time, the data set is divided into a training set and a test set at a ratio of 9:

1. After experiments and comparison of the experimental results, the parameters of the LSTM model finally designed are as follows: 3 neurons in the input layer, 2 hidden layers with 200 neurons each, 2 neurons in the output layer, Relu as the activation function, Adam as the optimization algorithm, 250 epochs in the model and 6 batches of size each, shuffle is set to False, and based on the actual needs of lubricant companies, the loss function uses a custom function DISO, which is defined as: Among them, R is the correlation coefficient and NRMSE is the standardized root mean square error.

Citation Information

Cited By

  • Surface water resource quality dynamic prediction and early warning method

    CN122048578A