Forecasting Retail Diesel Prices in Malaysia Using an ARIMA Approach ()
1. Introduction
In Malaysia’s economic landscape, diesel fuel plays a very important role, and becomes the main source of energy that powers a wide array of sectors, including transportation, logistics, agriculture, and various industries [1]. Therefore, changes in diesel prices have a direct impact on the country’s economy. An increase in price, for example, will raise the operating costs of companies that rely heavily on transportation and supply chains [2]. This situation ultimately drives up the prices of goods and services, thereby putting pressure on the inflation rate [2] [3]. For that reason, forecasting the diesel process is not merely an academic exercise, but an important necessity for strategic planning, risk management, and more effective policy making by the government as well as the private sector [4].
In dynamic market, forecasting methods typically use time series analysis, and the Autoregressive Integrated Moving Average (ARIMA) models are regarded as a fundamental basis in the statistical approach [5]. This model is valued for its ability to detect a temporal relationship in data, including trend patterns, seasonal characteristics, and specific cycles [6]. However, the limitation of ARIMA becomes evident when the market is influenced by external factors unrelated to time, such as changes in government policy or global market shocks [7]. Although ARIMA is effective in identifying internal patterns, it is less suitable when dealing with sudden, non-linear changes. The weakness has led to the development of more advanced hybrid models, which combine time series dynamic with the effects of external variables [8].
Forecasting is an important tool in the fields of economics and business as it provides insights that assist in strategic planning and risk management. In Malaysia, diesel prices as a key commodity have a significant impact on various sectors, including transportation, logistics, manufacturing, and agriculture [9]. The price instability makes accurate and reliable forecasting highly necessary, so that policymakers and industry players can anticipate market changes and reduce financial risks. The task of forecasting diesel prices is highly challenging as it is influenced by various factors, both global and economic, such as geopolitical events, crude oil prices, and government subsidy policies. In forecasting, one of the important aspects of this process is the selection of the most appropriate model. This selection is usually guided by statistical criteria such as Akaike Information Criterion (AIC) and Bayesian Information Criterion (BIC), which help balance forecasting accuracy with the level of model complexity [10].
This study focuses on forecasting models by evaluating the performance of the ARIMA model in predicting retail diesel prices in Malaysia. Several recent academic studies highlight the importance of using multiple forecasting models to predict diesel and other energy commodity prices, particularly by emphasizing performance comparison between these models. Recently, the research has focused on evaluating the performance of forecasting models such as ARIMA in predicting crude oil and diesel price, usually in comparison with more advanced methods. In addition, recent studies emphasize that ARIMA and its variants still serve as a benchmark method in forecasting fuel and energy prices. Sakib et al. employed ARIMA and ARIMAX approaches to forecast fuel price behaviors during the pandemic, and the results show the reliability of these models in capturing short term fluctuations [11]. Dar et al. showed that although ARIMA is effective in modeling crude oil price fluctuations, forecasting accuracy can be improved when it is combined with decomposition methods, thereby reinforcing ARIMA’s position as a fundamental tool in forecasting [12]. Similarly, Rusman et al. compared ARIMA with deep learning methods in forecasting product price and found that ARIMA still produces good performance and results under certain condition despite its limitations [13]. All these studies confirm that ARIMA still serves as a solid foundation in evaluating forecasting performance in the volatile energy market.
Simultaneously, scholars have expanded the use of ARIMA by integrating it into a more comprehensive forecasting framework. In a study by Xu et al., ARIMA elements were integrated into an ensemble-based model to forecast crude oil prices. The results indicated that ARIMA provided a strong baseline of accuracy when compared to mixed-frequency methods and sentiment-based approaches [14]. Similarly, Nasir et al. emphasize the effectiveness of ARIMA as part of a traditional statistical forecasting approach, thus confirming its role in predicting economic and energy prices [15]. Overall, these findings strengthen the importance of evaluating ARIMA’s performance in forecasting retail diesel prices in Malaysia. At the same time, it places ARIMA within a broader context in the literature, where this model serves not only a practical tool but also as a benchmark for comparing more complex approaches.
The primary objective of this study is to evaluate the forecasting performance of the ARIMA model. By comparing models using performance metrics like Root Mean Square Error (RMSE) and means absolute error (MAE), we aim to identify the model that can provide the most accurate and reliable forecasts. These performance metrics are important indicators for evaluating of forecasting models, and they have also been commonly used by previous researchers, such as a study in Ghana comparing ARIMA and SARIMA models for petrol and diesel prices demonstrated the effectiveness of using RMSE and MAE to determine the superior model [16]. Similarly, a study on fuel price forecasting during the COVID-19 pandemic highlighted the efficiency of ARIMA by reporting its RMSE and MAE performance metrics [11]. In addition, a comparative analysis between ARIMA and LSTM in oil price forecasting also affirmed the practical importance of these error metrics as a basis for evaluation [17]. The ARIMA component serves to capture the internal dynamics of prices. Recent research in fuel price forecasting, particularly from 2020 to 2025, also reinforces the trend toward using more integrated and advanced models. Previous studies indicate that ARIMA remains relevant in specific regional contexts but also highlights its limitations when facing sudden fluctuation.
The finding of this study is expected to show that the best ARIMA model provides higher forecasting accuracy, making it a more suitable tool for predicting diesel prices in Malaysia. This enhanced ability to forecast prices will support more structured economic planning, more efficient fiscal management, and operational effectiveness, thus contributing to the overall economic stability of Malaysia.
2. Methodology
The Autoregressive Integrated Moving Average (ARIMA) model that was introduced by Box and Jenkins is among the core statistical time series analysis and forecasting methodologies [18]. The ARIMA model is significant in the forecasting of time series. The ARIMA model consists of three parts, and they are the Autoregressive part of order p, AR(p), differencing part of order d, I(d) and the Moving Average part of order q, MA(q) [19]. The stages in the ARIMA model are 3 in number, and they are the model identification, model estimation and model application.
Figure 1. Stages in ARIMA modeling.
Figure 1 shows the three-stage process of building and validating the statistical in ARIMA model. The process begins with Stage 1: Model Identification, where the initial structure of the model is determined. This step involves examining the time series data to assess its stationary and applying differencing if necessary. The Autocorrelation Function (AFC) and Partial Autocorrelation Function (PACF) plots are then analyzed to guide the selection of appropriate model order (p,d,q). The procedure continues with Stage 2: Model Estimation, Validation Diagnostic and Statistical Test. If the model fails to meet adequacy criteria, it will revise and the estimation validation cycle is repeated until satisfactory performance is achieved. Finally, in stage 3: Model Application, the validated ARIMA model is implemented for forecasting purpose. At this stage, the model is applied to generate predictions evaluate its practical utility is capturing the underlying dynamics of the time series.
2.1. Stage 1: Model Identification
The first step in Model Identification stage is the selection of an appropriate order of ARIMA (p, d, q) which is guided by the properties of the time series and informed by the ACF and PACF plots. This process begins with verifying the stationary of the data, followed by differencing id required, and finally analyzing the ACF and PACF plots to determine the autoaggressive and moving average components.
Stationarity Check: Establishing stationary is the most critical preliminary step in ARIMA modeling. A time series is considered to be stationary if the statistical characteristics, including the mean, variance, and autocorrelation structure, are remain constant over time. Visual inspection of the time series plot is often used to detect non-stationary patterns, such as trends or variance shifting. To confirm this formally, the specified statistical tests like the Augmented Dickey-Fuller (ADF) test, are employed to test the presence of unit roots that indicate the presence of non-stationarity.
Differencing (d): When the series is found to be non-stationary, differencing is applied to stabilize the mean and remove the trends, in order to achieve stationarity. The differencing order (d) will be determined based on the minimum number of differences required to achieve stationary. For example, the first-order difference can be expressed mathematically as Equation (1):
(1)
where
represents the original series and
is the differenced series.
ACF and PACF Analysis: once stationary is achieved, the ACF and PACF plots of first differencing series are examined. The ACF plot is used to identify the order of the Moving Average components, q, by observing the lag values at which autocorrelation becomes insignificant. Conversely, the PACF plot is employed to determine the number of terms in the Autoregressive component, p, by indicating the lag beyond which the partial autocorrelations diminish. The characteristic patterns observed in these plots, such as significant spikes, decay patterns, serve as diagnostic tools for specifying an appropriate ARIMA model structure.
2.2. Stage 2: Model Estimation
From the term obtained from AR(p), I(d), and MA(q), we have the different combinations between those 3 terms. Hence, using the combination, the best model to forecast is measured by using AIC (Akaike’s Information Criterion). The lowest value indicates the best modelling model, which is given by Equation (2):
(2)
where, k is the number of estimated parameters in the model and
is the maximum values of likelihood function for the model.
2.3. Stage 3: Model Application
In practical use, the validated forecasting model is applied to generate predictions of future events. This represents the final, action-oriented stage of the forecasting process, where the model transitions from a purely statistical construct into a functional tool for informed decision-making.
The accuracy of the ARIMA model’s forecasts is rigorously evaluated using four performance metrics: on Mean Squared Error (MSE), Root Mean Square Error (RMSE) and Mean Absolute Error (MAE) and Mean Absolute Percentage Error (MAPE). These metrics quantify the average magnitude of the forecasting errors and are given by the following Equations (3)-(6).
(3)
(4)
(5)
(6)
where,
= actual value at time
.
= forecast value at time
.
= number of observation.
3. Results and Discussion
The study uses diesel load profiling data from the Malaysian public data portal, which is the sampling data that start in week 4 of March 2017 and concludes in week 4 of July 2025, with a weekly data frequency that allows readers to reproduce the analysis. The descriptive statistics of the time series data are presented in Table 1:
Table 1. Descriptive statistic.
Mean |
2.24 |
Maximum |
3.35 |
Minimum |
1.40 |
Standard deviation |
0.37 |
Skewness |
1.37 |
Kurtosis |
2.00 |
Observation |
420 |
The mean of diesel fuel during the period was approximately 2.24 with values ranging from a minimum of 1.4 to a maximum of 3.35. The standard deviation was 0.37, indicating relatively low variation around the mean. The positive skewness value of 1.36 suggests an asymmetrical distribution with a longer right tail, reflecting the presence of unusually high prices. The kurtosis of 2.00 indicates a flatter peak and lighter tails compared to a normal distribution, implying that extreme values occurred less frequently.
In the initial stage, a preliminary data investigation was conducted to understand the fundamental characteristic and to detect any unusual pattern or characteristic existing. A simple time plot with a fitted linear trend was constructed for this purpose. As illustrated in Figure 2, the series appears to be non-stationary. No evident seasonal component is detected. However, abnormality high values around 70th observation and unusually low values around the 280th observation suggest the presence of outliers or irregular disturbances in the data. These values are extreme, but they accurately reflect real, significant economic or policy shifts that are part of the diesel price history (e.g., the high value is a spike due to a global supply disruption; the low value is due to a sudden, temporary government subsidy). However, the values are not errors but true market reflections of the price mechanism under stress. Excluding or altering them would misrepresent the actual volatility and reduce the model’s ability to forecast during extreme conditions, especially relevant for risk assessment. Despite the existence of these extreme values, this time series still needs to be processed to achieve stationarity before modeling to ensure the model’s assumptions are met. The process of converting the data to a stationary time series will be implemented in the subsequent methodology section using the differencing method.
![]()
Figure 2. Time plot of
and trend line.
A shown in Figure 3, the autocorrelation function (ACF) of the original series exhibits a slow decline, indicating the diesel data are not-stationary. In contrast, Figure 4 presents the PACF plots, which display one significant spike at lag 1 followed by smaller spike at higher lags. This pattern suggests that the series can be made stationary through performing first differencing.
Figure 3. The ACF of the Diesel (Original data).
Figure 4. The PACF of the Diesel (Original data).
Formal statistical tests were performed using the Augmented Dickey-Fuller (ADF to evaluate the stationarity of the diesel price series. The test results indicated the presence of a unit root, confirming that the original series was non-stationary. Specifically, the ADF test yielded a p-value of 0.2369 which exceeds the standard conventional significance threshold of 0.05. Consequently, the null hypothesis of non-stationary could not be rejected. To achieve stationarity, the series was transformed through a first-order differencing (d = 1).
The resulting time series of the differenced data, illustrated in Figure 5 and Figure 6, provides a visual indication of stationarity, as the series fluctuates around a constant mean without displaying any trend.
Since applying a single level of differencing (d = 1), the repeated ADF test confirmed that the new time series was now stationary, proving that a single difference was sufficient to remove the original series’ trend. Attempts to use a second difference (d = 2) were found to cause over-differencing. Therefore, the differencing order (d = 1) is optimal and sufficient valid ARIMA modeling.
Figure 5. The ACF of the Diesel (first differencing).
Figure 6. The PACF of the Diesel (first differencing).
Following differencing, the Autocorrelation Function (ACF) and Partial Autocorrelation Function (PACF) plots of the transformed diesel price series were generated, as presented in Figure 7. These diagnostic plot serves as essential tools for identifying the potential autoregressive (p) and moving average (q) order of the ARIMA model, consistent with the methodology adopted in the reference study. The ACG plot exhibits significant spikes at several lags that gradually decay, indicating the presence of a Moving Average (MA) component in the series. Meanwhile, the PACF plot highlights distinct cut-offs at several lags that gradually decay, indicating the presence of a Moving Average (MA) component in the series. Meanwhile, the PACF plot highlights distinct cut-offs at specific lags, which are suggestive of an Autoregressive (AR) process. Together, these observations provide an initial basis for specifying the candidate ARIMA model parameters.
Based on the patterns observed in the ACF and PACF plots of the differenced series, several candidate ARIMA(p,d,q) model specifications were identified. These models were subsequently estimated, and their relative performance was assessed using Akaike’s Information Criterion (AIC), the Bayesian Information Criterion (BIC). In both cases, lower values indicate a better balance between model fit and parsimony. The corresponding AIC and BIC values for the competing models are reported in Table 2. Furthermore, by examining the significant spikes observed in the ACF and PACF plots (as illustrated in Figure 5 and Figure 6), the most plausible ARIMA structures were determined. A summary of these identified models is provided in Table 2.
Figure 7. Forecast diesel price with an ARIMA (1, 1, 0) model.
Table 2. Potential ARIMA models and AIC and BIC values.
Models |
AIC |
BIC |
ARIMA (1, 1, 0) |
−1079.97 |
−1071.89 |
ARIMA (0, 1, 1) |
−1079.81 |
−1071.74 |
ARIMA (1, 1, 1) |
−1079.1 |
−1066.98 |
ARIMA (2, 1, 0) |
−1078.43 |
−1066.31 |
ARIMA (0, 1, 2) |
−1078.28 |
−1066.17 |
ARIMA (2, 1, 1) |
−1077.1 |
−1060.94 |
ARIMA (1, 1, 2) |
−1077.1 |
−1060.95 |
Based on the results presented in Table 2, ARIMA (1, 1, 0) specification was identified as the optimal model was, as it yielded the lowest AIC value of -1079.97, thereby making it the most statistically appropriate choice among the competing models. In addition, the BIC values supported this selection with the lowest BIC, which is −1071.89, further reinforcing the robustness of the chosen model. The ARIMA (1, 1, 0) model was implemented using the forecast package in R Studio, and its mathematical representation is provided in Equation (7).
(7)
where:
= the value of the time series at time
,
= the autoregressive coefficient at lag one,
= the white noise error term at time
.
Figure 7 illustrates the time series of historical data along with the forecast generated by the ARIMA (1, 1, 0) model. The historical observations, plotted as a solid black line, cover approximately 420 time periods and display non-stationary characteristics, including a downward trend and noticeable fluctuations. The blue line extending beyond the end of the historical series represents the model’s point forecasts for the future values. Accompanying the forecast are two prediction intervals: the darker shade region corresponds to the 80% confident interval, while the lighter shaded region reflects the 95% confidence interval. As expected, the width of these intervals increases with forecast horizon, illustrating the growing uncertainty in long-term projections, which is a well-recognized feature of the time series forecasting.
The prediction accuracy and feasibility of the ARIMA forecasting model were evaluated using namely Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), and Mean Absolute Percentage Error (MAPE). The error metrics were calculated on a hold-out set to ensure an objective assessment of the model’s forecasting performance and to prevent overfitting. For this purpose, the data sample was divided into two, which is the data from March 2017 to March 2024 used as the training data and data from April 2024 to July 2025 serving as the testing data (hold-out) data. All primary error metrics, including RMSE, MAE, and MAPE, are reported based on the model’s performance on this testing data, thereby directly presenting the out-of-sample accuracy, which provides a purer measure of the model’s capability to forecast future diesel price data. The results, as summarized in Table 3, demonstrated that the ARIMA (1, 1, 0) model produced a notably low MSE of 0.0094 and an RMSE of 0.1384. In addition, the MAE and MAPE were recorded at 0.0320 and 1.263, respectively. These relatively low error values confirm that the ARIMA model provided excellent forecasting performing, reflecting both high accuracy and strong reliability in capturing the dynamic of the diesel price series.
Table 3. ARIMA model evaluation.
Evaluation Metrics |
ARIMA Model |
MSE |
0.0094 |
RMSE |
0.1382 |
MAE |
0.0320 |
MAPE |
1.263 |
4. Conclusions
This study successfully analyzed historical weekly diesel fuel prices using Autocorrelation Function (ACF) and Partial Autocorrelation Function (PACF) plots to identify non-stationary and non-seasonal patterns. The results demonstrate that the Autoregressive Integrated Moving Average (ARIMA) model effectively captures the stochastic behavior of the time series data, providing a robust framework for forecasting. Comprehensive residual diagnostics confirmed the model’s reliability by showing no significant patterns in the residuals, validating that it captured all relevant information from the dataset. Predictive performance, evaluated through testing data forecasts, proved the model’s accuracy.
The findings highlight the ARIMA (1, 1, 0) model as a statistically sound and reliable forecasting tool for diesel price dynamics. This is consistent with existing literature on commodity price forecasting, which also affirms the effectiveness of time series models for predicting volatile energy markets. The establishment of this validated model offers substantial value, particularly for Malaysia. Accurate forecasts provide robust, actionable insights for policymakers and industry stakeholders, enhancing their ability to anticipate price movements for improved economic planning and management. For instance, the government can use these forecasts to strategically manage fuel subsidies and ensure fiscal stability. Furthermore, businesses in the transportation and logistics sectors can leverage these insights to optimize operational costs and improve supply chain efficiency. On a microeconomic level, accurate forecasts benefit consumers by supporting informed financial decisions in transportation and household budgeting, thereby promoting effective resource allocation.
Nevertheless, future research could explore the integration of hybrid or machine learning-based models to further improve accuracy and account for exogenous factors such as crude oil price fluctuations, exchange rates, or geopolitical events that may influence diesel price volatility. Such advancements would provide a more comprehensive forecasting framework and strengthen the model’s applicability in dynamic and uncertain energy markets. This approach would also align with recent trends in the field that aim to incorporate a broader range of variables for superior predictive performance. The results also practically provide values for policymakers and industry stakeholders by supporting evidence-based decision-making, facilitating effective economic planning, and optimizing resource management.
Acknowledgements
Special appreciation to reviewers for the useful advice and comments. The authors would like to acknowledge Universiti Teknikal Malaysia Melaka, and those who gave support in carrying out this research. Authors also like to thank Universiti Teknikal Malaysia Melaka for sponsoring this work under the Tabung Insentif Penerbitan 2025, Universiti Teknikal Malaysia Melaka.