Artificial Neural Networks in Inflation Forecasting at the Meso-Level

. The aim of the article is to analyze inflation factors and their influence on the consumer price index in the regions. The article discusses the existing mathematical models for the forecasting of the regional inflation rate as an important national measure. Advantages, disadvantages and application fields of these models are presented. The appropriateness of recurrent neural network use for regional inflation forecasting is demonstrated. The article describes the process of neural network architecture creation, its training, inflation parameter forecasting.


Introduction
Inflation forecasting is a consistently relevant task for the monetary authorities since, being a most important economic parameter, the inflation rate determines the direction and tool set of the financial and monetary policy, influences the investment climate in the country and the quality of life of the population. The consumer price index (hereinafter -CPI) is an inflation rate indicator in Russia. It measures time change in the cost of a set of food and non-food products and charged services consumed by an average household. [1,2] The CPI value calculated in general for the Russian Federation not always reflects the real price behavior in the regions. It is common knowledge that the territorial expanse of Russia entails uneven development of its constituent units when the economic and social parameters can vary significantly in different territories. At the same time, the situation when all economic system segments and all territorial units get equal opportunities for development is key to the progressive development of the state, sustainable economic growth and social stability.
The CPI dynamics depends on a lot of factors from the sphere of production, trade, provision of financial services, as well as social-psychological and political forces.
To forecast the inflation rate in the region, it is necessary to analyze a large data set including information on the values of parameters that potentially correlate with the resulting indicator -regional inflation rate, to identify the relationship between the parameters, to assess the strength of relationship between the factor and the result. We can use the traditional correlation and regression analysis to solve this task, but it will be difficult to apply it due to a non-linear relationship between the potential factors and

