Forecasting Crude Oil price using Artificial Neural Network model
Sivaprakash J.1, Dr. Manu K. S.2*
1Student, MBA (Finance Management), Christ (Deemed to be University),
Bengaluru - 560029, Karnataka, India.
2Assistant Professor, Christ (Deemed to be University), Bengaluru - 560029, Karnataka, India.
*Corresponding Author E-mail: manu.ks@christuniversity.in
ABSTRACT:
In the advanced global economy, crude oil is a commodity that plays a major role in every economy. As Crude oil is highly traded commodity it is essential for the investors, analysts, economists to forecast the future spot price of the crude oil appropriately. In the last year the crude oil faced a historic fall during the pandemic and reached all time low, but will this situation last? There was analysis such as fundamental analysis, technical analysis and time series analyses which were carried out for predicting the movement of the oil prices but the accuracy in such prediction is still a question. Thus, it is necessary to identify better methods to forecast the crude oil prices. This study is an empirical study to forecast crude oil prices using the neural networks. This study consists of 13 input variables with one target variable. The data are divided in the ratio 70:30. The 70% data is used for training the network and 30% is used for testing. The feed forward and back propagation algorithm are used to predict the crude oil price. The neural network proved to be efficient in forecasting in the modern era. A simple neural network performs better than the time series models. The study found that back propagation algorithm performs better while predicting the crude oil price. Hence, ANN can be used by the investors, forecasters and for future researchers.
KEYWORDS: Crude Oil, forecasting, ANN, regression, feedforward, backpropagation.
INTRODUCTION:
Universally, crude oil is one of the main fuel sources and, verifiably, has added to over 33% of the world's energy utilization. Crude oil is the most traded commodity in the commodities market across the world. It plays a major role in deciding the economy of many countries especially the gulf countries. The crude oil prices are highly volatile in nature. The fluctuation in the oil price reflects on the economic growth and the expansion of the economy. Due to the volatility the investors may find it difficult to earn returns.
Thus, crude oil price forecasts will be useful to the investors where they can make informed decision and minimise their risk which may boost the economy.
The forecasting of the crude oil price appropriately with accuracy is a challenging task. The investor cannot judge the market behaviour or movements. In such an unpredictable market a proper forecasting analysis will help them make effective decisions and earn high reward. There are many new modern methods in this era which includes machine learning, artificial neural network and recurrent neural networks. There are no assumptions under these algorithms where the models are considered as statistical models. The feedforward algorithm and backpropagation algorithm are used to predict the crude oil prices under Artificial Neural Network (ANN).
There are lots of variables that affect the crude oil price in the market. Such variables must be identified and included in the study. Based on the above criteria thirteen independent variables were taken and assumed that they influence the crude oil price. The variables other than those taken into consideration are assumed to be constant. The impact of these variables can be analysed with the help of multiple linear regression model. The ANN model is considered as the efficient model in forecasting the crude oil price. The study compared feed forward algorithm and backpropagation algorithm.
The price fluctuations of the crude oil price are highly unexpected. This causes various impacts on the oil importing countries. The crude oil market is highly fluctuated and the recovery path from the financial crisis. Since it is very difficult to predict the impact of such fluctuations it must be checked with the determining factors to analyse the economy of the country. The analysis made with the macro economic factors provides more precise results than comparing it with individual entities.
REVIEW OF LITERATURE:
(Sharma and Yadav 2020) investigated the robustness of ARIMA and ANN model in the prediction analysis. The ARIMA and ANN model showed similar errors, but authors preferred ARIMA is closer than ANN model. (Gupta and Nigam 2020) tells us that the prediction of crude oil is necessary during this period. The ANN model captures the unstable patterns and is efficient in forecasting the crude oil price. The results were validated by calculating the RMSE. (Jaehyung an et al. 2019) forecasted the crude oil price using the regression equation using machine learning. The analysis of factors affecting crude oil price revealed that in future the oil price will see an uptrend. (El-Chaarani 2019) derived that the negative oil price shocks created sensitivity in the stock market which affects the returns from the stock market. (Rahmanifard and Plaksina 2018) investigated that the application of Artificial Neural Network has showed a great performance in the areas of prediction, optimization and estimation of various parameters in the petroleum industry such as production rate. (Qiang et al. 2018) examines the effect of exchange rate on oil importing countries. The volatility is an important factor determining the changes in crude oil prices. (Tahmoorespour et al. 2018) analyses that the effect of oil prices has a significant impact on the stock markets of the country. (Waheed et al. 2018) investigates the impact of oil price changes on stock return of firms which had a positive effect. (Ramyar and Kianfar 2017) made a detailed analysis with the ANN model using the determinant factors of crude oil price. The ANN model has more accuracy in forecasting than the Vector Autoregressive model. (Mostafa Hameshi 2017) investigates about the exchange rate and oil prices and found that the change in exchange rates will adjust the oil price back to equilibrium. (Malhotra and Krishna 2015) examines the effect of inflation on crude oil price in India which showed that inflation has more effect on oil price during the crisis period. (Mahdiani and Khamehchi 2016) analysed predicted price using modified neural network model and pure neural network model. The ANN-GA performed better than pure ANN model. (Sakashita and Yoshizaki 2016) tells that CPI is used to find the dynamic effects of crude oil price. (Fazelabdolabadi 2019) developed a Bayesian technique to forecast the long-time period oil costs compared with neural network. The goodness of fit test revealed that neural networks are efficient in forecasting. (Sahu et al. 2015) examined that there is a significant relationship between dollar exchange rate and crude oil price. The cointegration models and VECM framework also found a dynamic relationship between exchange rate and crude oil price. (Wei-Shan Hu et al. 2012) investigated the forecasting crude oil prices using recurrent fuzzy neural network, Elman recurrent neural network and multilayer perceptron. The RFNN model outperformed other two models in accuracy of predicting crude oil prices.
OBJECTIVES:
1. To forecast the future crude oil price using Artificial Neural Network models and comparison between feedforward and backpropagation neural network.
2. To analyse the impact of production, consumption, exports and imports of crude oil, exchange rate, inflation, Nifty index and stock prices of RIL, BPCL, HPCL, OGC, IOC and MRPL on crude oil price.
METHODOLOGY:
It is a Quantitative research. This research involves the empirical investigation of observed data through statistical, mathematical, computational techniques. The objective of the quantitative research is to employ the mathematical, statistical techniques and models and hypothesis for the collected data. It emphasizes the objective measurements with the statistical tools. The research will be conclusive, and it tries to quantify the results of the research and how prevalent by looking for the projectable results to a larger population. The variables chosen for the study consists of fourteen variables. There are thirteen independent and one dependent variable. The data was collected from NSE (www.nseindia.com) and PPAC website (www.ppac.gov.in). The USD INR exchange rate was collected from RBI website (www.rbi.org.in).
DATASET:
The data are collected from April 2012 to August 2020. The monthly averages of all the variables were taken during that time period.
Table 1: Variables used for analysis
Type of variable |
Source |
|
Indian crude oil price |
Dependent variable |
Petroleum Planning and Analysis Cell |
Consumer price index |
Independent variable |
RBI |
USD/INR Exchange |
Independent variable |
RBI / Investing.com |
Imports of crude oil |
Independent variable |
Petroleum Planning and Analysis Cell |
Exports of crude oil |
Independent variable |
Petroleum Planning and Analysis Cell |
Nifty index |
Independent variable |
NSE India |
Production of crude oil |
Independent variable |
Petroleum Planning and Analysis Cell |
Stock prices of six major listed oil companies (RIL, BPCL, HPCL, IOC, ONGC and MRPL) |
Independent variable |
NSE India |
Consumption of crude oil |
Independent variable |
Petroleum Planning and Analysis Cell |
Sources of data:
The USD/INR rate and CPI are collected from RBI website. The stock price and the NIFTY 50 are collected from NSE website. The exports, imports, production and consumption of crude oil and price of crude oil are collected PPAC website.
Selection of Oil Companies:
The companies that play a major role in the oil and gas industry are Reliance Industries Limited (RIL), Bharat Petroleum Corporation Limited (BPCL), Hindustan Petroleum Corporation Limited (HPCL), Indian Oil Corporation (IOC), Oil and Natural Gas Corporation (ONGC) and Mangalore Refinery and Petrochemicals Limited (MRPL).
MODELS AND METHODS:
This study used feedforward algorithm and backpropagation algorithm in Artificial Neural Network (ANN). The Multiple linear regression models is used to identify the variables that impact the crude oil price.
An artificial neural network (ANN) is a computational model based totally at the shape and capabilities of biological neural networks. ANNs are considered nonlinear statistical information modelling tools wherein the complex relationships among inputs and outputs are modelled or patterns are determined. ANN is also referred to as a neural network. ANNs have 3 layers, which might be interconnected. The first layer consists of enter neurons. The ones neurons send records directly to the second one layer, which in turn sends the output neurons to the third layer. Neural Networks usually consist of one input layer, one output layer, and a few hidden layers in between the input and the output layers. That layer is made up of weights and biases that are adjusted during training. The 70% of the data is used as training data set and 30% data is used as testing data.
Feedforward algorithm:
A feedforward neural network is a biologically inspired classification algorithm. It consists of a (possibly large) number of simple neuron-like processing units, organized in layers. Every unit in a layer relates to all the units in the previous layer. It is simplest form of neural networks.
Figure 1: Feedforward Artificial Neural Network Model
Backpropagation algorithm:
This method uses preassigned weights in the simulation. Root Mean Squared Error and Mean Absolute Error are calculated to do a comparison with each other and to check whether the result is accurate. An ANN can have multiple numbers of input, multiple number of hidden layers and multiple outputs. With increasing number of hidden layer complexity increases. Number of hidden layers can also increase the accuracy and precision of the output.
Figure 2: Backpropagation Artificial Neural Network Model
Multiple Linear Regression Model:
This study consists of thirteen independent variables such as production, consumption, exports and imports of crude oil, major six stock prices, exchange rate, inflation and Nifty index. The dependent variable is crude oil price.
Crude Oil Price = β0+β1CPI1+β2Production2+ β3Consumption3+ β4Export4+β5Import5+ β6USDINR6+ β7BPCL7+ β8Nifty8+ β9IOC9+ β10RIL10+ β11ONGC11+ β12MRPL12+β13HPCL13+ϵ (1)
Normality:
The dependent variable and the independent variables taken into the study are the original prices. The forecasting and the regression analysis cannot be performed with the original data, so the data needs to be normalised. The formula for normalising the data is
The variables that were normalised are
Dependent variable: Crude oil Price
Independent variables: Consumer Price Index, Production of crude oil, Consumption of crude oil, total exports and imports of crude oil, USD INR exchange rate, Nifty 50 Index, Stock Prices of BPCL, IOC, RIL, ONGC, MRPL and HPCL.
In this study for the forecasting analysis and regression analysis the normalised value of the data has been used as original prices cannot be used.
Root Mean chi Error (RMSE) measures the difference of values. These values are the one which are predicted by the model and the actual values. Whatever deviation is measured by RMSE is called residuals. This method is also called Root Mean Square Deviation (RMSD). In order to aggregate the magnitude of the errors, RMSD is used to serve the purpose of prediction. It measures the accuracy of the model.
Mean Absolute Error (MAE) is referred to as the difference between 2 continuous variables. MAE is used to measure accuracy for continuous variables. When we have a set of predictions, it is used to measure the average magnitude of errors. It does not take into consideration the direction of the magnitude.
Mean absolute percentage error (MAPE) measures the accuracy prediction of forecasting method. It expresses accuracy as a percentage. It is also known as mean absolute percentage deviation (MAPD) and is defined by the formula:
Where At is the actual value and Ft is the forecast value.
RESULTS AND DISCUSSION:
Artificial Neural Network:
Graph 1: Predicted crude oil price using feedforward neural network
The graph 1 shows the time series plot of the actual values with the predicted values from the feedforward neural network. There is no big deviation of the predicted price from the actual values. The graph shows the price estimated at different time intervals. From the graph we can infer that the predicted price is not deviated much from actual price.
Graph 2: Predicted crude oil price using Backpropagation neural network
The graph 2 shows the plot of estimated price of crude oil using backpropagation with the actual price. The deviation is slightly higher from the actual values in the initial stages and later the errors were less. This is because the network changes the weight automatically and the errors are also reduced.
Multiple Linear Regressions:
Table 4: Multiple Linear Regression model results
Parameter |
Value |
Standard Error |
t-Statistic |
P-Value |
Intercept |
0.3866 |
0.034 |
11.3818 |
7.62E-19 |
Beta {BPCL} |
-0.0849 |
0.0696 |
-1.2208 |
0.2255 |
Beta {CPI} |
0.0095 |
0.1113 |
0.0856 |
0.932 |
Beta {Consumption of Crude Oil} |
0.1568 |
0.0461 |
3.4051 |
0.001 |
Beta {HPCL} |
-0.0455 |
0.1137 |
-0.4001 |
0.69 |
Beta {IOC} |
0.0127 |
0.0835 |
0.1515 |
0.8799 |
Beta {MRPL} |
0.0614 |
0.0562 |
1.0922 |
0.2778 |
Beta {NIFTY50} |
-0.2809 |
0.0606 |
-4.6321 |
1.28E-05 |
Beta {ONGC} |
0.1351 |
0.0426 |
3.1717 |
0.0021 |
Beta {Production of Crude Oil} |
-0.2631 |
0.0398 |
-6.6172 |
2.98E-09 |
Beta {RIL} |
0.3103 |
0.0571 |
5.4385 |
4.96E-07 |
Beta {Total Exports} |
0.2468 |
0.0418 |
5.9088 |
6.74E-08 |
Beta {Total Imports} |
0.5576 |
0.0382 |
14.6039 |
5.22E-25 |
Table 5: MLRM Goodness of fit
AIC |
-365.114 |
BIC |
-328.641 |
Graph 3: MLRM Model Fit
The table 4 shows the results of multiple linear regression models. From the above table it is found that the consumption of crude oil, Nifty 50, ONGC, production, RIL, exports and imports have significant impact on the dependent variable crude oil.
The graph 3 shows the estimated prices using the MLRM model. The graph shows that there are many deviations from the actual values because regression model is a one-way model and it takes only the input variables and nothing beyond it like neural networks.
Forecasting evaluation:
Crude oil is the major commodity that is traded across the world. The economy of many countries depends upon the crude oil. The prices of crude oil are highly volatile and it fluctuates depending upon demand and supply factors and sometimes by the external factors. The investors will always expect high returns from their investment. This is where forecasting plays an important role in minimizing the risks and increase profits. The predicted output is measured using the performance indicators such as Root Mean Square Error (RMSE), Mean Absolute Error (MAE) and Mean Absolute Percentage Error (MAPE).
Table 6: Forecasting results (errors) using feedforward and backpropagation
Errors |
Training |
Testing |
||
Feedforward |
Backpropagation |
Feedforward |
Backpropagation |
|
RMSE |
0.0290 |
0.0409 |
0.0393 |
0.0235 |
MAPE |
5.9884 |
8.716 |
4.6005 |
3.7032 |
MAE |
0.0225 |
0.0294 |
0.0193 |
0.0112 |
The table 6 shows the error values of the estimation done using feedforward and backpropagation neural network. The model with lower errors is considered to an efficient model. While training the data the feedforward neural network performed better than backpropagation. From the errors it can be understood that the Backpropagation neural network performs with high efficiency while testing the data. Thus, Backpropagation neural network performs better than feedforward neural network in forecasting crude oil prices.
CONCLUSION:
The study incorporates Artificial Neural Network to forecast the crude oil price. ANN is a tool to solve complex problems beyond the computational capability of classical and traditional procedures. This study used feedforward and back propagation algorithm to forecast oil prices. The study shows that Backpropagation algorithm is better in predicting price than feedforward algorithm. The ANN model outperformed MLRM in terms of accuracy of prediction. It can be concluded from the values of RMSE, MAE and MAPE that backpropagation is better in forecasting the oil price. The regression results revealed that consumption of crude oil, Nifty 50, ONGC, production; RIL, exports and imports impact the crude oil price.
This study would help the investors to minimize their risk and increase their profit. It also helps them to enter the trade at a right time and maintain an optimum portfolio. The prediction using ANN will deliver accurate results and can be suggested for the future researchers to use ANN model for forecasting. There are many other variables other than those taken for research that affect the price of crude oil. There are many more advanced models such as recurrent neural network models (RNN), Convolutional neural network (CNN), Length short time period memory (LSTM) neural network models can be more efficient and robust for future analysis. These models can be appropriate for future analysis because these models could recurrent the data points beyond the available data while studying the data sets.
REFERENCES:
1. El-chaarani, H. (2019). The Impact of Oil Prices on Stocks Markets: New Evidence During and After the Impact of Oil Prices on Stocks Markets: New Evidence During and After the Arab Spring in Gulf Cooperation Council Economies. November. https:// doi.org/10.32479/ijeep.7978
2. Fazelabdolabadi, B. (2019). A hybrid Bayesian-network proposition for forecasting the crude oil price. Financial Innovation, 5(1). https://doi.org/10.1186/s40854-019-0144-2
3. Gupta, N., and Nigam, S. (2020). Crude Oil Price Prediction using Artificial Neural Network. Procedia Computer Science, 170: 642–647. https://doi.org/10.1016/j.procs.2020.03.136
4. Hamdi, M., Finance, I., Manar, E., Aloui, C., Saud, K., and Arabia, S. (2015). Volume 35, Issue 2 Forecasting Crude Oil Price Using Artificial Neural Networks: A Literature. 35(2): 1339–1359.
5. Hashemi, M., and Virginia, W. (2017). The Relationship between Oil Prices and US Dollar Exchange Rates in Short and Long Scales Mostafa Hashemi Thesis submitted Division of Resource Economics and Management.
6. Hu, J. W., Hu, Y., and Lin, R. R. (2012). Applying Neural Networks to Prices Prediction of Crude Oil Futures. 2012(August 2006). https://doi.org/10.1155/2012/959040
7. Mahdiani, M. R., and Khamehchi, E. (2016). A modified neural network model for predicting the crude oil price. Intellectual Economics, 10(2): 71-77. https://doi.org/10.1016/ j.intele.2017.02.001
8. Malhotra, A., and Krishna, S. (2015). The effect of Crude Oil prices on Inflation and Interest Rates in India: Evidence from DCC-GARCH model. 1-8.
9. Mikhaylov, A. Jaehyung A. N., Nikita Moiseev. (2020). Oil Price Predictors: Machine Learning Approach Oil Price Predictors: Machine Learning Approach. September 2019. https://doi.org/ 10.32479/ijeep.7597
10. Qiang, W., Lin, A., Zhao, C., Liu, Z., Liu, M., and Wang, X. (2019). The impact of international crude oil price fluctuation on the exchange rate of petroleum ‑ importing countries: a summary of recent studies. Natural Hazards, 95(1): 227-239. https://doi.org/ 10.1007/s11069-018-3501-y
11. Ramyar, S., and Kianfar, F. (2017). Forecasting Crude Oil Prices: A Comparison between Artificial Neural Networks and Vector Autoregressive Models. Computational Economics, 53(2): 743-761. https://doi.org/10.1007/s10614-017-9764-7
12. Rahmanifard, H., Plaksina, T. Application of artificial intelligence techniques in the petroleum industry: a review. Artif Intell Rev 52, 2295-2318 (2019). https://doi.org/10.1007/s10462-018-9612-8
13. Sahu, T. N., Tukaran, K., Bandopadhyay, K., and Mondal, D. (2015). Crude Oil Price, Exchange Rate and Emerging Stock Market: Evidence from India. 42: 75-87.
14. Sakashita Y, Yoshizaki Y. The Effects of Oil Price Shocks on IIP and CPI in Emerging Countries. Economies. 2016; 4(4):20. https:// doi.org/10.3390/economies4040020
15. Tahmoorespour, R., Rezvani, M., Safari, M., and Randjbaran, E. (2018). The impact of oil price fluctuations on industry stock returns: Evidence from international markets. 5(1): 1-12.
16. Waheed, R., Wei, C., Sarwar, S., and Lv, Y. (2018). Impact of oil prices on firm stock return: industry-wise analysis. Empirical Economics, 55(2): 765–780. https://doi.org/10.1007/s00181-017-1296-4
Received on 18.02.2021 Modified on 02.03.2021
Accepted on 10.03.2021 ©AandV Publications All right reserved
Asian Journal of Management. 2021; 12(3):321-326.
DOI: 10.52711/2321-5763.2021.00049