A forecasting the consumer price index using time series model

. This article examines the behavior of the consumer price index in Ukraine for the period from January 2010 to September 2020. The characteristics of the initial time series, the analysis of autocorrelation functions made it possible to reveal the tendency of their development and the presence of annual seasonality. To model the behavior of the consumer price index and forecast for the next months, two types of models were used: the additive ARIMA*ARIMAS model, better known as the model of Box-Jenkins and the exponential smoothing model with the seasonality estimate of Holt-Winters. As a result of using the STATISTICA package, the most adequate models were built, reﬂecting the monthly dynamics of the consumer price index in Ukraine. The inﬂation forecast was carried out on the basis of the Holt-Winters model, which has a minimum error.


Introduction
The pandemic caused by the spread of the COVID-19 virus around the planet has painfully affected the global and national economy [1][2][3][4]. According to the NBU [5], the gross domestic product of Ukraine decreased by 6% in 2020. In these conditions, one of the most pressing problems is the containment of price increases. In macroeconomics, the current situation is called stagflation [6], which is characterized by an increase in prices during a crisis in the economy. The consumer price index demonstrates the general level of inflation in the economy and is an indicator of the standard of living of the population and socio-economic development. To regulate price increases, it is necessary to model inflation based on a scientific analysis of the dynamics of the cost of goods and services.
M. Sarel [7] analyzed the possibility of a nonlinear impact of the CPI on economic growth, when this indicator is critical 108. Below this value, the CPI does not affect growth, or may even have a slightly positive effect.
M. Kuzheliev [8] examines the impact of inflation targeting and other key instruments of monetary policy on key economic indicators in Ukraine during periods of stability and crises. This study uses econometric methods (multidimensional regression and the model of the simultaneous equation), which are used for the overall and transmission impact of inflation on the assessment of economic growth. The results show that inflation does not affect (less than 0.46 linear correlation) the basic economic indicators during periods of real GDP growth and the quarterly CPI level is less than 2%. On the other hand, there are significant simultaneous regressions (over 0.8 coefficient of de-termination) between the unemployed, real final consumption expenditure, UAH exchange rate and monetary policy instruments (discount rate, international reserves, amount of government bonds) for periods when the quarterly CPI (consumer price index) is more than 2%.
In papers [9,10] presented the influence of the consumer price index on the economic growth of Romania over a period of 28 years, based on the annual data, 1991-2018. The increase of the values of the gross domestic product ensures a sustainable economic growth in Romania. It is proposed to use the cubic analysis model. The results obtained from the analysis show the influence of the consumer price index (CPI) on the gross domestic product (GDP).
The mutual influence of the growth of consumer prices and inflationary expectations in Ukraine is studied in the work of D. Khokhych [11]. T. Gitis [12] raises the problem of the influence of the growth of consumer prices on the level of income of the population. The analysis of the use of the value unit index for curbing inflation in Latin American countries was carried out by Yu. Yereshko [13]. Forecasting the consumer price index in Ukraine for the period of the end of 2020, the beginning of 2021 was not previously carried out in the works.

Materials and methods
Inflationary processes are studied based on the monthly consumer price index in Ukraine for the period from January 2010 to September 2020 according to the website of the State Statistics Service of Ukraine [14]. The data array was 129 variants, the units of measurement are percentages up to the previous month.
The analysis of the dynamics of the series and the construction of models were carried out using the STATIS-TICA package, which made it possible to choose the optimal model with a minimum error of the forecast.
The use of the STATISTICA package to construct time series is carefully described in [15,16].

The Holt-Winters model or exponential smoothing
The Holt-Winters model or exponential smoothing with a linear trend and seasonality assessment is the progenitor of adaptive forecasting methods [17,18]. The complete procedure consists of four steps: 1. Calculation of exponentially smoothed series: 2. Determining the value of the trend: 3. Seasonality assessment: 4. The forecast is carried out: where are L t -smoothed value at the time of calculation; α is the smoothing coefficient of the series; S t−s -coefficient seasonality of the previous series; Y t is the value of the period; L t−1 -smoothing value for the previous period; T t−1 -trend value for the previous period; T t -the value of the trend at the time of calculation; β -trend smoothing coefficient; S 0 -seasonality factor at the time of calculation; γ is the coefficient seasonality smoothing; Y t−p -Holt-Winters model forecast for pperiods ahead; p is ordinal the number to which we make a forecast; S t−s+p -seasonality factor for the same period in the last season.
Thus, on the one hand, it is necessary to increase the statistical range and more correctly choose the smoothing coefficients. Finding compromise values of α, β, γ is the task of model optimization. One of the important components is the choice of coefficients that affect the forecasting error and subsequently the accuracy of the forecast .

