Modeling and Forecasting Consumer Price Index (Case of Rwanda)

Consumer price index is a measure of the average change over time in the price of consumer items, goods and services that households buy for day to day living. It is one of the main indicators of economic performance and also the key indicator of the results of the monetary policy of the country, because of its wide use as a measure of inflation. The main objective of this research was to model the dynamic of CPI and to forecast its future values in the short term. Therefore, to come up with a model and forecasts of CPI, Box and Jenkins methodology were used which consists of three main steps; Model Identification, Parameter Estimation and Diagnostic Checking. Therefore, ARIMA (4,1,6) was selected as a potential model which can fits well data, as well as to make also accurate forecast. Hence, the forecast was made for 12 months ahead of the year 2016, and the findings have shown that the CPI was likely to continue rising up with time.


Introduction
The consumer price index (CPI) is a measure of the average change over time in the price of consumer items, goods and services that households buy for day to day living. Compiled and Published by National Institute of Statistics of Rwanda every month in direct collaboration with National Bank of Rwanda. The CPI is an economic indicator and most widely used as a measure of inflation. A price index is typically assigned a value of unity, in some reference period and the values of the index for other periods of time are intended to indicate the average proportionate, or percentage, change in prices from this price reference period. Generally, it provides timely information about the rate of inflation, it is also used to adjust pensions and social security benefits in order to offset the cost of life fluctuation for the welfare of the population.
To ensure and maintain price stability are among of the main objective of National Bank of Rwanda, with a focus on price stability while taking into account of the implications of monetary policy for the economic activity and, therefore, price stability is a crucial precondition sustained economic growth. Also, it agrees on the importance of low inflation which assist businesses in making sound investment decisions, creation of jobs, protect the savings of populations and preserve the value of the national currency. In pursuing the goal of medium-term to long-term price stability, the National Bank of Rwanda also agrees with the government on the objective of keeping consumer price inflation low and stable [1]. Therefore, CPI is one of the main indicator of economic performance and the key indicator of the results of the monetary policy of the country. Different researchers have tried to model the CPI using different techniques. [2] modeled and forecasted Croatia's CPI by using univariate seasonal ARIMA models, but precisely they wanted to examine if separate modeling and aggregating of sub-indices improves the final forecast of the all items index. Their conclusion suggested that the most precise forecasts of all items CPI are obtained by first forecasting the index's components and then aggregating them to obtain the all items index. Also, [3] developed a short-term inflation forecasting by using structure time series models for each CPI component constructed at a certain level of disaggregation. Short-term forecasts of the all items CPI was made as a weighted sum of the twelve CPI components forecasts.

Statement of the Problem
Inflation is directly calculated from CPI and it is considered to be a major problem in transition economies and thus fighting inflation and maintaining stable prices is the main objective of monetary authorities like Central Bank. The negative consequences of inflation are well known, it can result in decrease in the purchasing power of the national currency leading to the aggravation of social conditions and living standards. High prices can also lead to uncertainty making domestic and foreign investors reluctant to invest in an economy [4]. However, the update of the indicator is not always insured to be published on time, and on the other hand, to identify the factors which determines its evolution in coming months, future years, make a major problem facing decision makers and investors. And also, such information would enable the central Bank to predict the future macroeconomic development and to react in proper manner to shocks the economy is subjected to. In that context, the monetary authorities to set the monetary policy today, must necessarily justify theirs decisions based on inflation evolution in future. Therefore, the interest to resort to statistical modeling of CPI, which goes together with inflation. In this regard, the National institute of statistics of Rwanda which is responsible in producing and publishing this statistical information, should be in good position to respond to this question; "how can you describe the dynamic of CPI in Rwanda?" That is why the interest of this research, to model and forecast future value of CPI.

Justification
CPI is probably one of the most important indicator available in an economy, and many other indicators derive most of their value from the predictive ability of the CPI like inflation. And also, inflation is well known as a fragile indicator to be taken care of in any economy around the world, for the catastrophic damage that it may cause to the country when ignored. Therefore, the aim of this project is to model and forecast the future value of CPI which will be of great significant to policy makers, investors and also to the Central Bank in setting consequently monetary policies.

