Forecasting Crude Oil Prices with a WT-FNN Model

In order to improve the accuracy of forecasting crude oil prices, a new crude oil price forecasting method is introduced in the paper that is a combination of the FNN model and the stochastic time effective function—namely, the WT-FNN model. The FNN model keeps track of the historical values of crude oil prices and predicts future crude oil prices, and the stochastic time effective function gives greater weight to recent information and smaller weight to old information, thus making the prediction of crude oil prices more reasonable. We selected the daily data of Brent crude oil prices from 4 January 2000 to 30 September 2021 as research objects and then used the WT-FNN model to train and predict the research objects. By comparing it to the benchmark model, we found that the predictive effect of the WT-FNN model was better than the FNN model and the no-change model. The results also passed a robustness test.


Introduction
Crude oil is not only an important industrial raw material but also a financial instrument. It is a crucial strategic reserve since nearly two-thirds of the world's energy demand is met by crude oil. Moreover, crude oil is also the world's largest traded commodity, accounting for over 10% of total world trade. Therefore, the fluctuations in crude oil prices have a significant impact on the world's economy and financial markets [1,2]. The impact of crude oil price fluctuations is manifested in two main ways. Firstly, a sharp rise in crude oil prices causes an economic recession in crude oil import countries, and a drop in crude oil prices causes a fiscal deficit in crude oil export countries. Secondly, some sectors of the economy and finance depend on the forecasts of crude oil prices for their business. Investors and portfolio managers usually allocate their assets based on crude oil price forecasts. Therefore, it is of great importance to take a scientific approach to crude oil forecasting to avoid price risks and to grasp investment opportunities. The method of forecasting crude oil prices mainly includes the traditional econometrics method, a machine learning method, and a combined method. Specific research on these three methods is as follows.
Econometrics is widely used in predictive research on crude oil prices. For instance, Witold [3] predicted crude oil prices through researching the Granger causality relationship between crude oil prices and exchange rates. Rangan and Christian [4] used the least absolute shrinkage and selection operator (LASSO) model to study the uncertainty of crude oil prices and to predict them; their results showed that the LASSO model with a recursive or a rolling estimation window could predict crude oil prices accurately. Li and Tsiakas [5] utilized a prevailing econometric methodology, namely, the least absolute shrinkage and selection operator (LASSO), to predict crude oil prices. In particular, consistent with Elliott et al. and Li et al. [6,7], Zhang et al. [8] took LASSO, the ridge regression, and four other models combined with 34 influencing factors to predict crude oil prices, and the results showed that the LASSO model could improve the forecasting accuracy of crude oil prices. Cuaresma et al. [9] maintained that the self-regression model could predict the crude oil prices more accurately. Miao et al. [10] and Miao et al. [11] verified the feasibility and accuracy of the autoregressive integrated moving average mode (ARIMA) model for predicting crude oil prices. Wu et al. [12] analyzed West Texas Intermediate (WTI) crude oil based on the generalized autoregressive conditional heteroskedasticity (GARCH) model and found that the GARCH model had a better forecasting effect.
Because of the strong nonlinear characteristic of crude oil prices, traditional econometrics models based on a stationarity and linearity hypothesis fail to effectively predict the nonlinear part. The machine learning method can solve the problem [13,14].
Shin et al. [15] utilized the neural network model to predict monthly prices of WTI (West Texas Intermediate) from January 1992 to June 2008. Xie et al. [16] proposed a crude oil price forecasting method based on a support vector machines (SVM) model and showed that the improved SVM model had a better performance in crude oil prices prediction. Tang et al. [17] established a novel hybrid ensemble learning paradigm to predict WTI crude oil prices, which had high accuracy. Chiroma et al. [18] constructed a genetic algorithm and neural network (GA-NN) model to predict WTI crude oil prices by combining the genetic algorithm and neural network models.
The neural network model can handle only the current data, and the model adjustment is more affected by the current input data. However, crude oil price prediction is not only affected by the current data but also by those of the previous period. Therefore, the deep learning long short-term memory (LSTM) of the special time series generating model was created, which was first proposed by Hochreiter et al. [19]. The main feature of the model is based on the principle of self-circulation, referring to the previous data at the parameter correction, and it improves the forecasting accuracy of crude oil prices. Sutskever et al. [20] applied the LSTM model to the field of forecasting crude oil prices; they proved the sensitivity of the LSTM model for data element sorting and verified it as more suitable for forecasting the time series. Furthermore, particle swarm optimization (PSO) is used to optimize the hyperparameters of the deep learning LSTM model to further improve the forecasting ability [21]. Wang et al. [22] combined the multilayer perception machine and neural network to construct the Elman recurrent neural network (ERNN) model to predict crude oil prices. Cen et al. [23] conducted research on WTI crude oil prices and Brent crude oil prices and then used the LSTM model to train the processed data with the original data. After comparing error values under different models, the LSTM error value was found to be lower. Wu et al. [24] proposed an ensemble empirical mode decomposition and long short-term memory (EEMD-LSTM) method to predict WTI crude oil prices. They extracted certain information from different decomposition results and regarded it as an input variable for training the LSTM model. Finally, compared to an extended extreme learning machine (EELM), an artificial neural networks (ANN) model, ARIMA model, and least squares support vector regression (LSSVR) model, etc., the EEMD-LSTM showed better performance than multiple methods.
In summary, the recurrent neural networks (RNN) and the LSTM model were applied to many fields and generated a better prediction. However, there are some shortcomings in machine learning, such as over-fitting and local optimal issues. In order to overcome these shortcomings, some scholars proposed a combined model prediction method.
Based on the characteristics of long memory, asymmetry, non-tailed distribution, nonlinearity, and non-stationarity of crude oil prices, Rennan et al. [25] proposed a new combined prediction model, namely, the mixed data sampling (MIDAS) model with highfrequency financial indicators to forecast the crude oil prices. By comparing to the random walk, autoregressive model (AR), ARIMA, the results of the MIDAS were the best. Tian et al. [26] took advantage of the autoregressive conditional heteroskedasticity model (ARCH) and Fourier neural network to predict crude oil prices, and the latter method was better. Zhu et al. [27] proposed a combined prediction method for non-stationary time series, namely, the ensemble empirical mode decomposition (EEMD) and the optimal combined forecast model (CFM). This method was superior to the benchmark model in certain predictive assessment indicators. Wang B and Wang J [28] proposed a new multicombination predictive neural network model based on a complex depth learning algorithm, which combined empirical wavelet transform, random inheritance formula error correction algorithm, in-depth two-way LSTM neural network, and Elman recursive neural network with a variable learning rate. The model had high prediction accuracy. Chai et al. [29] proposed a method of combined Bayesian networks (BNs) to predict shortterm crude oil prices, and the results indicated that the BN had the best results. After comparing the Markov chain Monte Carlo (MCMC), random forest (RF), support vector machine (SVM), neural network (NNET), and generalized autoregressive conditional heteroskedasticity (GARCH), Wang B and Wang J [30] proposed a new combined neural network, namely, a double parallel feedforward wavelet neural network with random time effective function (DPFWR), which is used for predicting WTI crude oil, Brent crude oil, natural gas, RBOB-gasoline, and heating oil prices. In addition, they established several error criteria to evaluate the prediction errors of the backpropagation (BP), double parallel feedforward neural network (DPF), LSTM, DPFWR, and Sarima models. The DPFWR model had better prediction performance compared to the other models. Amir et al. [31] combined a heterogeneous autoregressive realized volatility heterogeneous auto-regression achieved fluctuation (HAR-RV) model and Markov mechanism conversion (MRS) method to estimate and forecast the volatility of the Tokyo Commodity Exchange (TOCOM) energy futures contract. They found that the MRS-HAR-RV model reflected the dynamic characteristics of energy futures prices better than the alternative models.
The main purpose of this paper is to verify that recent crude oil prices have a larger impact than historical crude oil prices when forecasting crude oil prices and to optimize the prediction methods to accurately predict crude oil prices. This will provide a reference for investors to avoid market risks and will also provide a reference for crude oil import and export countries. Considering the strong nonlinearity and heavy instability of crude oil prices, the traditional econometrics model based on a linear hypothesis can hardly predict crude oil prices accurately. Although the machine learning model can solve the nonlinearity and instability of the crude oil prices, the machine learning model can easily fall into over-fitting and local optimal issues. Therefore, we will consider the combined method as the main method of crude oil price prediction.
Crude oil prices reflect recent events, i.e., recent events have a greater impact on crude oil prices than older events [22]. In view of this reality, we took the stochastic time effective function to give different weights to crude oil prices chronologically. Specifically, recent crude oil prices were given greater weight, and older crude oil prices were given smaller weight. Artificial neural networks (ANNs) are a class of typical intelligent learning paradigms widely applied to some practical application domains. In this paper, a standard three-layer feedforward neural network (FNN) [32,33], based on an error back-propagation algorithm, was selected for crude oil prices prediction. We combined the stochastic time effective function and FNN model to construct a novel model, namely, the WT-FNN model.
Firstly, we endowed crude oil prices with different weights depending on time. Secondly, we trained the data by the WT-FNN model and output the forecasting value of the WT-FNN. Finally, compared to the forecasting results from the benchmark model, we found that the WT-FNN model had a better prediction effect.
There are three main contributions of this paper: Firstly, we found that recent data on crude oil prices is more effective than long-term data; that is, recent events contain more useful information. Therefore, this paper provides the following insights on the forecasting of crude oil prices: in forecasting crude oil prices, the relevant energy departments of the state and government should focus on recent events and news rather than on long-term events. Scholars should also give recent data greater weight when they use models and data to predict crude oil prices. The government can make the most accurate forecasts of crude oil prices, thereby adjusting national strategies in a timely manner. Investors can also effectively avoid risks and obtain the best benefits. Secondly, from different horizon forecast results, it is known that the state and investors do not need a medium or long-term forecast but rather a short-term forecast so that the prediction results will be more accurate and obtain the greatest interest for them.
Finally, scholars should choose the appropriate number of data when they utilize models and data to predict crude oil prices. If the selected data are too low, much useful information is lost, and if the data are too high, the model prediction is affected.
This paper is structured as follows. In Section 2, we introduce Brent as the research object and describe the processing of data. In Section 3, we introduce the concept and training process of the WT-FNN model. In Section 4, we analyze the research results. In Section 5, we present robustness checks in five ways, and in Section 6, we provide our conclusions.

