FORECASTING CPI USING A NEURAL ... - Semantic Scholar

22 downloads 0 Views 273KB Size Report
Maasoumi et al., (1996) have applied a back-propagation ANN model to forecast US ... Aiken (1999) proposed an artificial neural network to forecast CPI.
ISBN 978-9955-28-463-5 L. Sakalauskas, C. Skiadas and E. K. Zavadskas (Eds.): ASMDA-2009 Selected papers. Vilnius, 2009, pp. 309–315

The XIII International Conference “Applied Stochastic Models and Data Analysis” (ASMDA-2009) June 30-July 3, 2009, Vilnius, LITHUANIA

© Institute of Mathematics and Informatics, 2009 © Vilnius Gediminas Technical University, 2009

FORECASTING CPI USING A NEURAL NETWORK WITH FUZZY INFERENCE SYSTEM 1

Camelia Ioana Ucenic1, George Atsalakis2

Department of Management and Industrial Systems, Technical University Cluj-Napoca, Romania Department of Production Engineering and Management, Technical University of Crete, Greece E-mail: [email protected]; [email protected]

2

Abstract: Consumer price index (CPI) is an index of the cost of all goods and services of a typical consumer. CPI is a key measure of inflation that relates the rise in prices over a period of time. It is a fixed quantity price index and is used as an economic indicator, more specific as an inflationary indicator. As the most widely used measure of inflation, CPI is an indicator of the effectiveness of government policies. The business executives, labour leaders and private citizens use the index as a guide in making economic decisions. It is also called cost-of-living index. This work presents an attempt to forecast CPI using an adaptive model, a neural network with fuzzy inference system. The adaptive models transform the internal behavior structure to include changes in the outside world. The data used for the model is related to Greece and is from OECD Factbook 2008. The value of the year 2000 is consider for comparison and is equaled with 100. The results are compared with traditional forecasting models. Keywords: CPI, inflation, forecasting, fuzzy logic, neural network

I. Introduction – CPI in Greece

Greece is a member of the European Union since 1981. It joined officially the EU Economic and Monetary Union (EMU) on January 2001 and became a part of the EU single currency club. Its economy is segmented into the state sector, estimated at 40% of GDP and the private sector 60% of GDP. About one quarter of the goods and services that are included in Consumer Price Index (CPI) are produced by state controlled companies. As a result, the government has high indirect control over pricing. The overall general upward price movement of goods and services in an economy is measured usually by the Consumer Price Index and the Producer Price Index. The Producer Price Index (PPI) is a government index that measures changes in price at the wholesale level. The producers pay for things that will end up being consumed by somebody later. The PPI is considered an indicator of what is ahead in terms of inflationary pressures. The corresponding index for consumer goods is the Consumer Price Index (CPI). Consumer price index is an index of the cost of all goods and services to a typical consumer. The definition given by Investor Dictionary for CPI is that Consumer Price Index (CPI) is a key measure of inflation that relates the rise in prices over a period of time. Consumer price index is a fixed quantity price index. It is used as an economic indicator, more specific as an inflationary indicator. As the most widely used measure of inflation, CPI is an indicator of the effectiveness of government policies. The business executives, labour leaders and private citizens use the index as a guide in making economic decisions. It is also called cost-of-living index. Consumer price index is based on prices of food, clothing, shelter, and fuels, transportation fares, charges for doctors’ and dentists’ services, drugs, and other goods and services that people buy for their daily living. It measures the change in the cost of a fixed basket of products and services, including housing, electricity, food, and transportation. Since the contents of the basket remain constant in terms of quantity and quality, the changes in the index reflect price changes. All taxes directly associated with the purchase and uses of items are included in the index. The percentage of the total basket that any item occupies is termed the "weight" and reflects typical consumer spending patterns. Since people tend to spend more on food than clothing, changes in the price of food have a bigger impact on the index than, for example, changes in the price of clothing and footwear. It does not reflect the price change experience of any particular household or person. The “CPI 309

C. I. Ucenic, G. Atsalakis