Moving Average (MA) Models
It is one of the approach used in modeling univariate time series data, where the observed time series depends on a weighted linear sum of past random chocks. Hence, the process { , ∈ ℤ} is said to be a moving average of order q if Where , ⋯ are constants, and are random white noise.
In fact, a MA model corresponds simply to a linear regression of the current value of the series against the random shocks of one or more prior values of the series. The disadvantages of fitting a moving average model is that it depends only on the error terms that are not observable, and the past output are not considered.

Autoregressive (AR) Models
Another approach used in modeling univariate time series is Autoregressive model, where the current observed value is assumed to be a function of past values plus a random chock. The process { } is said to be an autoregressive of order p, denoted by AR (p) if, So an autoregressive model corresponds simply to a linear regression of the current value of the series against one or more prior values of the series. Therefore, one can determine easily the current output, but the weakness of Autoregressive model is that the past disturbances are not considered.

ARMA Models
Another useful model of time series is formed by combining MA and AR processes. An ARMA model consists according to his name of two components: the weighted sum of past values (autoregressive component) and the weighted sum of past errors (moving average component). Then, the process { } is an ARMA (p,q) process if, Using Backward Shift Operator, the above equation can be written as, Hence the more concise form, # = # (4) The stationarity of ARMA process depends on AR part only, and the invertibility depends on MA part only. Therefore, the process will be stationary if the root of the equation # = 0 lies outside unit circle. And the process is said to be invertible if the root of the equation # = 0 lies outside unit circle.

ARIMA Models
The class of ARMA models has been already discussed for representing stationary series. So if the series is not stationary Box and Jenkins recommend differencing the time-series to achieve stationarity. Doing so produces a so-called ARIMA model, where the acronym "I" stands for integrated.
The model has the form; Where # and # are polynomials of degrees p and q respectively and 1 − # % = ∇ % is the differencing operator and d represent the order of differencing the series.

Box and Jenkins Methodology
After describing various time series models, Statisticians George Box and Jenkins developed a practical approach to build ARIMA model, precisely concerning about how to select an appropriate model that can produce accurate forecast based on a description of historical pattern in the data and how to determine the optimal model orders which best fit to a given time series and also satisfying the parsimony principle. The Box-Jenkins methodology does not assume any particular pattern in the historical data of the series to be forecasted. Rather, it uses a three step iterative approach of model identification, parameter estimation and diagnostic checking to determine the best parsimonious model from a general class of ARIMA model. This three-step process is repeated several times until a satisfactory model is finally selected. Then this model can be used for forecasting future values of the time series.

Model Identification
Once the series is confirmed to be stationary, one may proceed by tentatively choosing the appropriate order of models through visual inspection of plots, both the Autocorrelation Function (ACF) and Partial Autocorrelation Functions (PACF).
The relevant properties are set out as follows; The series exhibit an AR (p) process, if the ACF decays exponentially (either direct or oscillatory) and PACF cut off after lag p.
The series exhibit a MA (q) process, if the PACF decays exponentially (either direct or oscillatory) and ACF cut off after lag q.
The series exhibit an ARMA (p, q) process, if the PACF decays exponentially (either direct or oscillatory) and ACF decays exponentially (either direct or oscillatory)