Box-Jenkins model
ARIMA * ARIMA or Box-Jenkins model is an integrated model of auto regression -variable mean and time series analysis. Is an extension of ARMA models for non-stationary time series that can be made stationary by calculating the difference of some order from the original time series. The ARIMA model (p, d, q) means that the time series differences of order d obey the ARIMA model (p, q).
The methodology of the model is described in detail in [19][20][21].
We use the following Box-Jenkins additive models of time series: where Y t is a level of time series at time t = 1, 2, ...; f (t)trend is traced the long-term and evolution is deterministic in time; S t -seasonal fluctuations; e t -random fluctuations (white noise).

Determining the dynamics of a series
In contrast to [22], the time series should not be reduced to a special form, but its main characteristics should be determined immediately.
To build a optimal model and to forecast inflationary processes, first, the main characteristics of the dynamic series of the consumer price index are found. They are shown in table 1. The characteristics of the series show that the indicator ranges from 98.7% to 114%, the standard deviation of 1.82% demonstrates that the spread of the consumer price index is quite small.
The presence of anomalous values of 112% and 114% in general does not affect the overall dynamics of the consumer price index, so the study was conducted without removing them.
To determine the general trend in the behavior of a series of data, a graph was built showing the consumer price index and the polynomial trend n = 3 (figure 1).  Therefore, to model inflation and determine the indicator for subsequent periods, it is necessary to use the methods of Holt-Winters and Box-Jenkins.

The Holt-Winters model
To build the model, we use the "Time series and forecasting" module of the STATISTICA package. To find the optimal values of the model parameters, we use the "Search on the grid" command.
The method of random search is effective with the use of computers to solve optimization problems. The method is based on the generation of random numbers that have a uniform distribution in the interval [0, 1]. Random numbers obtained on a computer are called pseudo-random numbers. At the first stage, a step width of 0,1 is selected and all values of the coefficients α, β, γ are selected as 0, 1n, n = 0, 1, . . . , 10. Determine the model values: among the set of values of the coefficients are solutions α, β, γ for which the objective function takes a high accuracy of value. If the forecast accuracy is insufficient, you should reduce the step width and find new optimal values of the coefficients.
As a result, the following optimal parameters were obtained: exponential smoothing α = 0, 8; trend component β = 0, 1 and seasonality estimate γ = 0, 1. A summary of the error is shown in the figure 3.
Mean absolute error Mean squared error is small, which indicates the adequacy of the model and high prediction accuracy. The forecast for 10 subsequent periods is shown in figure 4.
It should be noted that the forecasting accuracy of the constructed model decreases every month, since it is intended for short-term forecasts.
The relative forecast error is very small (less than 1%), therefore, forecasting the indicator using the Holt-Winters model shows good results. To illustrate the adequacy of the model, graphs of real and simulated consumer price indices are built. They are shown in figure 5.  It should be noted that the forecasting accuracy of the constructed model decreases every month, since it is intended for short-term forecasts.

Box-Jenkins model
We will first define the time series. Analyzing the graph of autocorrelation (figure 7) and the partial autocorrelation function presented below, we conclude that there is a first-order autocorrelation with a lag of 1 and an annual seasonality with a delay of 12.  We will build an ARIMA*ARIMAS model using the "Automatic search for ARIMA model parameters". As a result, the model p = 1, q = 1, P s = 1 (10) was proposed as the best program, seasonal lag = 12. The calculated parameters are shown in table 2.  Table 3 shows the forecasting results for the next 12 periods (for a year).
Comparing the predicted values with the real values, we obtain the relative forecast errors of 0.1% and 0.35%, which is worse than the Holt-Winters model, but it is quite acceptable for analyzing the dynamics of inflation. Figure 9 shows a plot of the ARIMA model with a predicted interval. Figure 9. Plot of ARIMA model and 95% forecast interval To clearly prove the adequacy of the selected model in figure 10, a graph of ARIMA model residues is constructed. Only in anomalous values the residues acquire rather large values, in others they do not exceed in absolute value 2%.

Conclusion
Analyzing the dynamics of the consumer price index in the period from January 2010 to September 2020, it can be concluded that inflation at the level of 5-10% per year is typical for the Ukrainian economy. 2014 and 2015 were especially critical, after which the government managed not only to reduce the inflation rate, but also to maintain the growth of the consumer price index at 5% per annum.
The processing of the consumer price index array with the help of applied programs proved that the indicator is characterized by high levels of seasonality and trend component and cannot be approximated by elementary functions. At the same time, the use of Holt-Winters and Box-Jenicks methods made it possible to build models of inflationary processes with high accuracy.
Forecasting the indicator for the beginning of 2021 showed that, despite the crisis in the economy associated with the COVID-19 pandemic, there are no reasons for increase the inflation rate.
For a deeper study of the reasons for the increase in the consumer price index, one should consider the change in the value of its individual components, the relationship of the indicator with the exchange rate of the national currency and the gross domestic product.