Materials and Methods
As a multifactorial phenomenon, inflation may be under the influence of demand-side factors associated with the growth of effective demand for goods and services and subsequent rise in prices. The demand growth, in its turn, can be provoked by more accessible bank loans or growth in the household nominal yield.
From the side of supply, inflation can be induced by reduction in production and goods and services supply, cost push, including due to rise in prices for imported components on the global market, national currency rate fall.
Traditionally, more attention is paid to monetary factors of inflation that are directly influenced by the regulatory authorities (interest rates, currency exchange rate, volumes of credit granting, consumption, savings). Such factors can be precisely quantified and considered in statistical mathematical models and machine learning algorithms. However, non-monetary factors also have a significant influence on the CPI.
Thus, inflationary expectations of economic entities and population can become a powerful inflation factor. This factor is traditionally significant for Russia. In addition to it, non-monetary factors may include import appreciation, economy monopolization and, consequently, monopoly price "hike", existence of shadow economy, peculiarities of commodity flow between regions and systems of commodity flow within the networks. Thus, for instance, if there are no large warehouses in the region, it will lead to a rise in prices of commodities imported to the region for the end consumer.
Non-monetary factors cannot be directly considered in the model we form. However, the factors that we have chosen indirectly include causes of non-monetary nature.
To form a model for the forecasting of regional inflation rate, we propose the use of the following variables as factors.
1. Average monthly salary. Statistically, this indicator represents a nominal salary paid for labor service. Expected regular pattern: the higher the average monthly salary level is, the higher the inflation rate is. Salary increase provokes growth in effective demand along with price increase. Besides, salary increase means increase in costs, which in its turn also leads to growth in the manufacturer's prices.
2. Household income volume. In the definition by Rosstat, the indicator includes all receipts of monetary funds of households, namely salary, income from deposits, securities, benefits, pensions, scholarships. The income volume helps to evaluate the volume of monetary funds that people have and are ready to spend on goods and services acquisition. Increasing demand on the buyers' side, in its turn, can prompt the supplier of goods, works and services to raise prices.
3. The private cash disbursements are represented by the usage of the household income for the purchase of goods and services, real estate, compulsory payments and voluntary contributions, other expenses. The part of cash disbursements that is related to consumption and does not form savings provokes the demand growth and price increase. This indicator is connected with the above indicator of the household income. Besides, this indicator is under the influence of such non-monetary inflation factor as inflationary expectations of the population. Expecting a price increase, the consumers will probably start demonstrating a higher demand for goods getting rid of their savings and widening the inflation spiral. 4. The retail turnover reflects the commodity weight (in monetary terms) passing into the sphere of private consumption. It characterizes, on the one hand, proceeds in cash from trade, on the other hand, the sum of the population's expenses on goods purchase.
Increase in the retail turnover indicator can be caused, on the one hand, by increase in production, on the other hand, by increase in the purchasing power of the population. Decrease in retail turnover due to a drop in production can be observed under the influence of such non-monetary inflation factors as decline in capacities and labor supply. This indicator can also rise due to increased effective demand resulting from the growth of inflationary expectations.
5. The volume of charged services to the population is an indicator that reflects the volume of consumption of various services by the population and is measured by the sum of money paid by the consumers themselves for the service rendered or by the organization where they work. Our model needs this indicator in order to evaluate the degree of charged service volume dependence from the level of prices at which they are offered, as well as to determine how an increase in the volume of services to the population will influence the inflation. The said indicators are supposed to be directly correlated.
6. The dollar to ruble ratio is a supply-side inflation factor. Rise in the dollar influences inflation via rise in prices on import commodities. When the dollar exchange rate rises, the inflation rate increases, and when it falls, the inflation rate decreases. We suppose this indicator is of high importance for the Russian Federation where a lot of goods are imported from other states. This indicator is strongly influenced by such non-monetary inflation factors as oil prices and foreign economic sanctions and retaliatory sanctions.
7. Retail deposit volume. A part of private expenditures is not related to consumption but forms savings. The bank deposit is the most popular and protected (from the legal perspective) savings instrument. The more funds are deposited by the population, the fewer resources are left for goods and services purchase, the lower the consumer demand is, the lower the inlfation rates are.
8. Money supply volume. Fast growth of M2 aggregate is treated as inflation process, and sharp decline is treated as a sign of economic downturn. If the money velocity is constant, then the money supply should increase as fast as the commodity weight. If the money supply is growing faster, then there is too much money, whereas investments take time, thus the purchasing power of the national currency falls, which is an inflation process.
9. Loans to non-financial organizations. The model under study requires this factor since the real sector lending can cause an increase/decrease in the commodity output or provision of services. Thus, it depends inversely from the inflation rate. However, credit resources granted by banks to non-financial organizations can be used not only for the expansion of production and additional product release but also for employee benefits. In this case, it will be directly related to the inflation rate.
10. The citizens' credit indebtedness level can act as an inflationary demand factor. A large amount of additional money that the population obtained thanks to the loans leads to the increase of consumption, which in its turn can cause price escalation. However, inverse relation is also possible here -when inflation decreases, credit market rates fall, the loan becomes more accessible and, consequently, the level of indebtedness rises.
Inflation forecasting is a major task of statistical and regulatory authorities all over the world. Thus, HICP is a key price stability index in the euro area. It is the central part of NMCM model that embraces all the largest countries of the euro area and is used to forecast and analyze scenarios in the European Central Bank. This model is an estimation average model for several countries developed in the European Central Bank. It embraces 5 largest euro area countries (Germany, France, Italy, Spain and the Netherlands) and can be used both for an individual country and as a coupled model for several euro area countries. This model is the basic macroeconomic tool used in the ECB in the context of macroeconomic forecasts of the Eurosystem. The main source of data on the countries is Eurostat and namely European quarter national accounts that provide information on the GDP and main components of expenditures, income, employment etc. Eurostat also provides data for calculation of the harmonized consumer price index and subcomponents.
The key indices are considered with regard to prices for shares. As for financial variables, 3-month EURIBOR was used as a short-term interest rate indicator and the yield of 10-year bonds was used as a long-term interest rate indicator. Other variables such as housing prices or capital assets are based on the internal calculations within the Eurosystem. [3] DSGE models are used in many other European countries for inflation forecasting. These models are quite complex and operate a large number of variables. For instance, these models determine the interdependency of inflation, total turnout, interest rate, salary, consumption and investment levels. This group of models has also found application in the Russian Federation. This model describes a small open economy with the following types of agents: households, firms, external sector and central bank. Inflation factors include interest rates, currency exchange rate, level of consumption and savings, salary, import volume, disbursement level etc. [4] Note that DSGE models operating a large data set are characterized by the high complexity of construction, data collection and determination of relationship between the variables.
In New Zealand, inflation forecasting is based on its targeting under the long-term plan. NZSIM model is used, which is a kind of DSGE model adapted for New Zealand. Population category polls and the marginal propensity to consume and save play a very important role in the process of forecasting. Statistical service officers present their forecasts first, then they poll the population and then correct their forecasts for the population's opinion.
NZSIM represents a platform for mid-term analysis and testing of scenarios in the process of monetary policy development. This structural model is based on the concept of trends and cycles assuming that there are trends and steady-state conditions which in the long term determine the behavior of economic variables. However, in the short or mid term, disturbances can push the indicators off the stable trends, which will lead to the formation of economic cycles. Examples of such disturbances include growth in foreign demand for export, change in savings preferences of households and unexpected increase in public spending. 4 agent types form the core of the model: households, domestic firms, firms engaged in import distribution and central bank maintaining inflation at the level close to the target one. The key macroeconomic indicator in this model is the expected microeconomic behavior of these agents.
In the USA, 3 groups of one-factor models can be used for inflation forecasting. The average inflation level over the last 12 months is used in the random walk model, and the best forecast thereunder is typical for the periods of stable inflation.
Autoregression models have the same dependent variable but also assess weighing coefficients for 12 lags. [5] The third set of models includes models enriched with data. These models use the inflation rate in the previous periods as variables and are applied mainly for short-term forecasting.
The Phillips curve illustrating the inverse relationship between the inflation rate and unemployment rate is widely known. A series of models for inflation rate forecasting was created on the basis of this curve. One of them shows the dependence of the inflation rate from the unemployment rate, disbursement shocks and previous inflation values. The model passed the evaluation test on the USA data -the inflation was expressed by the dynamics of prices for food products and energy resources, and the disbursement shocks were shown as the dynamics of the average import prices. Besides, fictitious variables were introduced into the model which characterize state policy measures for salary level regulation. [6] It is worth noting that the complexity of inter-relations between the factor and the result does not deprive all the models of the above drawbacks. That is why the regulatory authorities usually use a combination of various forecasts.
The said drawbacks of mathematic modeling can be overcome by means of forecasting the inflation rates with the use of artificial neural networks that considerably reduce the labor intensity of data processing and make it possible to detect numerous and intricate relationships between the factors and forecast indicator.
To solve this task, machine learning methods such as linear regression, random forest or neural networks can be used. The last option is the most universal not only for the task of forecasting but also for the tasks of classification, clustering and anomaly detection. Besides, neural networks ensure higher accuracy upon a considerable increase in the data volume, in contrast to the other models. [7] The neural networks mean an ordered structure of artificial neurons -simple locales that receive and give back signals. Neural network implementation consists in the determination of the procedure of input signals transmission to output ones via neurons [8].
For time-series analysis, we can single out the following neural network classes: multilayer perceptron, deep neural networks, recurrent neural networks and convolutional neural networks.
The multilayer perceptron is a universal type of neural networks thanks to its simple architecture. However, this feature is also a drawback in the forecasting of complex time series. Perceptron is the name of models where neurons are subdivided into layers. Each neuron of one layer receives weighted signals from all neurons of the previous one, sums them up and transmits the next layer neurons the result of a certain activation function from this sum to all neurons of the next layer. The multilayer perceptron can detect non-trivial dependences of data from each other, yet the resulting model gives no warranty of data extrapolation beyond the baseline data during the forecasting.
Deep neural networks include models with a very large number of parameters and intermediate layers of the neural network. Essentially, they are a hypermultilayer perceptron. This type of networks is good for a large data set yet it requires a lot of compute resources for selection of the optimal parameter set and network training. In this task of regional inflation forecasting, the data set includes up to 100 time periods (months), which is insufficient for the usage of deep neural networks.
Convolutional neural networks differ from the multilayer perceptron in that signals are represented by matrixes therein, and the transformation of these signals is nothing but convolution matrix application. The application of convolutional neural networks is potentially possible for solution of our task provided there is a large data set. Convolutional neural networks are usually used for work with images since task-specific information is already encoded in the images. The question about information recording in the matrix remains open.
The recurrent neural network is the name of neural network models that contain recurrent units which memorize information in the process of signal transmission and after processing pass it to the following layers. In contrast to the traditional neural networks, recurrent neural networks can be used in text processing tasks since words in a sentence to a certain degree depend on the previous ones. These networks show the best result in the tasks of this type. To that end, the architecture of recurrent neural networks is best tailored to the task of time series forecasting.
We should specify another method of work with financial time series. It can be assumed that certain time points have a higher impact on the forecast than he others. To detect this potential dependence, the "attention" mechanism was used (to be precise, "double attention" mechanism), which automatically understands whether such time points exist or not.
This study uses the recurrent neural network model based on LSTM units. This is a special architecture of recurrent neural networks that can be trained in long-term dependences, which meets the requirements of our task.
Let us sum up the forecasting task: having data on changes in the inflation indicatorsfactors, it is necessary to forecast the CPI in the region based on the neural network algorithm. To solve it, federal and regional statistical indicators (Ivanovo region) were chosen.

