The Comparison between ARIMA and ARFIMA Model to Forecast Kijang Emas (Gold) Prices in Malaysia using MAE, RMSE and MAPE

Gold is known as the most valuable commodity in the world because it is a universal currency recognized by every single bank across the globe. Thus, many people were interested in investing gold since gold market was always steadier compared to other investment (Khamis and Awang, 2020). However, the credibility of gold was questionable due to the changes in gold prices caused by a variety of circumstances (Henriksen, 2018). Hence, information on the inflation of gold prices were needed to understand the trend in order to plan for the future in accordance with international gold price standards. The aim of this study was to identify the trend of Kijang Emas monthly average prices in Malaysia from the year 2010 to 2021, to determine the best fit time series model for Kijang Emas prices in Malaysia and using univariate time series models to forecast Kijang Emas prices in Malaysia. The ARIMA and ARFIMA models were used in this study to model and forecast the prices of gold (Kijang Emas) in Malaysia. Each of the actual monthly Kijang Emas prices for 2021 were found to be within the 95% predicted intervals for both the ARIMA and ARFIMA models. The performances for each model were checked by considering the values of MAE, RMSE and MAPE. From the findings, all the MAE, RMSE and MAPE values showed that the ARFIMA model emerged as the better model in forecasting the Kijang Emas prices in Malaysia compared to the ARIMA model.


