ap-5-11.dvi Acta Polytechnica Vol. 51 No. 5/2011 Chaos in GDP R. Kř́ıž Abstract This paper presents an analysis of GDP and finds chaos in GDP. I tried to find a nonlinear lower-dimensional discrete dynamicmacroeconomicmodel thatwould characterizeGDP.Thismodel is represented bya set of differential equations. I have used the Mathematica and MS Excel programs for the analysis. Keywords: macroeconomic modeling, gross domestic product, chaos theory. 1 Introduction Humanity has always been concerned with the ques- tion whether the processes in the real world are of a stochastic or deterministic nature. Answers are ex- plored by theologians, philosophers and scientists in various fields. I take the view that real processes are more deterministic in nature. An interesting case of determinism is deterministic chaos. The only purely stochastic process is amathematicalmodel described by mathematical statistics. The statistical model of- tenworksand is the onlypossible description ifwedo not know the system. This also applies to economic quantities, including forecasts for GDP. In this pa- per I have tried to grasp the hidden essence of the problem in order to formulate a predictionmore eas- ily. The basic question is therefore the existence of chaotic behavior. If the system behaves chaotically, we are forced to accept only limited predictions. In this paper I will try to show the chaotic behavior of GDP and then propose a simple lower-dimensional system under which the system evolves. 2 Methodology for the analysis I will briefly state the basic definitions and describe the basic methods for examining the input data. 2.1 Gross domestic product Gross domestic product (GDP) is a major macroeconomic indicator. It measures the overall production performance of the economy. It is the totalmarket value of all final goods and services pro- duced within a country during some period, usually one year, expressed in monetary units [8]. It is of- ten considered an indicator of a country’s standard of living. GDP can be determined in three ways, all of which should, in principle, give the same result. They are the product (or output) approach, the in- come approach, and the expenditure approach. Y = C + I + G +(X − M) (1) • C (consumption) is normally the largestGDP component in the economy, consisting of pri- vate (household final consumption expenditure) in the economy. • I (investment) includes business investment in equipment, for example, and does not include exchanges of existing assets. • G (government spending) is the sum of gov- ernment expenditures on final goods and ser- vices. • X − M (net exports) represents gross exports X — gross imports. 2.2 Hurst exponent The Hurst exponent is widely used to character- ize some processes. The Hurst exponent is a mea- sure that has been widely used to evaluate the self- similarity and correlation properties of fractional Brownian noise, the time-series produced by a frac- tional (fractal) Gaussian process. As originallydefinedbyMandelbrot [5], theHurst exponent H describes (among other things) the scal- ing of the variance of a stochastic process y(t), σ2 = ∫ +∞ −∞ y2f(y, t)dy = ct2H (2) where c is constant. The Hurst exponent is used to evaluate the pres- ence or absence of long-range dependence and its de- gree in a time-series. The Hurst exponent (H) is defined in terms of the asymptotic behavior of the rescaled range as a function of the time span of a time series, as follows E [ R(n) S(n) ] = CnH as n → ∞, (3) 63 Acta Polytechnica Vol. 51 No. 5/2011 where [R(n)/S(n)] is the rescaled range; E[y] is ex- pected value; n is number of data points in a time series, C is a constant. An algorithm for calculation is used from Wikipedia [12]. To calculate the Hurst exponent, one must estimate the dependence of the rescaled range on the time span n of observation. The av- erage rescaled range is then calculated for each value of n. For a (partial) time series of length n, Y = Y1, Y2, . . . , Yn, the rescaled range is calculated as fol- lows: 1. Create a mean-adjusted series Ut = Yt − 1 n n∑ i=1 Yi for t =1,2, . . . , n (4) 2. Calculate the cumulative deviate series V ; Vt = n∑ i=1 Ui for t =1,2, . . . , n (5) 3. Compute the range R; R(n)=max(V1, V2, . . . , Vn)−min(V1, V2, . . . , Vn) (6) 4. Compute the standard deviation S S(n)= √√√√1 n n∑ i=1 (Yi − Ȳ )2 (7) 5. Calculate the rescaled range and average over all the partial time series of length n. The Hurst exponent is estimated by fitting the power law, ac- cording to the definition. The values of the Hurst exponent vary between 0 and 1, with higher values indicating a smoother trend, less volatility, and less roughness. Random walk has a Hurst exponent of 0.5. 2.3 Fractal The term “fractal” was first introduced by Mandel- brot [4]. A fractal is a complicated geometric figure that, unlike a conventional complicated figure, does not simplifywhen it ismagnified. In thewaythatEu- clideangeometryhas servedas adescriptive language for classicalmechanics ofmotion, fractal geometry is being used for the patterns produced by chaos [9]. The fractal dimension, D, is a statistical quan- tity that gives an indication of howcompletely a frac- tal appears to fill space, as one zooms down to finer and finer scales. There are many specific definitions of fractal dimension. Hurst exponent H is directly related to fractal di- mension D, because the maximum fractal dimension for a planar tracing is 2: D + H =2 (8) 2.4 Correlation dimension Correlationdimension (DC) describes thedimension- ality of the underlying process in relation to its ge- ometrical reconstruction in phase space. The corre- lation dimension is calculated using the fundamental definition. Define the correlation integral for set of data M: C(r) = 1 M(M −1) M∑ i, j =1 i �= j H (r − ‖yi − yj‖) (9) where H is the Heaviside step function. H(x)= ⎧⎪⎪⎨ ⎪⎪⎩ 0 y < 0 1 2 y =0 1 y > 0 (10) A Euclidean metric is used for all calculations in this paper. When a lower limit exists, the correlation dimension is then defined as DC = lim r → 0 M → ∞ ln(C(r)) ln(r) (11) 2.5 Lyapunov exponents The Lyapunov exponent or the Lyapunov character- istic exponent of a dynamical system is a quantity that characterizes the rate of separation of infinitesi- mally close trajectories. Quantitatively, two trajecto- ries in phase spacewith initial separation δZ0 diverge (provided that the divergence can be treated within the linearized approximation) δZ(t) ≈ eλt |δZ0| (12) where λ is the Lyapunov exponent. The maximal Lyapunov exponent can be defined as follows: λ = lim δZ0 → 0 t → ∞ 1 t ln |δZ(t)| |δZ0| (13) The limit δZ0 → 0 ensures the validity of the linear approximation at any time. MaximalLyapunov exponentdetermines a notion of predictability for a dynamical system. A positive Maximal Lyapunov exponent is usually taken as an indication that the system is chaotic (provided some 64 Acta Polytechnica Vol. 51 No. 5/2011 other conditions are met, e.g., phase space compact- ness) [13]. 3 Introduction to nonlinear dynamics If the world is not linear (and there is no qualitative reason to assume that it is linear), it should be nat- ural to model dynamical economic phenomena non- linearly [2]. If it is present in the general system of nonlinear dynamics, a deterministic system can gen- erate random-looking results, but may include hid- den order. In this paper I have studied only a low- dimensional discrete dynamical system. 3.1 Discrete dynamical system Definition from Goldsmith [6]: A discrete-time dy- namical system on a set Y is just the function Φ:Y → Y (14) This function, often called a map, may describe the deterministic evolution of some physical system: if the system is in state y at time t, then it will be in state Φ(y) at time t +1. The study of discrete-time dynamical systems is concerned with iterates of the map: the sequence y,Φ(y),Φ2(y), . . . (15) is called the trajectory of y and the set of its points is called the orbit of y. These two terms are often used interchangeably, although we will remain consistent in their usage. The set Y in which the states of the system exist is referred to as the phase space or state space. We will restrict our attention to maps Φ(y) such that Y is a subset of Rd. 3.2 One-dimensional discrete dynamical system The one-dimensional discrete system is yt+1 = f(yt) yt ∈ � (16) One-dimensional, discrete dynamical systems in economics are surely suited for demonstrating the relative easy with which complex behavior can be modeled. The mathematical properties of one- dimensional dynamical systems seemtobebetter un- derstood than higher-dimensional systems [2]. The logistic equation is a typical example of easy one-dimensional discrete dynamical systems which can be chaotic. yt+1 = μyt(1− yt) (17) The logistic equation has been described inmany books andpapers e.g. [1,2,6,9,10]. The logistic equa- tion is chaotic, when control parameter μ is between 3.5699 . . . and 4. 4 Analysis of GDP 4.1 Input data The gross domestic product by type of expenditure in current prices is used in this paper. I have used data (quarterly, without seasonal adjustment) from the Czech Statistical Office. I analyze data from the Czech Republic between 1995 and 2010 [11]. Fig. 1: GDP with linear trend of GDP 4.2 Calculation of H and Dc The main problem in analyzing GDP is the lack of data. Therefore, all results are only estimates. I have computed the Hurst exponent for GDP H = 0.75 according to the algorithm in chapter 2.2. This value is in accordance with expectations. We know that the value of H is between 0 and 1, whilst real time series are usually higher than 0.5. If the exponent value is close to 0 or 1, it means that the time-series has long-range dependence. Value 0.75 is directly between the stochastic and deterministic process. I think that 0.75 value is a sufficient value for credible prediction. Nowwe also know the fractal dimension 2−0.75=1.25. Fig. 2: Correlation integral, value with a linear trend 65 Acta Polytechnica Vol. 51 No. 5/2011 The correlation dimension is calculated using the fundamental definition in Section 2.4. Wehavehad a problemwith lack of data for this computing. I have put the calculated data into a graph in logarithmic coordinates, and I have made a linear interpolation. (cf. Figure 2). On this basis, the correlation dimen- sion for the small value of r can be estimated. The estimate of the correlation dimension is a value lower than 2. If the correlation dimension is low, the Lyapunov exponent is positive and the Kol- mogorov entropy has a finite positive value, chaos is probably present. From estimates H and Dc it can be concluded that GDP is a deterministic chaos. 4.3 Analyzing in phase space In the previous section (Section 4.2) we verified the presence of chaos in GDP. Data with a trend can cause problems for future analysis. The trend is removed by subtracting the linear interpolation. Denote GDP without trend as Y (t). Fig. 3: GDP without trend Fig. 4: GDP in phase space A phase portrait 2D of GDP is constructed so that each ordered pair of {Yt;Yt−1, t = 2, . . . , N} is displayed in theplanewhere the x-axis represents the values of Yt and y-axis value Yt−1 (cf. Figure 4). The individual points {Yt;Yt−1} of phase space are con- nected by a smooth curve. This curve looks like a chaotic attractor. The points are located mainly in the first and third quadrant. The phase portrait 3D of GDP is constructed so that each ordered trio of {Yt;Yt−1, Yt−2, t = 3, . . . , N} is displayed in the space. The individual points {Yt;Yt−1, Yt−2} of 3D phase space are con- nected by a line (cf. Figure 5) or coveredby a surface (cf. Figure 6). Figure 6 looks very strange. Fig. 5: GDP in 3D phase space (Yt, Yt−1, Yt−2) Fig. 6: GDP in 3D phase space (Yt, Yt−1, Yt−2) 5 GDP as a dynamical system I have tried to find a system that will be similar to GDP, based on the previous analysis. 66 Acta Polytechnica Vol. 51 No. 5/2011 5.1 Comparison of GDP with an one-dimensional discrete dynamical system Chaotic course Yt can be immediately simulated by a logistic equation, but a progression in the phase space is completely different. A logistic equation can be appropriate for simulation, but not for forecast- ing. If we consider a function, it should be an odd function. I have studied several one-dimensional systems with a cubic function. It is reasonable to assume that that function has one root 0. The desired equation can be written in the form: yt+1 = yt(αy 2 t − β) (18) Fig. 7: Cubic function: Plot [y^3-2.8y,y,-2,2] Fig. 8: Bifurcation diagramof function y3−by, {b,2.25,3} Fig. 9: Chaos in cubic function Yt+1 = Y 3 t − 2.8Yt 6 Conclusion I have shown in this paper thatGDP can be chaotic. I found a very simple nonlinear differential equa- tionwhich properly captures GDP. According to the phase portrait, it seems that the function should be odd. The most appropriate function is the cubic equationwith a single zero root. It is a simple system that is easy to interpret. It should be noted that this system is not perfect and it would be useful to find a set of differential equations of higher order. The biggest problem in finding a suitable system is the lack of data. This paper analyzes GDP as such. It would be more sophisticated to create a theoretical model and calibrate it. Acknowledgement The research presented in the paper was supervised by doc. Ing. Helena Fialová, CSc., FEE CTU in Prague and supported by the Czech Grant Agency under grant No. 402/09/H045 “Nonlinear Dynamics in Monetary and Financial Economics. Theory and Empirical Models.” References [1] Allen, R. G. D.: Matematická ekonomie. Academia, 1971. [2] Lorenz, H.-W.: Nonlinear Dynamical Eco- nomics and Chaotic Motion. Springer-Verlag, 1989. [3] Flaschel,P., Franke,R.,Demmler,W.: Dynamic Macroeconomics. The MIT Press, 1997. [4] Mandelbrot,B.B.: TheFractalGeometry ofNa- ture. W. H. Freeman and Co., 1983. [5] Mandelbrot, B. B., Ness Van, J. W.: Fractional Brownian motions, fractional noises and appli- cations. SIAM Rev. 10 (1968), pp. 422. [6] Goldsmith, M.: The Maximal Lyapunov Expo- nent of a Time Series. Thesis, 2009. [7] Grassberg, P., Procaccia, I.: Characterization of strange attractors,Phys. Rev. Lett.50 (1983) 346. [8] Fialová, H., Fiala, J.: Ekonomický slovńık. A plus, 2009. [9] Alligood, T. K., Sauer, D. T., Yorke, J. A.: CHAOS an introduction to dynamical systems. Springer, 2000. 67 Acta Polytechnica Vol. 51 No. 5/2011 [10] Chiarella, C.: The Elements of a Nonlinear Theory ofEconomicDynamics.Springer-Verlag, 1990. [11] http://www.czso.cz/eng/redakce.nsf/i/time series [12] http://en.wikipedia.org/wiki/Hurst exponent [13] http://en.wikipedia.org/wiki/Lyapunov exponent About the author Radko Kř́ıž,MSc. wasborn inBroumov. Hegrad- uated at the Faculty of Electrical Engineering of the CzechTechnicalUniversity in Prague, specializing in Economics and Management in Electrical Engineer- ing, and he is currently aPhD student at theFaculty of Electrical Engineering of theCzechTechnicalUni- versity in Prague. His major fields of specialization are Macroeconomics, Energetics, Nonlinear Dynam- ics in Economics and Chaos Theory. Radko Kř́ıž E-mail: krizradk@fel.cvut.cz Dept. of Economics Management and Humanities Faculty of Electrical Engineering Czech Technical University Technická 2, 166 27 Praha, Czech Republic 68