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. Karathanasopoulos,  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.  . 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.  and Hinton and Sejnowski  , 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.  , Fagiani et al.  , He  , Hinton and Salakhutdinov  , Kang and Choi  , Kuremoto et al.  , Shen et al.  , and Karathanasopoulos and Osman  ). 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  . 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  , energy  , health  and the environment  for different purposes including diagnosis  , evaluation  , prediction  , and forecasting  .
2. 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).
Table 1. Total dataset divided in training and validation periods.
3. 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 is the actual return on day t, and 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 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 is the return on day t and , , and are the lagged returns, , , , and denote the regression coefficients, indicates the residual term and , , and are its lagged values. Finally, , , and denotes the weights.
4. Deep Beliefs Networks
Karathanasopoulos and Osman  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  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).
The nodes on each layer have no connections between them only with units of
Figure 1. Deep belief network structure.
Figure 2. Restricted Boltzmann machine structure.
other layers. All these connections are symmetric and bidirectional. As Karathanasopoulos and Osman  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.
5. 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  . From the three type of ANFIS structure we chose the Sugeno ANFIS structure which is explained in the next five stages.
Stage 1: This layer can be called as fuzzification layer. In this stage the parameters are called premise parameters and can be re-arranged according to the output error in every loop. These parameters are the input parameters which show the membership grades on the fuzzy.
Stage 2: In the second stage is computed the fixed node which is the output of all the incoming signals. Every output of the second stage can affect the triggering level of rules in the next stage. The trigger level is called the firing strength of the fuzzy system.
Stage 3: In the third stage we have the layer which is called normalization layer. For this layer, all firing strengths are re-arranged again by considering their own weights.
Stage 4: In the fourth stage the Defuzzication layer reports the preliminary calculation of the output, this layer has adaptive nodes and is expressed in functions. Because are ANFIS model is Sugeno type if then calculation turns to linear approach  .
Stage 5: In the last stage we have the Summation neuro which is a fixed node that computes the overall output of all the incoming signals. ANFIS has Backwards and forward Learning Ability in one loop. This correction is processed though Least square estimator which arranges the parameters and minimize the squared error (Table 2).
Table 2. ANFIS parameters.
6. Trading Signals and Strategy
The trading strategy we follow is based on the directional price of the forecasts, Karathanasopoulos et al.  and Karathanasopoulos   . 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. Out of sample statistical performance for the Dubai Crude Oil (excluding cost).
Table 4. Out of sample empirical performance for the Dubai Crude Oil (excluding cost).
8. 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.
 Hinton, G. and Sejnowski, T.J. (1986) Learning and Relearning in Boltzmann Machines, Parallel Distributed Processing: Explorations in the Microstructure of Cognition. Volume1: Foundations. MIT Press, Cambridge, MA.
 Chao, J., Shen, F. and Zhao, J. (2011) Forecasting Exchange Rate with Deep Belief Networks. The 2011 International Joint Conference on Neural Networks, San Jose, CA, 31 July-5 August 2011, 1259-1266.
 Fagiani, M., Squartini, S., Gabrielli, L., Spinsante, S. and Piazza, F. (2015) A Review of Datasets and Load Forecasting Techniques for Smart Natural Gas and Water Grids: Analysis and Experiments. Neurocomputing, 170, 448-465.
 Kang. Y. and Choi, S. (2011) Restricted Deep Belief Networks for Multi-View Learning. In: Gunopulos, D., Hofmann, T., Malerba, D. and Vazirgiannis, M., Eds., Machine Learning and Knowledge Discovery in Databases. Lecture Notes in Computer Science, Springer, Berlin, Heidelberg, 130-145.
 Kuremoto, T., Kimura S, Kobayashi K, and Obayashi M. (2014) Time Series Forecasting Using a Deep Belief Network with Restricted Boltzmann Machines. Neurocomputing, 137, 47-56.
 Shen, F., Chao, J. and Zhao, J. (2015) Forecasting Exchange Rate Using Deep Belief Networks and Conjugate Gradient Method. Neurocomputing, 167, 243-253.
 Karathanasopoulos, A. and Osman, M. (2018) Forecasting the Dubai Financial Market with a Combination of Momentum Effect with a Deep Belief Network. Journal of Forecasting, 38, 346-353.
 Panapakidis, I.P. and Dagoumas, A.S. (2017) Day-Ahead Natural Gas Demand Forecasting Based on the Combination of Wavelet Transform and ANFIS/Genetic Algorithm/Neural Network Model. Energy, 118, 231-245.
 Appiah, R., Panford, J.K. and Riverson, K. (2015) Implementation of Adaptive Neuro Fuzzy Inference System for Malaria Diagnosis (Case Study: Kwesimintsim Polyclinic). International Journal of Computer Applications, 115, 33-37.
 Prasad, K., Gorai, A.K. and Goyal, P. (2016) Development of ANFIS Models for Air Quality Forecasting and Input Optimization for Reducing the Computational Cost and Time. Atmospheric Environment, 128, 246-262.
 Akdemir, B., Oran, B., Günes, S. and Karaaslan, S. (2010) Prediction of Cardiac End-Systolic and End-Diastolic Diameters in M-Mode Values Using Adaptive Neural Fuzzy Inference System. Expert Systems with Applications, 37, 5720-5727.
 Okic, D.A. and Jovic, S. (2017) Evaluation of Agriculture and Industry Effect on Economic Health by ANFIS Approach. Physica A: Statistical Mechanics and Its Applications, 479, 396-399.
 Bahram-Parvar, M., Salehi, F. and Razavi, S.M.A. (2017) Adaptive Neuro-Fuzzy Inference System (ANFIS) Simulation for Predicting Overall Acceptability of Ice Cream. Engineering in Agriculture, Environment and Food, 10, 79-86.
 Barak, S. and Sadegh, S.S. (2016) Forecasting Energy Consumption Using Ensemble ARIMA-ANFIS Hybrid Algorithm. International Journal of Electrical Power and Energy Systems, 82, 92-104.
 Karathanasopoulos, A., Mitra, S., Skindilias, K. and Lo, C.C. (2016) Modelling and Trading the English and German Stock Markets with Novelty Optimization Techniques. Journal of Forecasting, 36, 974-988.
 Karathanasopoulos, A. (2016) Modelling and Trading the English Stock Market with Novelty Optimization Techniques. Economics and Business Letters, 5, 50-57.