INTRODUCTION
In the commodity market, gold is a precious metal and also known as stock contract goods. According to World Gold Council (2019), gold has been described as a highly liquid but limited commodity that can be bought as an investment as well as a luxury item like jewelleries. As a result, gold can provide long-term returns. During the global economic crisis of 2008, a wide range of financial goods performed poorly except for gold market (Yang, 2018). During the disease outbreak of Coronavirus Disease 2019 , the increasing number of COVID-19 cases globally has positively impacted gold prices because of the uncertainty about the upcoming economic situations created due to the pandemic (Yousef and Shehadeh, 2020). The market price of the commodity rose to acquire the highest possible level in history of US$2,067.15 per ounce on 7 August 2020, when the average level of gold price remained between US$1,100 and US$1,300 from 2014 to early 2019 (Pistilli, 2021).
When analysing the long-term performance of gold as an investment, the period of time under evaluation of the gold was really essential. According to Eryigit (2017), the price of gold as a safe refuge over the longer terms of period has been proven and it remained important to some investors, but this condition might rely on various factors such as crude oil prices, inflation rates, interest rates, and stock indices. According to a research by Guha and Bandyopadhyay (2016), it was said that people, especially economists, needed information on gold price inflation in order to plan their future economies in accordance with international gold price standards. Gold investment was one of the most popular types of investment because gold has been regarded as a secure and tempting investment for decades, with the investors purchasing gold not only for the purpose of stockpiling the metal, yet also as risk decrement strategy (Zainab and Neha, 2019). There were two forms of gold property available in Malaysia which were the physical gold and gold accounts (Razimi, Shahril, Romle and Azizan, 2017). Customers can purchase the tangible gold from bank, and each transaction would get a Gold Certicard (certificate). Similarly, a gold account can be bought offline from the counter or via online banking, and all transactions were conducted in Malaysia Ringgit (Johan, 2020).
The volatility of gold prices is difference in every country (Gunaseelan and Kesayan, 2016). Therefore, it would be useful to analyse and forecast the trend of gold prices. In this study, time series models were used to assume advanced predictions. Various time series models had been used to model gold prices both in Malaysia and elsewhere. The Autoregressive Integrated Moving Average (ARIMA) model is a data analysis model that utilizes time series data to better comprehend the data set or forecast upcoming trends (Hayes, 2021). According to Hayes, an ARIMA model would estimate a company's profitability based on previous periods or predict a stock's future prices based on prior performance. However, in some cases, the time series data also had a long memory correlation especially in econometrics (Granger and Joyeux, 1980). For such situations, the time series analysis method that can be applied is the Autoregressive Fractionally Integrated Moving Average (ARFIMA) model. According to Bhardwaj and Swason (2006), the ARFIMA model not only could handle non-stationary data, it also had better forecast accuracy for long memory data compared to the ARIMA model. This was based on the fact that the fractionally differenced parameters of the ARFIMA model could describe the causal correlation in data with a short memory, a long memory, or both at the same period. An ARFIMA process was also commonly applied in the study of macroeconomic and financial data, both of which were covered in econometrics (Bhardwaj & Swason, 2006). According to Hoong (2021), investors bought gold as a protection against economic instability since gold had been proven to hold its value in volatile market conditions. Although, gold is not responsible for the large price changes or extreme volatility, it was acknowledged to always be rising in value as its uses as the consumer preferences expand. Furthermore, because gold is a valuable commodity with a constant resource, the marketplaces were worth keeping an eye on, and predicting gold prices within the next ten years could often result in a favorable return within this time frame (Gorn, 2021). According to Hashim, Ramlan, Razali and Nordin (2017) that studied on the macroeconomic indicators that had an effect on the volatility of gold values, it was shown that only crude oil prices and real interest rates were found to have a remarkable positive affiliation with gold prices and the most important factor that influenced the gold prices was the real interest rate. Besides, changes in the US dollar, which serves as the gold price's standard, also have an impact on worldwide gold prices. As a result, lower US dollar is more likely to attract investors to invest in gold. There have recently been demands for gold to be used as a haven asset to protect investors from the volatility of cryptocurrencies (Hoong, 2021).
Economic disruption caused by the Movement Control Order during the COVID-19 outbreak has resulted in decreased productivity because of decreasing demand for goods and services (Hoong, 2021). According to Hoong (2021), some businesses were negatively affected, and investors were experiencing negative investment returns. As a result, some investors had transferred their capital from the stock market and other investments to the gold market, which was seen as a safer shelter for their money. Nevertheless, the news of the revelation of vaccine for COVID-19 has brought comfort to all people on earth including Malaysians who have seen the main cause of the recent rapid drop in the prices of gold. Gold appeared to have lost its appeal as a haven asset then as it was said that the threat of COVID-19 which had caused the gold price to rise prior to the disclosure of the COVID-19 vaccine discovery had encouraged business analysts and investors to expect a recovery in the global economy (Bernama, 2020).
In general, the purpose of gold as a safe haven property was questionable (Henriksen, 2018). Therefore, the prediction of gold price is an important study as such situations and trends can be better understood if we could model and predict the gold prices in Malaysia. Time series models are known as the useful tools for forecasting, and they had been used in variety fields of study including gold. Since gold has been known as an instrument of investment in econometrics situation and suitable for every period of time, therefore the appropriate forecasting methods that can be used to predict the performance of gold prices are the ARIMA and ARFIMA models. To the best of our knowledge, there is still a lack of study done using the ARIMA model involving recent data. For example, the study of forecasting Kijang Emas prices in Malaysia conducted by Khamis and Awang (2020) used the data from January 2011 until February 2017 only. We also found no study on forecasting the Kijang Emas prices in Malaysia for recent years using the ARFIMA model.
Therefore, this study focused on the modelling and predicting of Kijang Emas prices in Malaysia using both the ARIMA and ARFIMA models. In the next section on Methodology, the dataset and the models used in this study together with the time series modelling procedure are presented. The subsequent section will discuss the results and the comparison of the performances of each model's forecast ability. Lastly, the conclusion of this study as well as some recommendations for further study are included in the final section.

METHODOLOGY The Dataset
This study used the data of Malaysia's gold prices which are also known as Kijang Emas prices that were obtained from Bank Negara Malaysia's website (Bank Negara Malaysia, 2021). A total of 139 monthly average dataset that were used in this study contained the selling prices of one ounce or 31.105 grams Kijang Emas from January 2010 until July 2021. The data consisted of between two and five-day weekly data as there could be no trace of trade prices for some selected occasions due to holidays or market closing days. The monthly average data which was calculated based on the daily data was done using Microsoft® Excel®. The time series plot of the monthly average is as presented in Figure 1. The plot shows a fluctuating series from January 2010 to July 2021 with a gradual overall increasing trend.