basket” contains an extensive list of goods and services. Each consumer buys a different combination of these goods and services. It would be unlikely for any consumer to buy everything on the list at one point. In order to calculate consumer price index the prices are measured against a base year. The basket for the base year takes the value of 100. The rate of increase of CPI is reported as the percentage increase in the index over the past 12 months. To provide a reliable picture of the short-term trend of inflation, comparisons of month-to-month changes in the index are adjusted to reflect predictable seasonal price changes. Consumer price index is published monthly. Due to continual research and refinement of index estimation procedures, changes in the quality of priced goods and services are separated from changes in the price of such goods and services. The CPI is revised on an on-going basis to allow the introduction of new products. The CPI basket is updated from time to time in order to reflect broad changes in consumer spending habits, as well as to take account of changes in products and services. Because of the difficulties of measuring price changes due to changes in quality of products as well as other variables, consumer price index may contain a certain measurement bias that prevents it from giving a completely accurate picture of inflation. Recent studies of this bias suggest that the CPI may overstate inflation by about half a percentage point. (Bank of Canada) The National Banks monitor changes in the CPI in order to decide when is the moment to take actions in order to adjust monetary conditions and to keep inflation within the range of the inflation-control target it had set. To assess the trend of inflation is helpful to use the "core CPI," which excludes the most volatile components. For example, in Canada are considered weight volatile components: fruit, vegetables, gasoline, fuel oil, natural gas, mortgage interest, intercity transportation, and tobacco products as well as the effect of changes in indirect taxes on the remaining components. CPI 140 120 100 80 60 40 20

19 59 19 62 19 65 19 68 19 71 19 74 19 77 19 80 19 83 19 86 19 89 19 92 19 95 19 98 20 02 20 05

0

Fig. 1. Evolution of consumer price index in Greece 1959-2006 (Source: OECD)

2. Brief Literature Review

The use of neural networks in macroeconomics is still not enough exploited. The study done by Kuan and White (1994) is one of the first attempt to introduce neural networks to macroeconomic forecasting. Maasoumi et al., (1996) have applied a back-propagation ANN model to forecast US macroeconomic series such as the consumer price index, unemployment, GDP, money and wages. Models which transform the internal behavior structure to include changes in the outside world have to be created. The adaptive models are among these types of approaches. An adaptive model adjusts its rules based on changes in the external world. The mixture of three broad technologies: Fuzzy Logic, Data Mining, and Genetic Algorithms. Fuzzy Logic is a dominant way of building an adaptive model. The Fuzzy Logic model makes available a method for capture the semantics or meaning of the data through a collection of fuzzy sets associated with each variable. Data Mining uses these fuzzy sets to produce a primary model of if-then rules. A Genetic algorithm creates and tests many candidate models by changing the fuzzy sets until it finds the one that performs the best Cox (2000) proposed a fuzzy set for a variable representing the quarterly change in the Consumer Price Index (CPI). Changing the number of fuzzy sets, their shape, or their overlap one can change the final model. This capacity to adjust a model by modifying its fuzzy sets is the key to building selfmeasuring and adaptive model. If the model is deficient in adequate predictive power - the standard error 310

FORECASTING CPI USING A NEURAL NETWORK WITH FUZZY INFERENCE SYSTEM

is too high - the business analysts must adjust the model by changing how the rules are generated. A better approach is to use a genetic algorithm to explore a big number of possible configurations and find the one that has the best predictive power. Such a genetic algorithm can automatically tune the generated business policy. The predictions and forecasts from such models will be more reliable over a much longer period of time. Aiken (1999) proposed an artificial neural network to forecast CPI. He used leading economic indicator data in the USA. The input variables to the neural network mode finally selected were: Producer Price Index (PPI), crude materials; PPI, intermediate materials; PPI, capital equipment; PPI, finished consumer goods; PPI, finished goods; PPI, finished goods less food and energy; change in sensitive materials prices; change in money supply Ml; and change in money supply M2. The results demonstrated that the neural network predicted the level of the CPI with a high degree of accuracy upon statistical techniques. Salzano and Colander (2007) introduced a linear and encompassing non-linear model followed by a comparison in order to forecast CPI. The avoidance of model mining was realized by identifying the best performance linear model and than comparing with the so called “thick model” of Granger and Jeon. Choudhary A. and Haider A. (2003) evaluated the power of artificial neural network models as forecasting tools for monthly inflation rates for 28 OECD countries. They worked with two ANN and two quasi- ANN techniques. For short out-of-sample forecasting horizons up to 3 months, they found that, on average, for 45% of the countries the ANN models were a superior predictor while the AR1 model performed better for 21%. The simple hybrid learning rule and the minimum distance quasi-ANN rules dominate other forms of neural nets Moshiri and Cameron (2000) compared the performance of Back-Propagation Artificial Neural Network (BPN) models with the traditional econometric approaches to forecasting the inflation rate. They used an ARIMA model, a vector autoregressive model, and a Bayesian vector autoregression model. They compared each econometric model with a hybrid BPN model which used the same set of variables. Dynamic forecasts were compared for three different horizons: one, three and twelve months ahead. Root mean squared errors and mean absolute errors were used to compare quality of forecasts. The results shown the hybrid BPN models are able to forecast as well as all the traditional econometric methods, and to outperform them in some cases. McAdam and McNelis (2005) applied linear and neural network-based “thick” models for forecasting inflation based on Phillips–curve formulations in the USA, Japan and the euro area. Thick models represent “trimmed mean” forecasts from several neural network models. They outperformed the best performing linear models for “real-time” and “bootstrap” forecasts for service indices for the euro area, and did well, sometimes better, for the more general consumer and producer price indices across a variety of countries. 3. Methodology – theoretical approach

