Oil Forecasting Using Artificial Intelligence

The motivation for this research paper is the application of two novel models in the prediction of crude oil index. The first model is a generic deep belief network and the second model is an adaptive neural fuzzy inference system. Furthermore we have to emphasize on the second contribution in this paper which is the use of an extensive number of inputs including mixed and autoregressive inputs. Both proposed methodologies have been used in the past in different problems such as face recognition, prediction of chromosome ano-malies etch, providing higher outputs than usual. For comparison purposes, the forecasting statistical and empirical accuracy of models is benchmarked with traditional strategies such as a naïve strategy, a moving average convergence divergence model and an autoregressive moving average model. As it turns out, the proposed novel techniques produce higher statistical and empirical results outperforming the other linear models. Concluding first time such research work brings such outstanding outputs in terms of forecasting oil markets.


Introduction
Numerous studies have documented that forecasting oil is not an easy task. Researchers have used a massive amount of linear and nonlinear models to capture the correct direction of oil contracts but this seems to hide an error which is quite high. Most probably this is coming from the market volatility or from non-linearity that models cannot catch. For overpassing the previous obstacles we decide to take in consideration two hi-tech tools named Deep Beliefs networks and adaptive neural fuzzy inference system in terms of forecasting crude oil closing prices. From literature aspect these models are giving better forecast accuracy and at the same time are easier and extremely fast to process. Karatha-DOI: 10.4236/tel.2019.97144 2284 Theoretical Economics Letters nasopoulos, [1] was the first that used this method in terms of forecasting the crack spread. He was convinced that this new methodology is promising and outperforms all the traditional linear and non-linear models. Theoretical Basis: Deep Belief Networks and adaptive Neurofuzzy Inference system.
Deep belief networks, (DBNs) have been presented for the first time by Hinton et al. [2]. The DBN model is based on multiple layers. The bottom layer is observable, while the remaining hidden layers are formed by stacking many restricted Boltzmann machines (RBMs), introduced by Ackley et al. [3] and Hinton and Sejnowski [4], on the top of each other. When the system is fed with a large quantity of data, it is first processed through the visible layer units, and, subsequently, the hidden layers help to detect data features according to the connection weights. Importantly, there are no connections between the units of a single layer-all the connections of the RBM's units are restricted to different layers. The procedures for data are the same for all the RBMs, constructing the DBN. Both DBNs and RBMs have been frequently employed as a forecasting tool in time-series analysis (Chao et al. [5], Fagiani et al. [6], He [7], Hinton and Salakhutdinov [8], Kang and Choi [9], Kuremoto et al. [10], Shen et al. [11], and Karathanasopoulos and Osman [12]). To sum up, as far as we are concerned, this is the first study to utilize the DBNs for oil market predictions From the other side ANFIS was first introduced from Jang [13]. ANFIS is putting together the advantages of neural networks (NN) and Fuzzy Inference Systems (FIS) in terms of improving the accuracy of forecasts. ANFIS has the capability of learning fast, the capability of seizing the nonlinear structure and the capability of adaptation, making itself easy to use. The ANFIS has been successfully implemented to a broad range of problems in a variety of fields including economics [14], energy [15], health [16] and the environment [17] for different purposes including diagnosis [18], evaluation [19], prediction [20], and forecasting [21].

Data Analysis for Dubai Crude Oil
We start our forecast research analysis on crude oil by downloading 18 years daily closing prices data from Thomson Reuter's database. Moreover by using the log return equation we convert our data to daily returns. Instead of being confident with our data we are checking for stationarity. The stationarity test used this time is the Augmented Dickey-Fuller (ADF) test. The output proves that daily oil prices are stationary and indicates that further analysis can be done.
In the next step we divide the data through optimizing the dataset in the below segmentation (Table 1).

Models in Study
By using the below models we can compare their predictive ability and their statistical accuracy.
Naive strategy. The simplest strategy assumes that the return on day t + 1 is equal to the return on day t: (yesterday closing price is the today forecast) where t Y is the actual return on day t, and 1t Y + denotes the predicted return for day t + 1.
Moving Average Convergence Divergence (MACD). The MADC model reports that the return on day t + 1 equals the average return through a certain trailing window: where t M represents is the moving average on day t, and n denotes the length of the moving average window (the number of days).
Autoregressive moving average models (ARMA). The ARMA model predicts returns based on their previous values Koreisha and Fang, (the autoregressive part) and on their residuals (the moving average parts). The ARMA model can take the below form: where t Y is the return on day t and

Deep Beliefs Networks
Karathanasopoulos and Osman [12] have used the Deep Belief Network with the below description to forecast successfully the Dubai financial market. Deep belief network is a very new probabilistic feed-forward forecasting tool with input layer, hidden and output layer (see Figure 1).
Karathanasopoulos and Osman [12] mentioned that the basic idea behind this new model is the use of a layer-by-layer unsupervised learning method in order to pre-train the initial values of the weights in the neural network. A layer-by-layer unsupervised training procedure implies that each layer captures the features of the previous one, and transferring them to next one. In this research paper each pair of layers is pre-trained by using the restricted Boltzmann machines. Restricted Boltzmann machines are composed from 2 different layers connected together. One layer has visible nodes/neurons and the other hidden nodes/neurons (see Figure 2).   other layers. All these connections are symmetric and bidirectional. As Karathanasopoulos and Osman [12] mentioned, that restricted Boltzmann machines can be used in numerous tasks but in forecasting experiments are providing the learning training for the structure of the deep belief network. In few words restricted Boltzmann machines are a special type of generative energy based models that can learn a probability distribution over its set of inputs. Except from that the standard type of restricted Boltzmann machine has binary valued hidden and visible nodes.

Neural Fuzzy Inference System
The Adaptive neural fuzzy inference system ANFIS is a very common and widely used artificial intelligence technique in literature. This method covers advantages of Fuzzy Logic and Artificial Neural Networks in the same structure.
Although Neural Networks have powerful learning ability, Fuzzy structures have strong inference systems and no learning ability. In contrary, ANFIS combines these both desirable characteristics in the same topology. ANFIS was presented by R. Yang in 1993 [22]. From the three type of ANFIS structure we chose the Sugeno ANFIS structure which is explained in the next five stages.  (Table 2).

Trading Signals and Strategy
The trading strategy we follow is based on the directional price of the forecasts, Karathanasopoulos et al. [24] and Karathanasopoulos [25] [26]. We hypothetically assuming a long (buy) or short (sell) position in the crude oil if the given models predict positive or negative return for the next day. Further to that, when the forecast indicates consecutive positive or negative price changes, the short/long positions, are maintained, focusing on the decrease of the trading costs. (Table 3 & Table 4)

Concluding Remarks
In this research paper, we propose a deep belief network and an adaptive neural fuzzy inference system for forecasting the Crude oil closing prices. More specifically we have used these novel methodologies for the first time in terms of forecasting one day ahead of the crude oil prices. In terms of feeding both networks we have used a pool of 5000 most correlated indices to the main oil index. In terms of benchmarking our forecasted returns we use three linear models such as naïve strategy MACD and ARMA model. Furthermore, evaluating the forecast with statistical and empirical measures we came to the conclusion that both new models outperform significantly all the other models and give promising results for further use in financial forecasting.