ARIMA and ARFIMA Models
The Autoregressive Integrated Moving Average (ARIMA) models combined the autoregressive (AR) and moving average (MA) functions. Sato (2013) claimed that the ARIMA model was invented by George Box and Gwilym Jenkins as an attempt to describe changes on the time series using a mathematical approach in the 1970s. According to Lazim (2018), this model was created when the variable's stationarity assumption was not met. ARIMA (p, d, q) is the general term for this ARIMA model, where p is the order of the AR process, q is the order of the MA process, and d is the order of the integration or differencing process. Since definition of d is a non-negative integer, then {Xt} is an ARIMA (p, d, q) process if Yt = (1 − ) d t is a causal ARMA (p, q) process (Brockwell and Davis, 2002). Brockwell and Davis (2002) stated that {Xt} satisfies a difference equation of the form as given in Equation (1), where { t} ~ WN (0, 2 ). (z) and (z) are polynomials of degrees p and q, respectively, where (z) ≠ 0 for |z| ≤ 1 and B is the backward shift operator. The polynomial *(z) has a zero of order d at z = 1. The process {Xt} is stationary if and only if d = 0, in which case it simplifies to an ARMA (p, q) process.
The Autoregressive Fractionally Integrated Moving Average (ARFIMA) model (p, d, q) can be extended by including AR and MA and also the fractional difference. ARFIMA is a stationary process with a slower declining autocorrelation function (ACF) that can be used in modelling long-run memory process with 0 < |d| < 0.5. The ARFIMA model is written as in Equation (2), where { t} ~ WN (0, 2 ). ( ) and ( ) are polynomials of degrees p and q, satisfying ( ) ≠ 0 and ( ) ≠ 0 respectively for all z such that |z| ≤ 1, and B is the backward shift operator. (1 − ) d is defined by the binomial expansion as in Equation (3), where ∏ indicates the gamma function and the parameter d can be assumed as any real number (Brockwell and Davis, 2002).

Time Series Modelling Procedure
For the purpose of time series modelling, a total of 139 observations for monthly average Kijang Emas prices were divided into two parts. The first part was used to fit the ARIMA and ARFIMA models by using data from January 2010 to December 2020. In the second part, the remaining 7 observations from January to July 2021 were applied for the post sample forecast accuracy check. The model fitting for the ARIMA and ARFIMA models were done by using the computer software 'ITSM2000'. The forecast accuracy check was measured using the Mean Absolute Error (MAE), Root Mean Squared Error (RMSE) and Mean Absolute Percentage Error (MAPE) as given in Equations (4), (5) and (6) respectively, where is the actual observed value, ̂ denotes the estimated values and n denotes the number of estimated values. Figure 2 displays the time series for Kijang Emas prices from January 2010 to December 2020, which consists of 132 observations. Since the plot in Figure 2 is not stationary and shows a linear trend, a Box-Cox transformation with the parameter value (λ = 0) was used to stabilize the variance and a differencing at lag 1 was applied to the series to eliminate the linear trend. Figure 3 shows a stationary plot of the transformed series after the mean was deducted. The autocorrelation function (ACF) and partial autocorrelation function (PACF) residual plots presented in Figure 4 is used to validate the model found. The model fitting for ARIMA models was done by using the computer software 'ITSM2000'. The 'Autofit' option was used in finding the maximum likelihood estimators with the lowest AICC value where AICC implies the bias-corrected version of Akaike Information Criterion (AIC) (Brockwell and Davis, 2002). After specifying the upper bound and lower bound for p and q, the program will choose the pair (p, q) with the smallest AICC statistic value that can be described through Equation (7) where the likelihood function is given by L in Equation (8) and S in Equation (9). Note that denotes E( +1 − ̂+ 1 ) 2 found recursively from the innovations algorithm with defined in Equation (10) The best fit model will then be used to forecast 7 months ahead from January to July 2021. The simplified steps of the modelling procedure using 'ITSM2000' software for this study is as given below.
Step 1: Obtained the Time Series plot (as in Figure 2).
Step 2: Applied Box-Cox Transformation to stabilize the variance of the series using the parameter values of = 0.
Step 3: Differenced at lag 1 to remove the linear trend to obtain a stationarised time series (see Figure 3).
Step 4: Subtracted mean and fitted a time series model with the lowest AICC value using the 'Autofit' function.
Step 5: The residual ACF and PACF plots of the series were obtained (Figure 4) to check on the validity of the model found in Step 4. If 95% of the spikes in the plots were within the two horizontal boundaries (lines) in the residual plots, then the model found is valid.
Step 6: Forecasted using the best fit model.
The Steps 1 -3 remained the same when fitting the ARFIMA model except that a declaration of the value of d to be fractionally integrated (non-integer) had to be specified before proceeding with Step 4.