Parameter Estimation
The parameters , and are estimated by the conditional maximum likelihood, and it is supposed that the errors are independent and normally distributed.
Where the logarithm is introduced to get the conditional log-likelihood; Where D * , = ∑ , ,/ * ' , * , In the conditional sum of squares function, the quantities E and F which maximize the log-likelihood are called the conditional maximum likelihood estimators.
The estimators that maximize the conditional likelihood function are the same which minimize the conditional sum of squares function D * , which we note doesn't contain the parameter .
Once the values of E and F have been estimated (these do not depend on the value is obtained by maximizing ln 6 * , , with respect to .
Hence E = ' D * , K F

Diagnostic Checking
Once a model has been fitted, the final step is the diagnostic checking whether the model assumptions are satisfied. The basic assumption is that the residuals behave like white noise, where the errors are uncorrelated with zero mean and constant variance.
To test the autocorrelation of residuals Box-Ljung Test is used, and its statistic is defined as follows; The N statistic is asymptoptically distributed as a Chisquare distribution U

Forecasting
Once a model has been fitted to the data, one can make forecast future values of time series. Knowing the past until P the forecast of S V WX is given by; Actually, L S V ℎ is obtained from the model equation by replacing the future value of by zero, the future value of by their conditional expectation and past values of and by their observed values.
The forecast error variance is given by Therefore, as long as the forecasts errors are normally distributed, a 1 b probability interval for the forecasts values can be constructed as,

Forecasting Accuracy
From the difference of forecasted and observed value, the following measures were used to assess the accuracy of the model. MAE (Mean Absolute Error), RMSE (Root Mean Squared Error) and MAPE (Mean Absolute Percentage Error).

Results and Discussions
The monthly values of consumer price index (CPI) that were used for this research are expressed in Rwandan currency, and are covering the period from February 1995 to December 2015 which makes a total of 251 observations. Therefore, the unity of time is a month, and the data from February 1995 to December 2013 were used for model fitting and those from January 2014 to December 2015 were used for accessing the forecasting power. The data were obtained from the Central Bank of Rwanda database and are also published on monthly bulletin of economic indicators at the Bank website. From the Figure 1, the plot shows a general increment of the CPI which leads also to the inflation explained by the depreciation of the currency. The long-term increase of data represents a trend, which explains also that the mean is not constant and depends on time. For that reason, if the mean seems obviously to be not constant, hence the series is not stationary. Therefore, the series must be transformed for any further statistical inference. Again, by visual inspection of the plot, there is no periodic fluctuation hence no seasonal component from the series.
Stationarity is tested by checking the presence or absence of unit root, where the null hypothesis is stated by default as the presence of unit root where the series is not stationary. The test from Augmented Dickey-Fuller (ADF) was used and gave the value of -0.87013 and the p-value of 0.9542 respectively. As the p-value is greater than 5% significance level, we fail to reject the null hypothesis hence the series is not stationary.
After first differencing of the original series, from the Figure 2. It can be seen that there is no systematic increase or decrease of the trend, where the mean looks to be constant over time. Again, the test from the Dickey Fuller with a pvalue of 0.01 at 5% significance level, we reject the null hypothesis and confirm the stationarity of the series after first integration. To identify an appropriate model, the ACF and PACF plots were used to come up with the order of the model.  After the series has been stationarized by first differencing, the next step in fitting an ARIMA model is to determine how many AR or MA terms are needed to correct any autocorrelation that remains in the differenced series. Therefore, the numbers of AR and/or MA terms that are needed to fit a model are tentatively identified by looking the ACF and PACF plots of the differenced series.
If the PACF of the differenced series shows a cut off at lag k, it means that the series is still not yet fully differenced (under differenced) and then by adding enough autoregressive terms can remove any autocorrelation left from a stationarized series. The lag at which the PACF cut off tells us how many AR terms are needed. For the same case for PACF, if the ACF cut off at lag k, this indicates that exactly k MA terms that are needed to remove the remaining autocorrelation from the differenced series. Hence, by visual inspection of the Figure 3 and 4, the number of significant correlation lags from the ACF plot are almost 6 and the number of significant correlation lags from the PACF plot looks to be 4. Therefore, the first tentatively model was ARIMA (4,1,6) where p=4 & q=6 are the order of autoregressive and moving average model respectively, and d=1 is the order of integration.
The chosen model is normally the one with the least value of BIC, AIC and AICc, and satisfying also the parsimony principle which favors the least parameter possible in the model. Thus, ARIMA (4,1,3) was the one to satisfy the previous conditions with least value of AICc. Actually, the purpose of this study was to model and forecast the future value of CPI. Therefore, the model could not be only validated from Akaike Information Criteria only, as long as it is known that the model that fits well data, doesn't mean will produce accurate forecast. That's why before selecting potential models, out-of-sample forecasting accuracy must be performed to assess the model which can fits well data and which can make also accurate forecast as well.
To perform this test, the training set and test set shall be used. The training set also called "in-sample-data" is used to fit the model, and the test set also known as "out-of-sample data" is used to test the model to see how selected model may behave to new data that exist already but which were not used to fit the model.
The potential model was selected accordingly to the one which minimize most the forecasting errors like MAE, RMSE and MAPE. For that reason, two years (2014 and 2015) were used as an out-of-sample data, and data from 1995 up to 2013 were used to fit different models. The fitted models were used to forecast two years ahead, with the purpose to see how the forecasts are close to the real data (out-of-sample). Therefore, the ARIMA (4,1,6) model was the one with the smallest forecasting error comparing to the rest of other models despite their smallest value of BIC, AIC and AICc. But, before confirming the selected model, diagnostic checking was also performed to see whether the errors are uncorrelated (behave like white noise), and normally distributed. As suggested by Box and Jenkins, after selecting a potential model and estimating its parameters, the next step is diagnostic checking to see if the selected model fits well the data. The main assumption is that from the fitted model, the residuals are expected to be randomly independent and identically distributed following the normal distribution. In short, they must behave like a white noise. Box-Ljung test and ACF were used to check whether the residuals are correlated. Shapiro test, histogram and normal Q-Q plot were used also for normality checking.
From the Box-Ljung test, the p-value was reported to be 0.9139 and at 5% level of significance, we failed to reject the null hypothesis of a white noise process.
From the figure 5. It can be seen on ACF plot that there are no significant spikes, all of them are within the boundaries. So, there is no residual correlation left in CPI data Also, from Shapiro-Test for normality the test value was 0.9767 and p-value of 0.085. The null hypothesis suggest the normality of residuals, and the alternative hypothesis calls the lack of normality in residuals. Then, with 5% confidence level we fail to reject the null hypothesis.    Figure 6 and 7 show that the residuals are almost exactly normally distributed, and it can be also confirmed that there is no correlation in the residuals which means there is no left information in the residuals to be used in fitting a model. Therefore, the ARIMA (4,1,6) was successfully selected as a potential model to be used for forecasting.
As the main objective of this study was forecasting, after successfully identifying a potential model that describes well the historical data of consumer price index, the same model were used also to forecast the future values in short term (12 months ahead). From table 3, the smallest value of ME indicate that the fitted model can produce accurate forecast. Also, if the value of ME is positive, the model seems to under-forecast.

Conclusion and Recommendation
The primary purpose behind this study was to find out which ARIMA model is more accurate and appropriate for forecasting purposes in the real world situation. Therefore, the first step was to plot the data to check if they exhibit any kind of patterns like a trend, seasonal component or any outliers. From the results, it was found a positive trend where CPI was increasing with time which leads to the nonstationarity of the series. After first differencing was applied to make a series stationary, the Autocorrelation Function (ACF) and Partial Autocorrelation Function (PACF) plots were used to choose tentatively different potential models. Among the chosen models, BIC, AIC, and AICc were used to select the best model which fits well data, by selecting the one with least value of those statistics respectively. The ARIMA (3,1,4) was selected to be the best describing the historical data of CPI, but it was not enough to conclude if it was also good for forecasting.
To assess forecasting performance, the models were used to forecast Out-of-Sample to judge the best by selecting the one which minimizes the most forecasting errors like MAE, RMSE and MAPE. Therefore, the ARIMA (4,1,6) was found to be the best among of all proposed models through different test performed to assess the goodness of fit. Box-Ljung test was used to check if the residuals behave like a white noise, and it was confirmed that the residuals were not correlated, and also via plots by visual inspection and Shapiro test the residuals were normally distributed. In fact, it has observed that the actual values of CPI (Out-of-sample data) and those predicted based on ARIMA (4,1,6) model were much closer than those of other models.
The general recommendation goes directly to the Central Bank, precisely monetary policy to be vigilant in their policy making, because this study really shows that the CPI is likely to continue rising up over time, which leads obviously to the serious inflation if nothing is done accordingly. Also, we suggest the use of Box and Jenkins methodology given its ability of describing well historical data and making good forecasts.