Prediction prices of basrah light oil using artificial neural networks

The global economy is assured to be very sensitive to the volatility of the oil market. The beneficial from oil prices collapse are both consumers and developed countries. Iraq economy is a one-sided economy which is completely depends on oil revenue to charge the economic activity. Hence, the current decline in oil prices will produce serious concerns. Some factors stopped most investment projects, rationalize the recurrent outflow, and decrease the development of economic activity. The study of forecast oil prices is considered among the most complex studies because of the different dynamic variables that affects the strategic goods. Moreover, the laws of economics controlling the prices of oil such as the supply and demand law. Some other variables that control the oil prices are the political conditions when these conditions contribute to the world production. The subject of forecasting has been extremely developing during recent years and some modern methods have been appeared in this regards, for example, Artificial Neural Networks. In this study, an artificial neural network (FFNN) is adopted to extract the complex relationships among divergent parameters that have the abilities to predict oil prices serving as an inputs to the network data collected in this research represent monthly time series data are Oil prices series in (US dollars) over a period of 11 years (2008–2018) in Iraq


INTRODUCTION
Iraq is exceptionally rich in oil but its economy suffers from severe structural failure. Iraq's oil reserves constant which amounted to about 107.313 billion barrels in 2018 are among the highest globally [1], In light of the existence of a financial economic crisis, the oil prices were severely affected by it, and although Iraq was not greatly affected by the crisis at its beginning as a result of the huge reserves of hard currencies that it achieved in the past years, specifically by selling oil during the great rise witnessed in these prices last period except it has been affected by the crisis, and oil prices have deteriorated recently and have become unstableMany economic analysts have confirmed that Iraqi oil sales will be affected by the global financial crisis strong until the crisis ends so the research aims to predict oil prices for the coming year and measure the extent of change in the coming period, Forecasting is one of the topics that are of great importance. Through forecasting, decision-makers can make the right decisions, [2].
Different influencing factors effect crude oil price changes. Complex dynamic interactions are among the factors that change crude oil prices and are one of the generality motivate and intriguing issues to be analyzed economically and financially through characterization and forecast characteristics. Recently, many experimental studies have shown the nonlinear nature of economic and pecuniary data, and it has been shown that conventional methods such as linear guessing methods cannot resolve the complex nonlinear dynamics concerned [3]. To predict oil price, there are three basic methods [4,5]; the first one is based on the idea of optimal exploitation of resources, for example, Kurz [6] studied the petroleum prices from the "perspective of classical energy consumption". The second one, Robert [7] is studed the time series analysis method, Salah and Hamid [8] used the time series to analyze petroleum prices. While the third one is based on Ulph [9] through the exploration of exhaustible resources, that is, starting from the petroleum market structure. Wang et al [10] offered a crossbred methodology to predicate crude oil monthly prices. The paradigm consists of three groups discrete ingredients, Web mining from the authors debrief the rule-based system, aside from ANN, and ARIMA models. The three ingredients work disassembled and then intergraded with each other to get the results. In a related study, Lee and Teng [11] proposed that the RFNNs have the same advantages as RNNs and expanded the application field of the FNNs to temporal problems.Wang [12] used the recurrent neural network (RNN) to predicat the crude oil pointers. Chiroma et al [13] suggested a genetic algorithm enhanced neural network model to predicate the crude oil price inconstancy. They indicated this evolutional neural network model brings statistically important performance amelioration. Chiroma et al [14] provided a wipe inclusive on the AI and ML-based crude oil predicating models. Brooks et al [15] deliberate the lead-lag relation on high-waver data 10 min,for FTSE index. The authors proposed the lead-lag 4 relations could only contract for no more than 30 minutes, and their results proposed variable in futures prices may help to predicat the changes in the instant price.From previous studies, we find that the neural networks are better for predicting oil prices for the purpose of grasping efficiently and accurately the tendency and regularity of oil price change and in view of the influencing factors of petroleum price, the artificial neural network is commonly used to solve complex nonlinear problems [16].
We propose a neural model in which ANNs have been extensively applied for many assignments, like non-linear control, sample classification, assignment approximation, time series forecasts, and effort or costs forecasts [17,18]. FFNNs are the simplest and first kind of ANNs. In FFNNs, the data always takes just a single direction, from the inputs nodes, during hidden nodes then to the outputs nodes and no loop in those networks. These networks employ a lot of neurons (node) and have no feedback path within. They are vastly used NNs, practically in systems and control. Multilayer NNs have input-layer, hidden-layers, and finally, output-layer, "no interconnections between nodes at same layers" as shown in Figure 1 [19], they are called (hidden) because of the internality to the network and present between network layers, input, and output layer [20]. Training Algorithm of FFNN error-training algorithm feedback is a learning-control algorithm of ANNs, it calculates the gradation of the error function pertains the weights of the neural network. However, it`s considered as a popularization of delta rule of the perceptron to a multi-layer FFNNs [21]. ANNs with recurrent connections are called recurrent neural networks (RNNs), which enable modeling consecutive data for consecute and forecasts [22]. Recurrent neural networks (RNNs) were developed originally by Hopfield in a single-layer form; and after a while, these networks were developed applying a multilayer perceptron involved connected input-output, processing, and output layers [23,24]. Having an importance over standard FFNN, RNN can transact with sequential input data, using their internal memory to process sequences of inputs and use the formerly stored information to assist in making future forcasting. This is done by feedback connections or by loops exist between neurons, which authorize them to be more complex data forecasts [25,26]. The network structure is in some way similar to the multilayer perceptron, with some discrepancies that permit connection happens through hidden units that are associated with delays in time. These models can save information of past times through such this connection. It is NNs continuously operate depending on time. RNNs accept input vectors at every time step, also update its hidden states with non-linear activation functions, and after that uses it to make imagination and forcasts for its outputs through making the output value feebdback to input layer as a new input in the input layer or the hidden layer  [27,28]. Recurrent neural networks (RNNs) have been proven as an active tool to paradigm timing -dependency in diffrent applications.
In this work, we offer a RNN model for the crude oil price, FFNN also provides "the flexibility and complexity to come close to non-linear functions to any preferred accuracy by changing number of layers and hidden neurons of each respective layer". FFNN is adopted to upgrade a model for the proposed method RFFNN recurrently to forcecast oil value. The focus of this paper is to apply neural networks to predicate crude oil future prices. The objectives: predicate crude oil future prices applying RFNNs, and find how training time can affect on accuracy of predicate. The RFFNN is better from normal FFNN to FFNN in a recurrent mode to give the network capability to make predication for the future not only the predicate of the current time. The paper is arranged as follows. Two kinds of artificial neural networks are described in Section 1. Section 2 The execution of the proposed learning algorithms is tested by the computer simulation software and predicate results are detailed in Section 3. The conclusion is presented in Section 4.

RESEARCH METHOD 2.1. Experimental data
The inputs of the RFFNN proposed must be selected depending on which input data affects the predication. Data collected in this research represent time series data monthly which are oil prices series in (US dollars) during the period starting from January 1, 2008 to April 30, 2018 in Iraq [29,30]. As shown in Table 1.

Suggested model
The idea for designing the recurrent feed-forward neural network (RFFNN) is to predict oil prices. RFFNN includes 12 nodes in the input layer making the first stage, 6 hidden-layer nodes specific by experiment and error for stability, 1 node in the output layer. The method RFFNN proposed recurrently uses FFNN for predicting oil prices. RFFNN is shown in Figure 2.
-The inputs (M1, M2, M3…, M12) of the suggest RFFNN must be selected dependent on which parameters are affecting on prediction, the parameters that were used in this proposed method are 12 parameters data on a monthly basis which are oil prices series during the period starting from January 1, 2008 to April 30, 2018 in Iraq. -R1…RN, represents network outputs that are reused as inputs to the network.
-The data entered were randomly divided into three groups: training group, examination group and test group, 70% for the training group and 15% for the verification and testing groups -The training was chosen as Representative of the reverse training algorithm Backpropagation.
The learning rate is 0.01 and training them, are the most widely used and used in network training FFNN because they have a high speed of reaching the best solution.

Working method
In this paper, the network works in the following way, the training algorithms and the suggested RFFNN test are designed with C programming language Uses a backpropagation learning algorithm. suggested RFFNN trains on 20 various modes. Training patterns Contains input as 12 , 13 ... and 16 parameters and output is required to estimate oil prices in the training phase, 0.9 workers are training. A 0.6 homogenization factor is used which is selected by experiment and wrong to give better convergence and fewer epochs.
The following weighted-average equations -used to compute the required output: = where, PS: number of parameters in each class. S: number of scales that the parameters PSUM: summation of all scales in each class. W: class weight. E: computed prediction where, PER: the ratio of every class where, the first class is 70% ,the second class is 15% and third class is 20%. The flowchart of the proposed RFFNN illustrated in Figure 3. The flowchart of the proposed RFFNN illustrated in Figure 3.

SIMULATION RESULTS AND DISCUSSIONS
To demonstrate the performance of the proposed RFFNN scheme as shown in Figure 3, designed using C++ programming language and backpropagation learning algorithm is used.Points can be clarified phase means one training course.
-Training phase 1, which is 80.20, is stored in the matrix and becomes Additional inputs for the training phase 2. The output at stages N-1, N-2, ... and 1 of the proposed RFFNN that works in a recurrent fashion are entered as inputs of stage N. Recurrent parameters are influenced to train the network for forecasting of the oil price. Table 2 and Figure 4 show the results of RFFNN of the forecast monthly oil price of Basrah city for (2019). Table 3 shows the evaluated RFFNN, using the following equations, where the results of the error using the magnitude of relative error (MRE) and the mean magnitude of relative error (MMRE) equations are very small values, which are close to zero.
MRE is a criterion that is used to evaluate the predicted oil price. The MRE obtained as [31]: where, X1: is the actual predicted. Predicted: is the predicted oil price. The Mean Magnitude of Relative Error: MMRE is obtained from the summation of MRE over N observations [32].
where, N: is the number of projects for which is predicted where the results of the error equation are a very small value.

CONCLUSION
The oil sector is the main source for the supply of foreign currency needed by Iraq in the development plan and to cover its needs of imported goods and the need of commodity sectors of raw materials and the rest of supplies to sustain the national production, and from this point of view we have to build a neural network that has the capability to predict the future oil prices for Iraq. In this research neural network approach has shown a strong predictive capability, to give the network ability of prediction of future not only the prediction of the current time. The methods for oil price prediction by implementing FFNNs and during it find the better parataxis between required and current outputs are gained. the RFFNN is improved from normally, FFNN to FFNN in a recurrent style prediction process that has a considerable function in the execution of Oil price predicate, affected by execution time, data size, debugging capability. They are influenced relatively where the RFFNN is used for oil price forecasting In the suggested RFFNN, it is perceived that the forecasting of future oil price prediction depended on analogous oil price predictions in previously mentioned stages.RFFNN using the rubrice of time series to make forecasting the output of time (t) returns as input in time (t-1). This used for improve the FFNN to FFNN in a recurrent modality.crude oil market is the most volatile commodities market. Therefore, the predicted oil price using nonlinear models is a right option. As future work, another kind of smart procedure can be used with neural networks and reinforce such as crossbred systems like "Neuro-Fuzzy system" and as well as RFFNN can be optimize design by using genetic algorithms.