Data and Preprocessing
At present, there are four kinds of spot prices for crude oil in the world: (  Asia, especially Northeast Asia, China, South Korea, and Japan, is the largest crude oil import area in the world. Because of its geographical location, so far, crude oil in Northeast Asia is mainly imported from Russia and the Middle East.

Select Brent Spot Prices as Research Objects
Brent is a light low-sulfur crude oil produced in the Brent and Ni'an Oilfield in the North Sea and is widely traded in spot and futures markets. More than 65% of the spot crude oil in the world is priced by the Brent. Brent crude oil shipment is from Sullom Voe in the North Sea, and the main consumers are refineries in Northwest Europe and the US. WTI is representative of the crude oil futures market and does not have much share in the spot market; it has a strong regional market.
The data of the Brent crude oil prices used in this study are daily data and freely obtainable from the Energy Information Administration (EIA) website of the Department of Energy (DOE) of the USA (http://www.eia.doe.gov/ accessed on 14 November 2021).
For Brent crude oil prices, this paper selected the daily data from 4 January 2000 to 30 September 2021 as research objects, a total of 5525 observations. For the convenience of neural network model operations, we took the data from 1 January 2000 to 30 September 2014 as the in-sample (training periods) training set (3742 observations), and the data from 1 October 2014 to 30 September 2021 as the out-of-sample (testing period) testing set (1783 observations), following the common practice of sample splitting: two-thirds for training and one-third for testing. We utilized the data before September 2014 to estimate the model and then make the prediction from September 2014 to September 2021.

Normalize the Data
In order to reduce the impact of crude oil market noise and improve the predictive accuracy, we normalized the Brent crude oil prices. There are many normalization methods to improve the training of neural networks [33,34], which include "the normalized data in the range of [0, 1]" in the following equation adopted in this work: where the mean values are obtained on the training set during the training process. In order to obtain the true value after the forecasting, the output variables can be reverted as

WT-FNN (Weight-Feed-Forward Neural Network)
The artificial neural network (ANN) is a complex network system formed by a large number of simple processing units (called neurons) and reflects many basic characteristics of human brain function; it is a highly complex nonlinear dynamic learning system. The development of neural networks is related to robotics, artificial intelligence, information science, etc. It is an emerging cross-discipline, widely used in stock price forecasting, futures forecasting, and commodity forecasting, and has achieved better forecasting effects [35]. In this paper, a standard three-layer feedforward neural network (FNN) based on an error back-propagation algorithm combined with the stochastic time the effective function is used to predict crude oil prices.
Here, m is the number of neurons in the input layer, n is the number in the hidden layer, and the number in the output layers is only one, in which x it (i = 1, 2, ..., m) indicates the vector set in input layer at time t. x it = X it *weight, X it indicates the Brent crude oil prices, weight indicates the value of the stochastic time effective effect function at time t, Z ij (j = 1, 2, ..., n) indicates the output set in the hidden layer neuron at time t, and y t+1 indicates the output value of the network at time t + 1. At the same time, w ij denotes the weight from node i in the input layer to node j in the hidden layer and v j denotes the weight from node j in the hidden layer to the output layer. Figure 1 show the topology of the entire WT-FNN network.
The output of this hidden layer neuron is: The transfer function of the hidden layer is a Sigmoid function, and the specific form is as follows: The output function of the output layer is a purelin function, and its output layer is as follows: where f p (x) denotes the purelin function of the output layer.
The output of this hidden layer neuron is: The transfer function of the hidden layer is a Sigmoid function, and the specific form is as follows: The output function of the output layer is a purelin function, and its output layer is as follows: where ( ) p f x denotes the purelin function of the output layer.

Algorithms for WT-FNN Neural Networks
The parameters of the WT-FNN model are based on the error back-propagation algorithm, which is a modified learning algorithm based on the gradient descent method to minimize the global error (LMS). In this paper, the error of the output value is ε t =ŷ t − y t , and that of the sample n is where t is the sample n (n = 1, ..., N),ŷ t is the output value of the neural network at time t, and y t is the true value at moment t. The global error corresponding to the output layer of this network is as follows: The main goal of the learning algorithm is to minimize the error function E so that the minimum value ε is reached by repeating the learning process. In each training session, the output value is calculated, and the global error E is obtained. The gradient of the error function is given by: ∆E = ∂E ∂W . For the weight nodes in the input layer, the gradient formula for connection weight w ij is as follows: where η is the learning rate, and f G (net jt (k)) denotes partial derivatives of hidden layer transfer functions; thus, the update process of w ij and v j is as follows: The training aim of WT-FNN is to modify the weights to minimize the error between the network's prediction and the actual target. While training data, different weight matrices are revised by the corresponding rules until the optimal parameter is determined.
In Figure 2, the training algorithm procedures of the stochastic time effective neural network proceeded as follows:

Training and Forecasting of the WT-FNN Model
Crude oil prices were first trained by the WT-FNN model via a large number of repetitive trials, and then we utilized the trained model to predict crude oil prices. Since different numbers of nodes per layer can result in different predictive results, we needed Step 1: Normalized the Brent crude oil prices. For the WT-FNN model, this paper took the crude oil prices for the previous 4 days as the input layer neurons, and then the crude oil prices on the 5th day were used as the output layer neurons. We selected the daily closing price of Brent crude oil as a research object. The learning rate η was from 0 to 1; the maximum training iterations number k was 1000.
Step 2: Initialized connection weight w ij and v j to follow the uniform distribution on (−1,1) at the beginning of data processing.
Step 3: Introduced the stochastic time effective function ϕ(t) in the neural network. Firstly, the neuron data of the input layer were given different weights through the ϕ(t) function, and then we determined the transfer function from the input layer to the hidden layer and from the hidden layer to the output layer. Finally, we selected the drift function µ(t) and the volatility function σ(t).
Step 4: Established an error-acceptable model and set pre-set minimum error ε based on network training objective E = (1/N)∑ N n=1 E(t n ); if the E was below the pre-set minimum error, we went to Step 6; otherwise, we went to Step 5.
Step 5: Trained the WT-FNN and adjusted the connection weight. Calculated the integral of connection weight ∆w k ij and ∆v k+1 j , and added them with the initial weight, then obtained the weights from the layer to the previous layer, w k+1

Training and Forecasting of the WT-FNN Model
Crude oil prices were first trained by the WT-FNN model via a large number of repetitive trials, and then we utilized the trained model to predict crude oil prices. Since different numbers of nodes per layer can result in different predictive results, we needed to find the number of optimal nodes between each layer. It was known from the recursive neural network that the neurons of the input layer are two times the hidden layer [33]. Therefore, the number of the hidden layer neurons selected in the paper was 2. The maximum training iteration k was 1000, and the learning rate η was 0.05. The predefined minimum training threshold was ε = 10 −5 .
When we used the WT-FNN (i.e., FNN with a stochastic time effective function) model to predict the daily crude oil prices, ϕ(t n ) was the stochastic time effective function that endowed each historical data point with a weight depending on the time at which it occurred. ϕ(t n ) comprises µ(t) and σ(t), where µ(t) is the drift function, σ(t) is the volatility function, and B(t) is the standard Brownian motion. ϕ(t n ), µ(t), σ(t), and B(t) are defined as follows: where β(>0) is the time strength coefficient, t 0 is the time of the newest data in the data set, t n is an arbitrary time point in the data set, c is the parameter equal to the number of samples in the data set, and x is the mean of the sample data. The Figure 3 shows the value of ϕ(t n ): where β (>0) is the time strength coefficient, 0 t is the time of the newest data in the data set, n t is an arbitrary time point in the data set, c is the parameter equal to the number of samples in the data set, and x is the mean of the sample data. The Figure 3 shows the value of ( ) n t ϕ : The object of the present study is to develop a revised WT-FNN modeling framework for the multi-step-ahead forecasting of crude oil prices with various prediction horizons. By doing so, a daily series of Brent crude oil prices were employed for various prediction horizons H (H = {1,2,4,8}).

The Significance of the WT-FNN
Since crude oil prices have high nonlinear and strong volatility, traditional econometrics models are based on linear assumptions, and crude oil prices cannot be accurately predicted. Therefore, we introduced the FNN model. Since crude oil prices keep track of recent incidents, there is a shorter memory of long-term events, indicating that recent incidents have a larger impact on crude oil prices than long-term incidents. Therefore, in the prediction of crude oil prices, recent events were given a larger weight, and a smaller weight was given to long-term events. When the FNN model predicted The object of the present study is to develop a revised WT-FNN modeling framework for the multi-step-ahead forecasting of crude oil prices with various prediction horizons. By doing so, a daily series of Brent crude oil prices were employed for various prediction horizons H (H = {1,2,4,8}).

The Significance of the WT-FNN
Since crude oil prices have high nonlinear and strong volatility, traditional econometrics models are based on linear assumptions, and crude oil prices cannot be accurately predicted. Therefore, we introduced the FNN model. Since crude oil prices keep track of recent incidents, there is a shorter memory of long-term events, indicating that recent incidents have a larger impact on crude oil prices than long-term incidents. Therefore, in the prediction of crude oil prices, recent events were given a larger weight, and a smaller weight was given to long-term events. When the FNN model predicted crude oil prices, the same weight was given to all data. Therefore, we used the stochastic time effective function to assign the recent incidents greater weight and long-term incidents smaller weight, and we constructed a WT-FNN model from the FNN model. This overcame the problem with the traditional econometrics model, which could not solve the nonlinear forecast, and also overcame the problem with the FNN model, which could not distinguish data weights, making the forecast of crude oil prices more reasonable. The WT-FNN model provides a reference for crude oil import and export countries and guidance for investors to avoid risk acquisition [36].

The Benchmark Prediction Models
As was discussed in Section 1, the FNN and no-change models were used as the evaluation benchmarks in the paper.

Performance Measurement Criteria
This subsection compares the predictive effects of the WT-FNN model and several benchmark models. In order to analyze the predictive effects of the three models, we used the following four error measure criteria: MAPE (mean absolute percentage error) and MAE (mean absolute error), RMSPE (root mean square percentage error), and RMSE (root mean square error); the corresponding definitions are given as follows: whereŷ t and y t are the predictive value and the real value at time t, respectively. N is the total number of data, noting that the MAPE and RMSPE indicate the relative error between the real value and the predictive value. At the same time, the MAE and RMSE indicate an absolute error between the real value and the predictive value. The predictive performance will be better when the values of these evaluation criteria are smaller. Figure 4 display the results for the real value and the predictive value of the training set and test set generated by the WT-FNN model. As the prediction in Figure 4 shows, the curves of the predictive value and the real value are very approximating, which indicates that the predictive data of the WT-FNN model reflected the variation in crude oil prices.

Linear Regression between the Forecasting Value of WT-FNN and Real Value
The linear regression can be used to fit a predictive model to an observed data set Y and X. We set the predictive value of the WT-FNN model as y, the real value was x, and the linear equation was y = ax + b. Table 1 show the linear regression effect between the real value and the predictive value of the WT-FNN model, where a represents the regression coefficient, b represents the intercept, and R represents the fit between the y and x. As shown in Table 1, the predictive value of the WT-FNN model was very close to 1, which was significant at the 1% level, and R was 90% at most. This indicated that the predictive value of the WT-FNN model approximated the real value.  Table 2 show the predictive errors of the four horizons of the three models (WT-FNN, FNN, and no-change) (one-step, two-step, four-step, and eight-step). The following two conclusions were drawn from Table 2.  Figure 4 display the results for the real value and the predictive value of the training set and test set generated by the WT-FNN model. As the prediction in Figure 4 shows, the curves of the predictive value and the real value are very approximating, which indicates that the predictive data of the WT-FNN model reflected the variation in crude oil prices.  The linear regression can be used to fit a predictive model to an observed data set Y and X. We set the predictive value of the WT-FNN model as y, the real value was x, and the linear equation was y ax b = + . Table 1 show the linear regression effect between the real value and the predictive value of the WT-FNN model, where a represents the regression coefficient, b represents the intercept, and R represents the fit between the y and x. As shown in Table 1, the predictive value of the WT-FNN model was very close to 1, which was significant at the 1% level, and R was 90% at most. This indicated that the predictive value of the WT-FNN model approximated the real value.  1.

Linear Regression between the Forecasting Value of WT-FNN and Real Value
The predictive error of the WT-FNN model was minimal. As shown in Table 2, the WT-FNN had the best forecasting effect, with MAPEs of the one-step, two-step, four-step, and eight-step predictions, respectively, at 0.0191, 0.0279, 0.0404, and 0.0592, less than the 0.0193, 0.0280, 0.0407, and 0.0599 of the FNN model. The predictive effect of the no-change was the worst, with MAPEs of 0.7991, 0.7990, 0.8004, and 0.8021, much higher than the MAPEs of the WT-FNN and the FNN models. This indicated that it was reasonable to give greater weight to the latest information and lesser weight to older information in the WT-FNN model to improve the predictive effect of the neural networks since crude oil prices are greatly affected by short-term prices rather than long-term prices.

2.
The one-step predictive error was minimal compared to those of the other three horizons. Taking the WT-FNN model as an example, the MAPE of the one-step prediction was 0.0191, less than 0.0279 of the two-step prediction, 0.0404 of the four-step prediction, and 0.0592 of the eight-step prediction. The horizon predictive effects of the FNN model and no-change were the same as the WT-FNN model, indicating that the shorter the predictive horizon of the model, the better the predictive effect. The longer the predictive horizon, the worse the predictive effect.
It can be seen from the above results that the predictive error of the WT-FNN model was the smallest, and the predictive effect was the best. In addition, this also indicated that recent information was more effective in forecasting crude oil prices than old information after comparing the predictive errors of the four horizons of the three models. This indicated that the crude oil market underwent major changes, and the main reasons were the following:

1.
The "Black Swan" incident of crude oil prices in the second half of 2014 was caused by the increase in supply. Crude oil prices plummeted in the second half of 2014, falling from USD 95/barrel to USD 45/barrel, known as the "Black Swan" incident of crude oil prices. The plunge in crude oil prices was mainly due to the recovery of traditional crude oil export countries, such as Iraq and Libya, and the increase in crude oil production capacity. Saudi Arabia, Iran, Russia, and other main crude oil supply countries did not cut production capacity to beat the United States' shale oil revolution. Thus, the supply of crude oil increased, and crude oil prices continuously plummeted.

2.
OPEC failed to reach a cut-off agreement on the supply of crude oil, resulting in a decline in crude oil prices in the second half of 2015. Since OPEC failed to reach this cut-off agreement, crude oil prices plummeted from USD 63/barrel to USD 27.6/barrel in the second half of 2015, and the crude oil market was overflowing.

3.
In 2018, China-US trade warfare resulted in a slump in crude oil prices. Affected by the China-US trade warfare, the two largest world economies experienced severe friction, which caused a world economic slowdown and reduced the demand for crude oil. The price of crude oil fell from USD 85/barrel to USD 50/barrel until OPEC reached a new cut-off agreement to terminate this plunge.

4.
The COVID-19 pandemic in 2020 caused crude oil prices to plummet again. In 2020 COVID-19 reduced global air transport by 86%, rail transport by 70%, crude oil demand was greatly cut down, and crude oil prices continued to fall steeply in price, once falling to negative values. When crude oil prices fluctuated this dramatically, the error between the real value and the predictive value of the three models was large. However, the predictive effect of the WT-FNN model was still the best, which indicated that the WT-FNN model could better reflect the major crude oil market when crude oil prices fluctuated dramatically.
5, the predictive value of the WT-FNN model was closer to the real value than the predictive values of other models; in other words, the WT-FNN model had the best predictive effect, and the FNN model outperformed the common no-change model. At the same time, the predictive values of WT-FNN and FNN were better fitted with the real value; however, in the second half of 2014, the second half of 2015 to the first half of 2018, early 2018, and the first half of 2020, crude oil prices fluctuated heavily, and the predictive values of the three models (WT-FNN, FNN, and no-change) also varied sharply from the true value. This indicated that the crude oil market underwent major changes, and the main reasons were the following:

The Different Predictive Horizons
When we used the one-step, two-step, four-step, and eight-step horizons to predict crude oil prices, the three models accurately predicted prices and reflected the diversification in the crude oil market in a timely manner. Of the three models, the predictive effect of WT-FNN was best, especially during the severe fluctuation in crude oil prices. In order to detect whether the predictive effects of the three models were stable, we adjusted the predictive length of the three models to three-step, five-step, six-step, and seven-step horizons. The result was as follows.

1.
The predictive error of the WT-FNN model was in the least of the three models (WT-FNN, FNN, and no-change). As seen in Table 3, the MAPEs of the three-step, five-step, six-step, and seven-step forecasting horizons for the WT-FNN model were 0.0345, 0.0457, 0.0503, and 0.0552, less than the 0.0353, 0.0458, 0.0505, and 0.0556 of the FNN model, and also less than the 0.7999, 0.8008, 0.8012, and 0.8016 of the no-change model. The MAE, RMSPE, and RMSE were the same as the MAPE. Therefore, regardless of the predictive horizon of the three models, the predictive effects of the WT-FNN model were all the best. This stochastic time effective function gave the more recent information greater weight and older information lesser weight, which was conducive to improving the predictive effect of the FNN model, making the model more scientific and reasonable.

2.
The longer the predictive horizon, the greater the predictive error. From Table 3, the MAPE, MAE, RMSPE, and RMSE of the three-step horizon in the WT-FNN model were 0.0345, 1.7212, 0.0600, and 2.2987, less than the 0.0457, 2.2409, 0.0798, and 2.9925 of the five-step horizon, respectively, and also less than the 0.0503, 2.4689, 0.08555, and 3.2881 of the six-step. The respective values of the seven-step horizon were 0.0552, 2.7052, 0.0974, and 3.6236, the largest of the four predictive horizons. The FNN and no-change models were the same as the WT-FNN model; specifically, the three-step predictive error was the smallest of the three models, and the seven-step predictive error was the largest. This indicated that the shorter the predictive horizons, the better the predictive effect.

Alternative Proxies of Crude Oil Prices
In this subsection, we further consider another proxy variable of crude oil prices, namely, the WTI crude oil prices. Here, the Brent crude oil prices were replaced by WTI crude oil prices. We also selected the daily data for the WTI from 4 January 2000 to 30 October 2021 as the objects, with a total of 5459 observations. Similarly, we took the data from 1 January 2000 to 30 September 2014 as the in-sample (training period) training set (3702 observations) and from 1 October 2014 to 30 September 2021 as the out-of-sample (testing period) testing set (1757 observations), following the common practice of sample splitting into two-thirds for training and one-third for testing. As shown in the Table 4, when we took WTI as the research object, we arrived at the same conclusion as with Brent; that is, the prediction error of the WT-FNN model was the smallest.
In addition, the predictive error increased with the increase in the prediction length. This indicated that the recent price had a greater impact on the prediction of crude oil prices, and the long-term price had less effect. The stochastic time effective function assigned crude oil prices different weights according to the time to improve their predictive effect, which improved the prediction of crude oil prices.
As shown in Figure 6, the part predictive values of the three models were still good for the WTI. In the second half of 2014, from the second half of 2015 to the first half of 2018, in early 2018, and in the first half of 2020, crude oil prices dramatically fluctuated, and the predictive values of the three models also varied sharply, which was consistent with Brent crude oil prices. In addition, the predictive error increased with the increase in the prediction length. This indicated that the recent price had a greater impact on the prediction of crude oil prices, and the long-term price had less effect. The stochastic time effective function assigned crude oil prices different weights according to the time to improve their predictive effect, which improved the prediction of crude oil prices.
As shown in Figure 6, the part predictive values of the three models were still good for the WTI. In the second half of 2014, from the second half of 2015 to the first half of 2018, in early 2018, and in the first half of 2020, crude oil prices dramatically fluctuated, and the predictive values of the three models also varied sharply, which was consistent with Brent crude oil prices. (c) (d) Figure 6. Comparisons of the part predictive data and the actual WTI data for the three models. (a) One-step; (b) two-step; (c) four-step; (d) eight-step. Figure 6. Comparisons of the part predictive data and the actual WTI data for the three models.

Different Neurons
In this paper, we used the previous 4 days' crude oil prices to predict crude oil prices on the 5th day; therefore, the number of input layer neurons was four. According to [36,37], when the number of hidden layer neurons is half the number of input layer neurons, the predictive effect is best. Therefore, we determined that the number of input layer neurons was four, the hidden layer was two, and the output layer was one; that is, crude oil prices on the fifth day were predicted by the crude oil prices of the previous 4 days.
In order to verify the stability of the WT-FNN model, we used the previous 9 days' crude oil prices to predict the 10th day's crude oil prices; that is, the number of input layer neurons of the WT-FNN model was nine, the number of hidden layer neurons was four, and the number of output layer neurons was one. At the same time, the same stochastic time effective function was applied to predict the crude oil prices. In Figure 7, the topology map is displayed:

Different Neurons
In this paper, we used the previous 4 days' crude oil prices to predict crude oil prices on the 5th day; therefore, the number of input layer neurons was four. According to [36,37], when the number of hidden layer neurons is half the number of input layer neurons, the predictive effect is best. Therefore, we determined that the number of input layer neurons was four, the hidden layer was two, and the output layer was one; that is, crude oil prices on the fifth day were predicted by the crude oil prices of the previous 4 days.
In order to verify the stability of the WT-FNN model, we used the previous 9 days' crude oil prices to predict the 10th day's crude oil prices; that is, the number of input layer neurons of the WT-FNN model was nine, the number of hidden layer neurons was four, and the number of output layer neurons was one. At the same time, the same stochastic time effective function was applied to predict the crude oil prices. In Figure 7, the topology map is displayed: As seen in Table 5, when the number of input layer neurons was nine, the predictive errors of the one-step, two-step, four-step, and eight-step horizons of the WT-FNN model in the three models (WT-FNN, FNN, No-change) were the smallest, and the forecasting effect was also the best. Of the one-step, two-step, four-step, and eight-step predictions, the one-step prediction was the best, followed by the two-step prediction, the four-step prediction, and the last was the eight-step prediction. This indicated that the stochastic time effect function did not fail owing to the adjustment of the neurons, and As seen in Table 5, when the number of input layer neurons was nine, the predictive errors of the one-step, two-step, four-step, and eight-step horizons of the WT-FNN model in the three models (WT-FNN, FNN, No-change) were the smallest, and the forecasting effect was also the best. Of the one-step, two-step, four-step, and eight-step predictions, the one-step prediction was the best, followed by the two-step prediction, the four-step prediction, and the last was the eight-step prediction. This indicated that the stochastic time effect function did not fail owing to the adjustment of the neurons, and the prediction of crude oil prices significantly improved when recent information was given greater weight and long-term information smaller weight. However, the predictive effect of the previous 9 days remained different from that of the previous 4 days. Compared to nine neurons in the input layer, the predictive effect of four neurons was better. In the neural network with four input layer neurons, the predictive errors of the four horizons (one-step, two-step, four-step, and eight-step) of the three models (WT-FNN, FNN, and no-change) were less than those of the neural network with nine input layer neurons. Taking the WT-FNN model as an example, the MAPEs of the one-step, two-step, four-step, and eight-step horizons in the neural network with nine input layer neurons were 0.0196, 0.0280, 0.0406, and 0.0595, respectively, which were greater than the MAPEs of the neural network with four input layer neurons, specifically, 0.0191, 0.0279, 0.0404, and 0.0592, and the FNN model was also the same as WT-FNN. This showed that only the appropriate number of historical values could accurately predict crude oil prices.

Different Forecasting Window Sizes
Rossi and Inoue (2012) argued that the arbitrary choices of different window sizes might lead to quite different out-of-sample results in practice, and the forecasting window size thus plays a crucial role in an out-of-sample evaluation.
Inspired by this idea, this paper considered Brent crude oil prices from 30 September 2009 to 30 September 2021 as the research object, a total of 3038 observations. The training set was from 30 September 2009 to 30 September 2017, a total of 2022 observations, and the test set was from 1 October 2017 to 30 September 2021, with a total of 1016 data, following the common practice of sample splitting: two-thirds for training and one-third for testing.
As shown in Table 6, the prediction error of WT-FNN was still the smallest, followed by the FNN model and finally, the no-change model. At the same time, the predictive error for the one-step prediction was still the smallest, followed by the two-step, four-step, and finally, eight-step predictions. This indicated that the predictive effect of WT-FNN was the best regardless of the data in arbitrary time periods and that the stochastic time effective function can improve the predictive effect of crude oil prices.

Alternative Choices of Benchmark Forecast
In order to re-test the forecast results of the WT-FNN model, the linear regression model is another popular benchmark model (Table 7). Table 7 indicate the predictive results when the linear regression model was the benchmark model. As seen in Table 7, in the four predictive horizons of the three models, the predictive error of the WT-FNN model was minimal, indicating that the predictive effect of the WT-FNN model remained the best when the benchmark model changed. WT-FNN can accurately predict crude oil prices.

Discussion of the Results and Conclusions
In this paper, to verify that recent data contained more predictive information than long-term data, we introduced the stochastic time effective function to assign the recent data greater weight. Because of the linear hypothesis of the traditional econometrics model, it was impossible to accurately predict a dramatic nonlinear sequence, so we introduced the FNN model. We finally combined the stochastic time effective function and the FNN model to construct the WT-FNN model to predict crude oil prices. The WT-FNN model solved the problem of the FNN model's inability to distinguish data weights and the econometrics model's inability to solve nonlinear forecasts, and it finally achieved better predictive results. This result passed a robustness check.
The research results presented in this paper also contribute to the work of policymakers [37] because the WT-FNN model results indicated that recent data contained more useful information than historic data for crude oil price prediction. Therefore, policy makers should not focus on similar events in history when forecasting crude oil prices but should pay more attention to recent events and assess their influence on crude oil prices to predict crude oil prices more accurately. If the expected crude oil prices increase, crude oil export countries should increase their export of crude oil and increase fiscal revenue. Crude oil import countries should reduce their crude oil imports and encourage the development of new energy to reduce fiscal deficits [38][39][40]. If the expected crude oil prices decline, crude oil export countries should reduce crude oil exports, implement a tightened fiscal policy, and reduce financial expenditures. Crude oil import countries should increase crude oil imports to increase their reserves.
Since the WT-FNN model can more accurately predict crude oil prices, investors can take advantage of the model to avoid market risks and gain more benefits. When the WT-FNN model predicts that crude oil prices will rise, investors can empty crude oil futures and avoid risks in the financial futures market. When the WT-FNN model predicts that crude oil prices will drop, investors can buy more crude oil to gain more benefits.
Our study determined that the predictive accuracy of crude oil prices was opposite to the prediction length in Section 4.2, Comparisons of different models, and Section 5.1, The Different predictive horizons [41]. As seen earlier, in the four predictive horizons of the three models, the one-step prediction error was the least, followed by the two-step prediction, the four-step prediction, and finally, the eight-step prediction, which indicated that the longer the predictive horizon, the larger the predictive error. The three-step, five-step, six-step, and seven-step predictions also followed the same order. This indicated that the short-term prediction was more accurate than the long-term prediction [42]. This suggests that policymakers should undertake short-term predictions as often as possible and formulate short-term policies, such as gasoline subsidies, etc., according to forecast results. Investors should also make short-term investments in crude oil futures in the financial market to avoid medium and long-term investments [43].
In the second halves of 2014, 2016, 2018, and 2020, crude oil prices violently fluctuated, and the predictive effects of the FNN, no-change, and WT-FNN models were not accurate; the discrepancies between the predicted value and the real value were very large. This is because incidents that trigger crude oil price fluctuations are sudden, causing them to fluctuate sharply, and the change law is difficult to capture. Therefore, these models cannot accurately predict the prices. However, compared to the FNN and the No-change models, the forecast effect of the WT-FNN model was better because that model kept track of recent events, which better reflects the influence of recent events when predicting crude oil prices. Therefore, when an upheaval occurs, the WT-FNN model can reflect it in time and more accurately predict crude oil prices, which gives policymakers and investors more insight. When there is an upheaval, the model should focus on its impact on crude oil prices rather than considering similar historical events.
Compared to previous articles, this article provides new tools for scholars to predict crude oil prices. Previous scholars did not consider the weight of the historical value when they used model and crude oil price history values to predict crude oil prices, and this Energies 2022, 15, 1955 20 of 21 paper gave different weights to different historical values through the stochastic time effective function and achieved better forecasting effects. Scholars can learn from these methods when predicting crude oil prices, giving the data different weights depending on the time and thereby optimizing predictive models to make more accurate forecasts of crude oil prices [44,45].
This can also be seen in Section 5.3, Different neurons. More historical data do not have better predictive effects, but although recent data are important, if only recent data are used, a lot of useful information will be lost. If too much historical data are used, there will be many meaningless information interference model forecasts [46]. Therefore, scholars must choose the appropriate number of data when predicting crude oil prices [47].
In summary, the WT-FNN model optimizes the FNN model by considering recent data, and it achieved good forecasting effects. This model will provide a basis for policymakers, a reference for investors in financial markets, and new ideas for scholars to optimize models to more accurately predict the price of crude oil.
Author Contributions: D.W. contributed to data analysis, T.F. contributed to data analysis and writing the manuscript. All authors have read and agreed to the published version of the manuscript.