Research Article | | Peer-Reviewed

Modelling Petrol Prices in Kenya from 2014 to 2023 Using Sarimax Model: A Case Study of Nairobi County

Received: 1 August 2024     Accepted: 16 August 2024     Published: 26 August 2024
Views:       Downloads:
Abstract

The requirement for petrol price information is crucial for majority of enterprises. This is because fluctuations in petrol prices impact inflation hence affecting daily lives of citizens. In analyzing the prices of petrol, researchers have employed several models but encountered various limitations. These limitations include; the Error Correction Model can examine only one co-integrating association. The Vector Autoregression (VAR) model does not account for the structural changes in the data. Additionally, the AutoRegressive Integrated Moving Average (ARIMA) model does not take into consideration the seasonal component in the data. The Generalized Autoregressive Conditional Heteroskedasticity (GARCH) model assumes that over time the volatility is constant. Moreover, the Seasonal Autoregressive Integrated Moving Average (SARIMA) model does not integrate the external factors. Hence in this study Seasonal Autoregressive Integrated Moving Average with Exogenous Variables (SARIMAX) model was employed since it captures seasonality in data and incorporates the exogenous variables. The research’s aim was to model prices of petrol in Kenya for the period between 2014 to 2023 with exchange rates as an external factor. Secondary data was obtained from Energy and Petroleum Regulatory Authority (EPRA), Kenya National Bureau of Statistics (KNBS) and Central Bank of Kenya (CBK) websites. R software was used to analyze the data. By the use of historical data of petrol prices and exchange rates, the study sought to fit the best Seasonal Autoregressive Integrated Moving Average with Exogenous Variables (SARIMAX) model, validate the model and predict the petrol prices. The petrol price data was found to be non-stationary using Augmented Dickey Fuller test (ADF). Regular differencing was conducted to make the data stationary. Seasonal differencing due to seasonality component available in the data was also performed. Best SARIMAX model was chosen from various SARIMAX models according to Box-Jenkins methodology which uses least Akaike Information Criterion (AIC) value. SARIMAX (0,1,1)(2,1,2)12 model was selected since it had least Akaike Information Criterion (AIC) value of 656.3733 and the model validated using the hold out technique. The forecasts errors from the training set were; Mean Squared Error (MSE)=10.4970, Root Mean Square Error (RMSE)=3.239911, Mean Absolute Percentage Error (MAPE)=2.309268% while those from the testing set were; Mean Squared Error (MSE)=3271.1012, Root Mean Square Error (RMSE)=57.193542, Mean Absolute Percentage Error (MAPE)=26.695390%. There was less error in the training set than in the testing set as it was expected hence the model suited the data well and could be used for future predictions. The model was then used for five year forecast into the future. This study’s findings will offer sound suggestions to policymakers, businesses and consumers. This study recommends a model to be fitted using other factors affecting petrol prices and fitting Fourier terms, Behavioral Assessment Tools (BATS) and Trigonometric Box-Cox ARMA Trend Seasonal (TBATS) models.

Published in American Journal of Theoretical and Applied Statistics (Volume 13, Issue 4)
DOI 10.11648/j.ajtas.20241304.14
Page(s) 85-91
Creative Commons

This is an Open Access article, distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution and reproduction in any medium or format, provided the original work is properly cited.

Copyright

Copyright © The Author(s), 2024. Published by Science Publishing Group

Keywords

Exogenous Variable, Petrol Price, Exchange Rate, Differencing, Forecasting