Results and Discussion
The initial approach to the study of interdependence of various factors and inflation was the detection of the nature of spread in inflation values depending on the parameter under study.
Having detected the potential inflation factors, the authors conducted correlation and regression analysis and singled out the US dollar to Russian ruble exchange rate and growth in individuals' indebtedness with exclusion of foreign currency revaluation as parameters with typical dependence (Fig. 1). In addition, the diagrams show that the dollar to ruble exchange rate is in some kind of linear relation to the CPI. The undeniable advantage of the neural network is its ability to detect non-evident regularities and relationships in large data sets. To develop and test the neural network algorithm, we took all detected potential inflation factors.
The baseline data set contained meso-and macro-indicators for the period starting from January 1, 2014, where the target function is the consumer price index (Fig. 2). The date, retail turnover, volume of services to population and other data set indicators were accepted as target function arguments and sold as the input signal of the neural network.

Fig. 2. Fragment of the initial data set
Due to the relatively small data volume, the obtained set was divided into the training and testing subsets of 80% and 20%, respectively, for the purposes of testing.
The next stage was the creation of architecture of the neural network and its training. It was based on a model of the recurrent neural network with the double attention mechanism: in the encoder and decoder. The mechanism of long-and short-term memory was used as recurrent units, and the fully connected layer with no activation function served as attention units.
To get a high-quality forecast for six months ahead, the neural network was trained to forecast the values 6 months ahead while looking 6 months back. The training criterion was a difference of the squares of the projected and actual values. The adaptive inertia method was used to minimize these values. The neural network was trained on 200 epochs.
The basic data were presented in the form of absolute and percentage values as well as modeled with two normalization types: based on the maximum and minimum values and the average value and spread (Fig. 3). According to the diagrams of CPI values projection on the selected factor values, these parameters are evidently interdependent.
The forecasted data give evidence of CPI fluctuation in the next six months and absence of sharp changes in this indicator. It should be noted that the curve of CPI forecasting based on the relative values, normalizing based on the average values and spread are closest to the actual data (Fig. 4).