Artificial Intelligence forecasting techniques have been receiving much attention lately. They have been cited to have the ability to learn like humans, by accumulating knowledge through repetitive learning activities. Their application in the prediction of economic indicators and financial indices has been demonstrated. (Ranasinghe, 2001) a. Fuzzy logic. Fuzzy logic gives a means of representing uncertainty. It is useful in reasoning with the imprecise data. Fuzzy logic is the convenient way to map the input space to an output space. Fuzzy inference systems (FIS) can express human expert knowledge and experience by using fuzzy inference rules represented in “if-then” statements. The fuzzy inference process has five steps: fuzzify inputs, apply fuzzy operator, apply implication method, aggregate all outputs and defuzzify. In order to obtain a good FIS it is necessary that the researchers possess domain knowledge; the knowledge has to be represented in a symbolic form, be complete, correct and consistent. Unfortunately, fuzzy inference systems tend to become incomplete because experts are reluctant to disclose all the knowledge. In addition it is difficult to express it in a symbolic form. (Nishina and Hagiwara, 1997) b. Neural networks. Between the biologically inspired computing models there are the artificial neural networks. Artificial NN doesn’t approach the complexity of the brain, but have two key similarities: the building blocks are simple computational devices and the connections between neurons determine the function of the network.A neural network is formed by layers of neurons. A layer includes the weight matrix, the summers, the bias vector b, the transfer function and the output vector (Hagan, 1996). 311

C. I. Ucenic, G. Atsalakis

c. Neuro-fuzzy. Neuro-Fuzzy systems use NNs to extract rules and membership functions from inputoutput data to be used in a Fuzzy Inference System. Using this approach, the black box behaviour of NNs and the problems of finding suitable membership values for FL, are avoided. NFS are suited for applications where user interaction in model design or interpretation is desired. One of the most important NFS is ANFIS. d. ANFIS. Fuzzy inference systems using neural networks were proposed to avoid the weak points of fuzzy logic. The biggest advantage is that they can use the neural networks’ learning capability and can avoid rule matching time of an inference engine in the traditional fuzzy logic system. Functionally, there are almost no constraints on the node functions of an adaptive network except piecewise differentiability. Structurally, the only limitation of network configuration is that it should be of feedforward type. Due to this minimal restriction, the adaptive network's applications are immediate and immense in various areas. A class of adaptive networks, which are functionally equivalent to fuzzy inference systems, is presented bellow in figure 3 (Jang, 1993).

Fig. 2. Fuzzy reasoning (a) and ANFIS architecture (b)

We assume the FIS under consideration has two inputs x and y and one output . Suppose that the rule base contains two fuzzy if-then rules of Takagi and Sugeno's type: Rule1: If x is A1 and y is B1 then f1 = p1 ⋅ x + q1 ⋅ y + r1 Rule2: If x is A2 and y is B2 then f 2 = p2 ⋅ x + q2 ⋅ y + r2 The node functions in the same layer are of the same function family as described below: Layer 1 Every node i in this layer is a square node with a node function. Oi1 ( x ) = µ Ai ( x) where x - the input to node i

Ai - the linguistic label (small, large, etc.) associated with this node function.

It other words, Oi1 is the membership function of Ai and it specifies the degree to which the given

x satisfies the quantifier Ai . Usually is chosen µ Ai (x ) to bell-shaped with maximum equal to 1 and

minimum equal to 0, such as the generalized bell function 1 µ Ai ( x) = bi  x − c  2  i   1 +   ai  

where ai , bi , ci is the parameter set. As the values of these parameters change, the bell-shaped functions vary accordingly, thus exhibiting various forms of membership function on linguistic label A . Parameters in this layer are referred to as premise parameters. Layer 2 Every node in this layer is a circle node labeled ∏, which multiplies the incoming signal and sends the product out. i

312

FORECASTING CPI USING A NEURAL NETWORK WITH FUZZY INFERENCE SYSTEM

Layer 3 Every node in this layer is a circle node labeled N. The i-th node calculates the ratio of the ith rules firing strength to the sum of all rules' firing strengths:

wi =

wi , w1 + w2

i=1,2

For convenience, output of this layer will be called normalized firing strengths. Layer 4 Every node i in this layer is a square node with a node function

Oi4 ( x ) = wi ⋅ f i = wi ( p1 ⋅ x + q i ⋅ y + ri )

