JMMS
JMMS
JMMS
1
Matthew Femi Olayiwola and 2Samuel Babajide Atoyebi
1
Department of Mathematics, African Leadership Academy South Africa
2
DSK Statistical Consult Nig. Ltd
Key words: Box-Jerkins, fuel prices, exchange rate, Abstract: South African economy has been said to be
stationarity test, AutoRegressive Integrated Moving fuel price dependent and that the fuel price keeps
Average, mathematical modeling, time series increasing on yearly basis [1]. Thus, there is a need to
develop a scientific model to predict the behaviour and
future values of fuel prices and exchange rates. This study
employs an Autoregressive Integrated Moving Average
(ARIMA) in predicting the fuel prices and the strength of
the South African rand in the international market based
on the thirty-five years monthly data. The prices of fuel
exhibit an upward trend variation. Among the competing
models estimated per each variable, ARIMA (3, 1, 1),
ARIMA (3, 1, 1), ARIMA (1, 1, 2) and ARIMA (1, 0, 1)
are respectively found to be the best for modeling and
predicting the behaviour and future values of diesel,
paraffin, petrol and exchange rate (ZAD-USD). Their
respective forecasting accuracy are 93.4, 91.7, 91.5 and
Corresponding Author: 79.3%, respectively. Hence, predicting the future values
Matthew Femi Olayiwola of fuel prices and the strength of South African currency
Department of Mathematics, African Leadership against the United States of America dollars using these
Academy South Africa models will help the policymakers and all stakeholders
make well-informed decisions in planning. Further
Page No.: 00-00 research can be carried out on the short and long-run
Volume: 15, Issue 1, 2021 relationship between the four variables. Also, the
ISSN: 1994-5388 direction of causality among the variables should be
Journal of Modern Mathematics and Statistics looked into to determine which variable can be used to
Copy Right: Medwell Publications determine the future values of the other.
8
Modern Mathe. Stat., 15 (1): 08-07, 2021
relies on the amount borrowed or tax revenues collected. The international crude oil prices are determined by
It is consequently, imperative to examine the relationship the two leading international NYMEX WTI CRUDE Oil
between consumption and the price of fuel in South and Brent Oil (Trading Crude oil CFDs, 2020). The
Africa. former determines the crude oil prices using the
Widespread concern had been created by the large benchmark reported in oil future contracts as traded on
and rapid increase experienced in the oil price over the CME’s New York Mercantile Exchange while the latter
last years and its impacts on poverty and economic instead determines the crude oil price using the European
growth in many developing countries. In the modern international benchmark as traded on the Intercontinental
industrial economy, the quintessential commodity is
Exchange [9]. This is an indication of the vital role the
petrol. Although initially, it was coal that was used to
exchange rate plays in the local price determination of the
power the industrial revolution, Pennsylvania was where
the commercial petrol well was drilled for the first time in retail fuel price. A quite number of researches have
1859 and since then, when it comes to the share of petrol reported that oil price is significantly related to the
in the primary energy supply of the world, petrol has economic growth of South Africa. Olayiwola and Seeletse
continued to gain prominence. It now has the largest (2020) submitted that there exists a unidirectional
share, it accounts for >35%. Petrol as an energy source, is causality from the consumption of petrol in South Africa
used for transportation as a liquid fuel, heating, and most its retail price. It was reported by the duo in the same
importantly for electricity generation. For some 90% of research that the South African economy is energy-
energy, the transport systems of the world (including road dependent as the price of petrol affects the standard of
transport, airplanes, trains and ships) depend on petrol [4]. living [10]. Yang et al. (2002) in a study on oil-price
Consequently, many sectors are highly reliant on petrol in volatility study posited that recessions in oil-consuming
most developing countries. For the production of nations are a function of higher oil prices. Consumption
pesticides, herbicides and fertilizers, industrial agriculture and price of oil are found to be the key to South African’s
heavily depends on natural gas and petrol as well as in energy security [11]. The works of Stringer and Yang et
transporting products to markets and power mechanized al are found to be further sustained in a recent study on
farm machinery. the statistical forecasting of petrol price in South Africa,
One of the factors that influence price and
the petrol price in South Africa showed an upward trend
consumption is the amount of fuel available.
that continues into future and that an increase in the price
Consumptions can be very high when an item is abundant
because of affordability, also the price will likely be of petrol reduces the disposable cash for consumers [1].
cheaper when an item is abundant. As reported by South South Africa whose economy is driven by fuel as
Africa Yearbook (2008/09), almost 95% of the crude oil indicated in several studies imports 95% of its oil
requirements of South Africa are imported from Africa consumption from the Middle East and Africa [12]. The
and the Middle East and that South Africa has limited oil volumes of fuels available and their prices in South Africa
reserves. Therefore, with South Africa producing just 5% yearly are strongly related to the strength of the South
locally, low consumption is expected from consumers and African rand (exchange rate) in the international market.
it is an indication of scarcity. The relationship between Hence, this study is carried out to develop a
refinery products and the prices of oil had been mathematical model for predicting the future behaviour
investigated by several studies [5, 6, 7]. and values of fuel prices and exchange rate (ZAR-USD)
One of the major drivers of economic activities is the in South Africa.
prices of oil and for global economic growth, the high
prices have been perceived as not being favorable. The Box-Jekins procedures: Box-Jerkins’s approach has
popular myth is that generally, high consumer prices are been used by many researchers in modelling and
associated with high oil prices. For two reasons, the forecasting the future values of different variables.
linkage between the Consumer Price Index (CPI) and oil
ARIMA and ARIMA were found to be the best model for
prices is especially, important for the economy of South
predicting the road traffic fatalites in South Africa [13]
Africa. Firstly, in the world, one of the most unequal
while ARIMA was developed to model the maternal
countries is South Africa in terms of income with a Gini
coefficient of 63.1 in 2009 [8]. What this means is that the mortality ratio of the Okonfo Anokoye Teaching Hospital
larger part of the population is affected disproportionately in Kumasi[14].The inflation rates in the Volta Region of
by inflation because to keep up with rising prices they Ghana can best be modelled by ARIMA (2, 1, 2) in
will need more income. Furthermore, South Africa is studying the series behaviour [15]. Also, ARIMA was
exposed to rising oil prices external shocks because it is found to be the best among the competing models to
an oil-importing country. For these reasons, determining predict the lake Malawi water levels [16]. Box and Jerkins
the relationship between consumption and the price of proposed a four-step iterative process in modelling and
fuel in South Africa is important. forecasting the time series data, namely; model
9
Modern Mathe. Stat., 15 (1): 08-07, 2021
Yt Yt-1 +e t (1) rk
Y -Y Y -Y /n-k
t t+k
(6)
Y -Y \n
2
t
Where:
Yt = The actual series For computational purposes, the autocorrelation at lag
Yt-1 = One period lagged of the actual series k is based on:
et = A serially uncorrected white noise error term with
a mean of zero and a constant variance
rk
Y -Y Y
t t +k -Y
(7)
Y -Y
2
t
Reparametrizing (1) gives (2):
Yt Yt-1 +e t
Where:
(2)
rk = The value of autcorrelation at lag k
Y, Yt and Yt+k = Respectively the mean of the series, the
where δ = (θ-1) and is the first difference operator. value of the time series at
t = The value of time series at lag k
The null hypothesis of δ = θ from (2) has an n = The number observations of the series
estimated t-value. The Augmented Dickey-Fuller test was
introduced to address the serial correlation of the error The Partial Autocorrelation Function (PACF) is
terms produced in the Dickey-Fuller test [20]. This test usually denoted as which is mathematically
makes the error terms white noise by introducing the represented as:
lagged first difference into the regression equation as
in (3): rk atk 1
k-1
Yt Yt-1 +a i i 1 Yt-i +e t ji k-1rk-j
m
(3) k-
kk j1 (8)
r ,at k 2
k-1
1- ji rk
Including intercept and time, t in Eq. 3 now gives:
j1 k-1
p
y t a+ t +yYy t-1 + j1 jy t-j +eit
(5) y t a+ i y t-i +u t (9)
i 1
10
Modern Mathe. Stat., 15 (1): 08-07, 2021
p = the number of lagged values of the regressand 1,000
included in the model (9) is the regression equation of the 800
actual series on its past values that is the series is
600
Series
explained by its past values. Also, the MA is represented
in Eq.10: 400
200
y t + j 1 d ju t i +d 0 u t
q
(10)
0 1990 1995 2000 2005 2010 2015 2020
of the error term in the
q = the number of lagged values
Months (1986M01-2020M12
model (10) is the regression equation of the actual series Diesel Exchangerate
Parafin
on its error past values that is the series is explained by its Petrol
error past values. (9) and (10) can be combined to produce Fig. 1: Time series plots of the fuel prices and exchange
an ARMA Model as represented in (11) below (Cochrane, rate
1997):
plot to examine the various components present. The
y t + i 1 i y t 1 + j 1 d ju t i d 0 u t +u t appropriateness of the ARMA model is studied using the
p q
(11)
ACF and PACF and the order of integration is determined
using the Augmented Dickey-Fuller test[20]. The best
Hence, when the time series data is nonstationary at models are chosen from the estimated models using each
level, then (11) becomes ARIMA (p, d, q) with d been the model’s volatility, adjusted R2, the number of the
integration order. significance of coefficients and information criterion
The best ARMA/ARIMA Model can be chosen from values. The selected ARIMA model is diagnosed as
the number of estimated tentative models based on the required by the theory. The forecast of the future values
number of significant coefficients, the volatility of the of each variable is done using the best model. Eviews 11
model, adjusted R-square and the information criterion is used for all the analyses, recommendations and
such as Akaike Information Criterion (AIC), Bayesian conclusions are based on the discussions of results
AIC and BIC can be
Information Xriterion (BIC), etc. (Fig. 1).
mathematically computed using the equations:
RESULTS AND DISCUSSION
AIC 2ln L 2k (12)
The time series plot of original road fatality data
shown in Fig. 1 shows that there is trend variation in the
BIC 2ln L 2k ln(n) (13) series as the series mean changes systematically slowly
with time. Though this is an indication of nonstationarity
where, InL is the natural logarithm of the estimated in the series but we cannot conclude based on the time
likelihood function k = p+q is the number of parameters series plot. Hence, the Augmented Dickey-Fuller test is
in the model and n is the total observations. The latter required to check for the presence of the unit root in the
maximizes the log-likelihood function to penalize for over series.
parameterized model while the former estimates the The results of the ADF unit root tests for both level
expected Kullback-Leibler divergence which the and differenced series of fuel prices and exchange rate are
closeness of the candidate model to the actual. Generation shown in Table 1. The results show that the level series of
of the future values of time series through the fuel prices has a unit root while their first differenced has
development of statistical models for stochastic no unit root but the level series of the exchange rate has
simulation purposes can be referred to as forecasting[23]. no unit root. However, South African annual exchange
Thus, predicting the future value of a time series variable rate was found to be integrated of order in another study
is based on the use of the scientific method. when annual data from 1960-2019 were used as repoted
by the Augmented Dickey-Fuller and Phillips-Peron tests
[25]. The latter contradicts the Hence, the exchangerate
MATERIALS AND METHODS is integrated of order zero, I(0) while each fuel price
variable is integrated of the first order I (1).
Monthly data on the basic fuel prices (in-land basic The correlogram plots of the Auto Correlation
cost, IBLC) of diesel, paraffin and petrol and exchange Functions (ACF) and Partial Autocorrelation Functions
rate (ZAR-USD) for the period of 1986-2020 were (PACF) for the first differenced diesel, paraffin and petrol
collected from the energy statistics of the Department of and level of exchange rate series are plotted. These plots
Mineral Resources and Energy South Africa[24]. The revealed that data can be modeled by an Auto Regressive
variables are graphically represented in a basic time series Integrated Moving Average (ARIMA). Few lags are
11
Modern Mathe. Stat., 15 (1): 08-07, 2021
found to be significant for both the ACFs and PACFs, 4 out of 9 have two coefficients significant at one percent
thus various models are estimated. Tables 2-5 show the level. Among these four models, ARIMA (1, 1, 2) is
results of tentative estimated ARIMA/ARMA Models. found to be the best as it has the lowest volatility value of
The p-values for the intercept, autoregressive and 90.67 highest adjusted coefficient of variation value of
moving average are reported in Table 2-5 for the nine and the least Akaike information criterion value of
tentative models estimated for each variable. In the diesel (Table 3). However, in the petrol tentative models, 8 out
tentative models, 5 out of 9 have two coefficients of 9 have two coefficients significant at one percent level.
significant at 1% level. Among these five models, Among these eight models, ARIMA (1, 0, 1) is found to
ARIMA (3, 1, 11) is found to be the best as it has the be the best as it has the lowest volatility value of , highest
lowest volatility value of the highest adjusted coefficient adjusted coefficient of variation value of and the least
of variation of and the least Akaike information criterion Akaike information criterion of (Table 4). Also in the
value of (Table 2). And in the paraffin tentative models, exchange rate tentative models 8 out of 9 have two
12
Modern Mathe. Stat., 15 (1): 08-07, 2021
coefficients significant at one percent level. Among these differenced to remove the trend and each is found to be
eight models, ARIMA (1, 0, 1) is found to be the best as integrated of order 1, . However, the exchange rate shows
it has the lowest volatility value of 90.67 highest adjusted no trend variation and is stationary at level, . Many lags of
coefficient of variation value of and the least Akaike the first differenced are found to be significant from the
information criterion of (Table 5). The four selected correlogram of both the ACF and PACF, however, the
models are diagnosed through the correlogram of their parsimonious models are estimated and checked for the
residuals with each correlogram indicating that all best models based on the number of the significant
information has been captured, hence the forecast will be coefficients; the lowest volatility; highest adjusted
based on these selected models, ARIMA (3, 1, 1), coefficient of determination and the lowest information
ARIMA (3, 1, 1), ARIMA (1, 1, 2) and ARIMA (1, 0, 1).
criterion. ARIMA (3, 1, 1), ARIMA (3, 1, 1), ARIMA (1,
Table 6 shows the results of the forecast models for
1, 2) and ARIMA (1, 0, 1) are respectively found to be the
each variable over a period of 36 months (2018M01 to
best predictive models for diesel, paraffin, petrol and
2020M12). ARIMA diesel forecast shows a slight
exchange rate in South Africa. The residuals correlogram
deviation from the actual series, with the forecast
plots of the four models are found to be flat, indicating
accuracy of 93.4%. Also, ARIMA (3, 1, 1) paraffin
that all the information has been captured. Each of
forecast shows a slight deviation from the actual series,
ARIMA (3, 1, 1), ARIMA (3, 1, 1), ARIMA (1, 1, 2) and
with a forecast accuracy of . ARIMA (3, 1, 1 petrol
ARIMA (1, 0, 1) respectively has and forecast accuracy.
forecast shows a slight deviation from the actual series,
These models can be used by the policymakers and all
with the forecast accuracy of ARIMA (3, 1, 1
fuel and exchange rate stakeholders to predict the future
exchangerate forecast shows a little or no deviation from
values of the in-land basic cost of fuel per litre and the
the actual series with a forecast accuracy of . A very
strength of South African rand against the United States
strong comovement is seen among the forecast and actual
of America dollars (ZAR-USD). This is necessary as fuel
series or each variable (see appendices I- IV).
plays important role in growing the South African
economy (Olayiwola and Seeletse, 2020). Further
CONCLUSION
research can be carried out on the short and long-run
relationship between the four variables. Also, the
The 35 years monthly series of diesel, paraffin and
direction of causality among the variables should be
petrol in South Africa show an upward trend component
looked into to determine which variable can be used to
with no seasonal component, thus these series are
determine the future values of the other.
Forecast: Diesel
1,100 Actual: Diesel
Forecast sample: 2018M01
1,000 2020M12 included
900 observations: 36 Root mean
800 squared error 54.91094
mean absolute error
700 40.22411 mean Abs. percent
600 error 60611181 theil
500 inequality coef. 0.039736
400 bias proportion 0.008619
variance proportion
300 0.001058 covariance
200 I II III IV I II III IV I II III IV proportion 0.990322 theil
U2 coefficient 0.728635
2018 2019 2020 symmetric MAPE 6.490942
Diesel Actuals ±2 S.E.
Appendix 1: ARIMA (3, 1, 1) forecasted and actual diesel series; Researcher’s computation from Eviews 11
Forecast: Parafinf
1,200 Parafinf Actuals ±2 S.E.
Actual: Parafinf
Forecast sample: 2018M01
1,000 2020M12 included
observations: 36 Root mean
800 squared error 59.55110
mean absolute error
600 42.62244 mean Abs.
400 percent error 8.320401 theil
inequality coef. 0.043725
200 bias proportion 0.009599
variance proportion
0 0.001141covariance
I II III IV I II III IV I II III IV proportion 0.989260 theil
2018 2019 2020 U2 coefficient 0.737882
symmetric MAPE 8.065213
Appendix 2: ARIMA (3, 1, 1) forecasted and actual diesel series; Researcher’s computation from Eviews 11
13
Forecast: Petrolf
1,000 Actual: Petrol
Forecast sample: 2018M01
900 2020M12 included
800 observations: 36 Root mean
700 squared error 63.97055
600 mean absolute error
47.78503 mean Abs. percent
500 error 8.546982 theil
400 inequality coef. 0.049022
300 bias proportion 0.009930
variance proportion
200 0.002215 covariance
I II III IV I II III IV I II III IV
proportion 0.987855 theil
2018 2019 2020 U2 coefficient 0.755242
symmetric MAPE 8.242105
Petrolf Actuals ±2 S.E.
Appendix 3: ARIMA (1, 1, 2) forecasted and actual diesel series; Researcher’s computation from Eviews 11
Forecast: Exchangeraf Actual:
Exchangerate Forecast
sample: 1986M01 2020M12
240 Adjusted sample: 1986M02
200 2020M12 included
observations: 417 Root mean
160 squared error 9.551989 mean
absolute error 1.684808 mean
120
Abs. percent error 20.70971
80 theil inequality coef. 0.454786
40 bias proportion
0.000846 variance proportion
0 0.486790 covariance
-40 proportion 0.512365 theil U2
90 95 00 05 10 15 20 coefficient 1.041278
symmetric MAPE 17.98072
2018 2019 2020
Exchangeraf
Actuals
±2 S.E.
Appendix 4: ARIMA (1, 0, 1) forecasted and actual diesel series; Researcher’s computation from Eviews 11
14
Modern Mathe. Stat., 15 (1): 08-07, 2021
Maia, J. and S. Hanival, 1994. An overview of the Sarpong, S.A., 2013. Modeling and forecasting maternal
performance of the South African economy since mortality; an application of ARIMA models. Int. J.
1994. The Presidency Office, Pretoria, South Africa. Applied, 3: 19-28.
Makwinja, R., T. Phiri, I.B. Kosamu and C.C. Kaonga, Serletis, A., 1994. A cointegration analysis of petroleum
2017. Application of stochastic models in predicting futures prices. Energy Econ., 16: 93-97.
Lake Malawi water levels. Int. J. Water Resour. Statistics South Africa, 2009. Energy statistics. Statistics
Environ. Eng., 9: 191-200. South Africa, Pretoria, South Africa.
Okyere, F., F. Mahama, S. Yemidi and E. Krampa, 2015. StatsSA., 2017. Statistics South Africa annual report.
An econometric model for inflation rates in the volta Pretoria Government Printers, Pretoria, South Africa.
region of Ghana. IOSR J. Econ. Finance, 6: 48-55. Stringer, K.D., 2008. Energy security: Applying a
Olayiwola, M.F. and S.M. Seeletse, 2014. Statistical portfolio approach. Baltic Secur. Defence Rev., 10:
modelling of petroleum price and consumption rate 121-142.
in South Africa. M.Sc. Thesis, University of Sukati, M., 2013. Cointegration analysis of oil prices and
Limpopo South Africa. consumer price index in South Africa using STATA
Olayiwola, M.F. and S.M. Seeletse, 2020. South African software. MPRA Paper No. 49797, University
petrol price and consumption cointegration analysis. Library of Munich, Germany.
J. Eng. Applied Sci., 15: 1579-1588. Trading Crude Oil CFDs Online, 2020. Plus 500TM
Olayiwola, M.F. and S.M. Seeletse, 2020. Statistical crude oil trading. Plus500AU Pty Ltd, South African.
forecasting of petrol price in South Africa. J. Eng. Woodward, W., H. Gray and A. Elliott, 2012. Applied
Applied Sci., 15: 602-606. Time Series Analysis. CRC Press, Boca Raton,
Olayiwola, M.F., 2020. Mathematical modeling of road Florida,.
traffic fatalities. Afr. J. Math. Stat. Stud., 3: 63-74. Yang, C.W., M.J. Hwang and B.N. Huang, 2002. An
Phillips, P.C.B. and P. Perron, 1988. Testing for a unit analysis of factors affecting price volatility of the US
root in time series regression. Biometrika, 75: oil market. Energy Econ., 24: 107-119.
335-346.
15