Fig. 4. Comparison of forecasted data with actual CPI values
According to this forecast, inflation will fluctuate mainly within the range of 5% to 2% from the middle of 2018 to the middle of 2020. The actual values fluctuated from 6% to 2% during this period. It is worth noting that the direction of changes in the actual and estimated values coincides almost throughout the entire time horizon.
The inflation rates are forecasted to grow by the end of this year -beginning of the next year. It is worth noting that the price rise at the beginning of the year is a natural phenomenon for the Russian economy, which is confirmed by the analysis of the actual inflation values. Based on this, we may conclude that the model allows us to take into account these patterns.
It is necessary to point out a discrepancy between the fact and the forecast in the first half of 2019 and in spring of 2020. Rise in inflation in January-February 2019 and its increased values as compared to the forecast in the first half of 2019 is explained by the rise in utility tariffs and appreciation of fruits and vegetables. Besides, the price rise at the beginning of 2019 can be explained by the above factor of high inflation expectations, which, according to the Bank of Russia, formed under the influence of the behavior of prices for petrol, food products and ruble exchange rate fluctuations. [9]. It should be noted that the model could not take these factors into account precisely, which is its limitation, as we said before. The price rise in spring 2020 was caused by the economic consequences of the coronavirus pandemic, which surely was a market factor and could not be predicted within the model.

Conclusion
Thus, it may be said that the forecast of the developed algorithm is quite accurate, which, in its turn, confirms the thesis that the recurrent neural networks can successfully perform the task of analysis of a large number of factors that are in a complex nonlinear relationship with the result, in our case, the regional inflation rate. Consequently, these models can be used by the regulatory and statistical authorities for the purposes of macroeconomic parameters forecasting.