References
[1] Azam, Muhammad. “Energy and Economic Growth in Developing Asian Economies.” Journal of the Asia Pacific Economy 25, no. 3 (September 18, 2019): 447- 71. https://doi.org/10.1080/13547860.2019.1665328
[2] Greene, David L., Charles B. Sims, and Matteo Muratori. “Two trillion gallons: Fuel savings from fuel economy improvements to US light-duty vehicles,” Energy Policy 142 (2020)
[3] Vochozka, Marek, Zuzana Rowland, Petr Suler, and Josef Marousek. “THE INFLUENCE OF THE INTERNATIONAL PRICE OF OIL ON THE VALUE OF THE EUR/USD EXCHANGE RATE.” Journal of Competitiveness 2 (2020).
[4] Eliasson, Jonas. “Will We Travel Less after the Pandemic” Transportation Research Interdisciplinary Perspectives 13 (March 2022): 100509. https://doi.org/10.1016/j.trip.2021.100509
[5] Ngare, Lucy W., and Okova W. Derek. “THE EFFECT of FUEL PRICES on FOOD PRICES in KENYA.” International Journal of Energy Economics and Policy 11, no. 4 (June 8, 2021): 127-31. https://doi.org/10.32479/ijeep.10600
[6] Kilian, Lutz, and Xiaoqing Zhou. “Oil Prices, Gasoline Prices, and Inflation Expectations.” Journal of Applied Econometrics, May 30, 2022. https://doi.org/10.1002/jae.2911
[7] Hewamalage, Hansika, Christoph Bergmeir, and Kasun Bandara. “Recurrent Neural Networks for Time Series Forecasting: Current Status and Future Directions.” International Journal of Forecasting 37, no. 1 (January 2021): 388-427. https://doi.org/10.1016/j.ijforecast.2020.06.008
[8] Fang, Xinyu, Wendong Liu, Jing Ai, Mike He, Ying Wu, Yingying Shi, Wenqi Shen, and Changjun Bao. “Forecasting Incidence of Infectious Diarrhea Using Random Forest in Jiangsu Province, China.” BMC Infectious Diseases 20, no. 1 (March 14, 2020). https://doi.org/10.1186/s12879-020-4930-2
[9] Staffini, Alessio, Thomas Svensson, Ung-il Chung, and Akiko Kishi Svensson. “Heart Rate Modeling and Prediction Using Autoregressive Models and Deep Learning.” Sensors 22, no. 1 (December 22, 2021): 34. https://doi.org/10.3390/s22010034
[10] Hadwan, Mohammad, Basheer M. Al-Maqaleh, Fuad N. Al-Badani, Rehan Ullah Khan, and Mohammed A. Al-Hagery. “A Hybrid Neural Network and Box- JenkinsModelsforTimeSeriesForecasting.” Computers, Materials & Continua 70, no. 3 (2022): 4829-45. https://doi.org/10.32604/cmc.2022.017824
[11] Dama, Fatoumata, and Christine Sinoquet. “Time series analysis and modeling to forecast: A survey.” arXiv preprint arXiv: 2104.00164 (2021).
[12] Tandon, Chahat, Sanjana Revankar, Hemant Palivela, and Sidharth Singh Parihar. “How Can We Predict the Impact of the Social Media Messages on the Value of Cryptocurrency” Insights from Big Data Analytics? International Journal of Information Management Data Insights 1, no. 2 (November 2021): 100035. https://doi.org/10.1016/j.jjimei.2021.100035
[13] Jewell, Nicholas P., Joseph A. Lewnard, and Britta L. Jewell. “Predictive Mathematical Models of the COVID-19 Pandemic: Underlying Principles and Value of Projections.” JAMA, April 16, 2020. https://doi.org/10.1001/jama.2020.6585
[14] Abadie, Alberto, Susan Athey, Guido W Imbens, and Jeffrey M Wooldridge. “When Should You Adjust Standard Errors for Clustering” The Quarterly Journal of Economics 138, no. 1 (October 6, 2022). https://doi.org/10.1093/qje/qjac038
[15] Lee, Myoung-jae. “Instrument Residual Estimator for Any Response Variable with Endogenous Binary Treatment.” Journal of the Royal Statistical Society Series B (Statistical Methodology) 83, no. 3 (July 1, 2021): 612-35. https://doi.org/10.1111/rssb.12442
Cite This Article
  • APA Style

    Nyamai, F., Esekon, J., Atitwa, E. (2024). Modelling Petrol Prices in Kenya from 2014 to 2023 Using Sarimax Model: A Case Study of Nairobi County. American Journal of Theoretical and Applied Statistics, 13(4), 85-91. https://doi.org/10.11648/j.ajtas.20241304.14

    Copy | Download

    ACS Style

    Nyamai, F.; Esekon, J.; Atitwa, E. Modelling Petrol Prices in Kenya from 2014 to 2023 Using Sarimax Model: A Case Study of Nairobi County. Am. J. Theor. Appl. Stat. 2024, 13(4), 85-91. doi: 10.11648/j.ajtas.20241304.14

    Copy | Download

    AMA Style

    Nyamai F, Esekon J, Atitwa E. Modelling Petrol Prices in Kenya from 2014 to 2023 Using Sarimax Model: A Case Study of Nairobi County. Am J Theor Appl Stat. 2024;13(4):85-91. doi: 10.11648/j.ajtas.20241304.14

    Copy | Download

  • @article{10.11648/j.ajtas.20241304.14,
      author = {Fidelis Nyamai and Joseph Esekon and Edwine Atitwa},
      title = {Modelling Petrol Prices in Kenya from 2014 to 2023 Using Sarimax Model: A Case Study of Nairobi County},
      journal = {American Journal of Theoretical and Applied Statistics},
      volume = {13},
      number = {4},
      pages = {85-91},
      doi = {10.11648/j.ajtas.20241304.14},
      url = {https://doi.org/10.11648/j.ajtas.20241304.14},
      eprint = {https://article.sciencepublishinggroup.com/pdf/10.11648.j.ajtas.20241304.14},
      abstract = {The requirement for petrol price information is crucial for majority of enterprises. This is because fluctuations in petrol prices impact inflation hence affecting daily lives of citizens. In analyzing the prices of petrol, researchers have employed several models but encountered various limitations. These limitations include; the Error Correction Model can examine only one co-integrating association. The Vector Autoregression (VAR) model does not account for the structural changes in the data. Additionally, the AutoRegressive Integrated Moving Average (ARIMA) model does not take into consideration the seasonal component in the data. The Generalized Autoregressive Conditional Heteroskedasticity (GARCH) model assumes that over time the volatility is constant. Moreover, the Seasonal Autoregressive Integrated Moving Average (SARIMA) model does not integrate the external factors. Hence in this study Seasonal Autoregressive Integrated Moving Average with Exogenous Variables (SARIMAX) model was employed since it captures seasonality in data and incorporates the exogenous variables. The research’s aim was to model prices of petrol in Kenya for the period between 2014 to 2023 with exchange rates as an external factor. Secondary data was obtained from Energy and Petroleum Regulatory Authority (EPRA), Kenya National Bureau of Statistics (KNBS) and Central Bank of Kenya (CBK) websites. R software was used to analyze the data. By the use of historical data of petrol prices and exchange rates, the study sought to fit the best Seasonal Autoregressive Integrated Moving Average with Exogenous Variables (SARIMAX) model, validate the model and predict the petrol prices. The petrol price data was found to be non-stationary using Augmented Dickey Fuller test (ADF). Regular differencing was conducted to make the data stationary. Seasonal differencing due to seasonality component available in the data was also performed. Best SARIMAX model was chosen from various SARIMAX models according to Box-Jenkins methodology which uses least Akaike Information Criterion (AIC) value. SARIMAX (0,1,1)(2,1,2)12 model was selected since it had least Akaike Information Criterion (AIC) value of 656.3733 and the model validated using the hold out technique. The forecasts errors from the training set were; Mean Squared Error (MSE)=10.4970, Root Mean Square Error (RMSE)=3.239911, Mean Absolute Percentage Error (MAPE)=2.309268% while those from the testing set were; Mean Squared Error (MSE)=3271.1012, Root Mean Square Error (RMSE)=57.193542, Mean Absolute Percentage Error (MAPE)=26.695390%. There was less error in the training set than in the testing set as it was expected hence the model suited the data well and could be used for future predictions. The model was then used for five year forecast into the future. This study’s findings will offer sound suggestions to policymakers, businesses and consumers. This study recommends a model to be fitted using other factors affecting petrol prices and fitting Fourier terms, Behavioral Assessment Tools (BATS) and Trigonometric Box-Cox ARMA Trend Seasonal (TBATS) models. },
     year = {2024}
    }
    

    Copy | Download

  • TY  - JOUR
    T1  - Modelling Petrol Prices in Kenya from 2014 to 2023 Using Sarimax Model: A Case Study of Nairobi County
    AU  - Fidelis Nyamai
    AU  - Joseph Esekon
    AU  - Edwine Atitwa
    Y1  - 2024/08/26
    PY  - 2024
    N1  - https://doi.org/10.11648/j.ajtas.20241304.14
    DO  - 10.11648/j.ajtas.20241304.14
    T2  - American Journal of Theoretical and Applied Statistics
    JF  - American Journal of Theoretical and Applied Statistics
    JO  - American Journal of Theoretical and Applied Statistics
    SP  - 85
    EP  - 91
    PB  - Science Publishing Group
    SN  - 2326-9006
    UR  - https://doi.org/10.11648/j.ajtas.20241304.14
    AB  - The requirement for petrol price information is crucial for majority of enterprises. This is because fluctuations in petrol prices impact inflation hence affecting daily lives of citizens. In analyzing the prices of petrol, researchers have employed several models but encountered various limitations. These limitations include; the Error Correction Model can examine only one co-integrating association. The Vector Autoregression (VAR) model does not account for the structural changes in the data. Additionally, the AutoRegressive Integrated Moving Average (ARIMA) model does not take into consideration the seasonal component in the data. The Generalized Autoregressive Conditional Heteroskedasticity (GARCH) model assumes that over time the volatility is constant. Moreover, the Seasonal Autoregressive Integrated Moving Average (SARIMA) model does not integrate the external factors. Hence in this study Seasonal Autoregressive Integrated Moving Average with Exogenous Variables (SARIMAX) model was employed since it captures seasonality in data and incorporates the exogenous variables. The research’s aim was to model prices of petrol in Kenya for the period between 2014 to 2023 with exchange rates as an external factor. Secondary data was obtained from Energy and Petroleum Regulatory Authority (EPRA), Kenya National Bureau of Statistics (KNBS) and Central Bank of Kenya (CBK) websites. R software was used to analyze the data. By the use of historical data of petrol prices and exchange rates, the study sought to fit the best Seasonal Autoregressive Integrated Moving Average with Exogenous Variables (SARIMAX) model, validate the model and predict the petrol prices. The petrol price data was found to be non-stationary using Augmented Dickey Fuller test (ADF). Regular differencing was conducted to make the data stationary. Seasonal differencing due to seasonality component available in the data was also performed. Best SARIMAX model was chosen from various SARIMAX models according to Box-Jenkins methodology which uses least Akaike Information Criterion (AIC) value. SARIMAX (0,1,1)(2,1,2)12 model was selected since it had least Akaike Information Criterion (AIC) value of 656.3733 and the model validated using the hold out technique. The forecasts errors from the training set were; Mean Squared Error (MSE)=10.4970, Root Mean Square Error (RMSE)=3.239911, Mean Absolute Percentage Error (MAPE)=2.309268% while those from the testing set were; Mean Squared Error (MSE)=3271.1012, Root Mean Square Error (RMSE)=57.193542, Mean Absolute Percentage Error (MAPE)=26.695390%. There was less error in the training set than in the testing set as it was expected hence the model suited the data well and could be used for future predictions. The model was then used for five year forecast into the future. This study’s findings will offer sound suggestions to policymakers, businesses and consumers. This study recommends a model to be fitted using other factors affecting petrol prices and fitting Fourier terms, Behavioral Assessment Tools (BATS) and Trigonometric Box-Cox ARMA Trend Seasonal (TBATS) models. 
    VL  - 13
    IS  - 4
    ER  - 

    Copy | Download

Author Information
  • Pure and Applied Sciences, Kirinyaga University, Kerugoya, Kenya

  • Pure and Applied Sciences, Kirinyaga University, Kerugoya, Kenya

  • Pure and Applied Sciences, University of Embu, Embu, Kenya

  • Sections