ARIMA Model for Kijang Emas Price
Based on the lowest AICC value obtained using the 'autofit' option in 'ITSM2000' as described in the Time Series Modelling Procedure above, ARIMA (1, 1, 1) model was found to be the best model in its class. The model is given by Equation (11), where { } ~ WN (0, 0.001029). The forecasted values together with their 95% confidence intervals found using the ARIMA (1, 1, 1) model for the monthly Kijang Emas prices in Malaysia from January to July 2021 together with their actual values are tabulated in Table 1 while the plots of the values are displayed in Figure 5. The ARIMA (1, 1, 1) model seems appropriate as each of the actual Kijang Emas price fell inside the 95% estimated intervals when forecasting using the model.

ARFIMA Model for Kijang Emas Price
Similarly, as explained in the Time Series Modelling Procedure given in the earlier section, the best ARFIMA model was found using the lowest AICC value too. However, the value of d is fractionally integrated to be between −0.5 and 0.5. The ARFIMA (1, 0.07694, 1) model emerged as the best model and is as given in Equation (12).
(1 − ) 0.07694 ( + 0.8447 −1 ) = + 0.9694 ( −1) where { } ~ WN (0, 0.001056). The forecasted values and the 95% confidence intervals using the ARFIMA (1, 0.07694, 1) model together with the actual values for the monthly Kijang Emas prices in Malaysia from January to July 2021 are as given Table 2. Figure 6 shows the plots of the values tabulated in Table 2. When forecasting using the ARFIMA (1, 0.07694, 1) model, it is clear that all of the actual Kijang Emas prices were found to be within the 95% forecast boundaries. The ARFIMA (1, 0.07694, 1) model is also a suitable model in forecasting the Kijang Emas prices.

Comparison between the ARIMA and ARFIMA Models
This section will compare the performances of the forecast ability for both the ARIMA and ARFIMA models since they were able to forecast the Kijang Emas prices from January to July 2021 to be within the 95% forecast intervals. In this study, a better forecast model would have lower forecast errors which are represented by the values of MAE, RMSE and MAPE. It is obvious from

CONCLUSION AND RECOMMENDATIONS
It is obvious that forecasting could be done to better understand the pattern of gold prices in Malaysia. The overall pattern of the monthly average Kijang Emas prices in Malaysia from the year 2010 to the year 2020 showed a gradual increasing linear but fluctuating trend. The purpose of this study is to model and forecast the Kijang Emas prices in Malaysia using time series models namely, the ARIMA and ARFIMA models. The entire actual monthly Kijang Emas prices from January to July 2021 were found to be inside the range of the 95% forecast intervals for both the ARIMA and ARFIMA models. The performances for each model were checked by considering the MAE, RMSE and MAPE values and the ARFIMA model emerged to be the better model in forecasting the Kijang Emas prices in Malaysia compared to the ARIMA model. In this study, the long memory model (ARFIMA model) performed better than the short memory model (ARIMA model) in forecasting the Kijang Emas prices. As mentioned in a previous study by Azzutti (2016), the ARIMA model was the best model in forecasting gold prices, but it is not the case in this study. As a result, it is evident that updating the models when new data become available is both recommended and necessary.
Since the proposed models used in the study were univariate time series models which only considered the data alone. For further study, we recommend applying other forecasting models like the Vector Autoregression (VAR) or Generalized Autoregressive Conditional Heteroscedasticity (GARCH) models.