where: wi - the output of layer 3 {p i , q i , ri } - the parameter set. Parameters in this layer will be referred to as consequent parameters. Layer 5 The single node in this layer is a circle node labeled Σ that computes the overall output as the summation of all incoming signals, i.e.,

O ( x ) = ∑ wi ⋅ f i 5 i

i

∑w ⋅ f = ∑w i

i

i

i

i

4. Model and results

The forecasting of CPI was done with an adaptive network with fuzzy inference system (ANFIS). The model predicts in a one step ahead prediction scheme. The method of trial and error was used in order to decide the type of membership function that describe better the model and provides the minimum error. The trimf membership function gave the largest errors. Among the membership functions which described well the model were gbellmf and gaussmf. Generally, for both of them the increase in the number of membership functions provided better results. It was also noticed that the increase of the number of epochs determined an increase of errors for all type of membership functions. Finally six-membership functions of gauss shape were chosen. The final membership functions show a slight change in their shape. Final MFs on Input 1 1 0.8 0.6 0.4 0.2 0

10

20

30

40

50

60

70

80

90

100

110

Fig. 3. Final membership functions

The comparison between actual values and ANIS forecasting is presented bellow.

313

C. I. Ucenic, G. Atsalakis

Actual values and ANFIS prediction

150

actual values ANFIS prediction values

v a lu e s

100

50

0

0

5

10

15

time

20

25

30

35

Fig. 4. Comparison actual – ANFIS prediction values

The analysis of model quality was done related to three main types of errors: RMSE, MAE and MAPE. The results for the case of six gauss membership functions (minimum error) are presented bellow. RMSE_anfis = 3.1865 MAE_anfis = 1.9174 MAPE_anfis = 2.9771 5. Conclusion

The paper presents an ANFIS forecasting model. The results were presented based on three different kinds of errors: RMSE, MAE and MAPE. The ANFIS model gives the best results for the case of six gauss membership functions and 300 epochs. This research aimed to prove that a neuro-fuzzy approach can be used to forecast the CPI. The weak aspects of other forecasting methodologies for time series could be overcome with the proposed adaptive network with fuzzy inference system (ANFIS). The data available in the form of input output pairs can be used in the ANFIS with relative ease. Without having the state that was solved the whole setback of CPI forecasting, one allocate noting that the conclusions of this study have useful connotation. Supplementary enhancement is still promising if a large amount of information could be added in the learning algorithm. References

Aiken M. (1999) - Using a neural network to forecast inflation, Journal of Industrial Management & Data Systems, Volume 99, Issue 7, Page 296–301, ISSN 0263-5577, Publisher MCB UP Ltd. Choudhary A. and Haider A. (2003) – Neural Network Models for Inflation Forecasting: an Appraisal, Discussion Paper. Cox E. (2000) - A Data Mining and Rule Discovery Approach to Business Forecasting with Adaptive, GeneticallyTuned Fuzzy Systems Models, PCAI Magazine, Volume 13, Issue 5. Hagan M., et. al. (1996). Neural Network Design. Boston MA.: PWS Publishing, 1996. Jang, J.S. (1993). ANFIS: Adaptive-Network-Based Fuzzy Inference Systems. IEEE Transactions on Systems, Man, and Cybernetics, Vol. 23(3), pp. 665–685. Kuan, C. M. and H. White (1994) Artificial Neural Networks: An Econometric Perspective. Econometric Reviews, 13, 1–91. Maasumi E., A. Khotanzad, and A. Abaye (1996) Artificial neural networks for some macroeconomic series: a first report. Econometric Reviews, 13 (1), 105–122. McAdam P. and McNelis P. (2005) - Forecasting Inflation with Thick Models and Neural Networks, Economic Modeling, Elsevier, vol. 22(5), pages 848–867 Moshiri S. and Cameron M. (2000) - Neural network versus econometric models in forecasting inflation, Journal of Forecasting,Volume 19, Issue 3, Page 201–217 314

FORECASTING CPI USING A NEURAL NETWORK WITH FUZZY INFERENCE SYSTEM

Nishina T., Hagiwara M. (1997). Fuzzy Inference Neural Network. Neurocomputing 14, Elsevier Science B. V., pg. 223–239. Salzano M. and Colander D. (2007) – Complexity Hints for Economic Policy, Springer Milan, ISBN 978-88-4700533-4 Ranasinghe M. et al. (2001). A Comparative Study of Artificial Neural Networks and Multiple Regression Analysis in Estimating Willingness to Pay for Urban Water Supply. Department of Civil Engineering, university of Moratuwa, Sri Lanka. *** - Bank of Canada *** - OECD Database

315