Differential geometry approach to some macroeconomic analysis of Visegrad countries in Mathematica

Ladislav Lukas

Univ. of West Bohemia, Faculty of Economics, Dpt. of Econ. and Quantitative Methods
Husova 11, 30614 Pilsen, Czech Republic
tel.: +420 37 763 3107, e-mail: lukasl@kem.zcu.cz

Introduction

Macroeconomic analysis is a very attractive field of research.  
In our WTC 2011 paper, we are concerned with a comparative macroeconomic analysis based upon 
- GDP,
- inflation,
- stock exchange index 
time series of Visegrad countries within the period 1997Q1 till 2010Q4. 

Reasoning about the length of investigated period was motivated with three intuitive aspects 
1) to eliminate prospective transient development of economy after 1989,
2) to include period of relative stable and progressive economic development,
3) to involve periods which were impacted by global financial crisis, too. 

Parametric representation of data in 3-D state space enables to tackle the macroeconomic developments as curves in the state space. 
We do believe that our non-traditional approach provides new insights to macroeconomic analysis and is able to build new characteristics.

Macroeconomic data processing

Raw data

We have used the data accumulated and presented in [6], which had been downloaded from Eurostat, OECD databases and public databases of Stock exchanges of individual V4 countries, i.e. Czech republic, Hungary, Poland and Slovak republic (in abbreviation CZ, HU, PL, and SK, respectively). 
As we have focused our analysis upon three important macroeconomic quantities - GDP, inflation and national stock exchange index, so in total, we have got four sets of three time series with 56 entries each. 

Let (Subscript[, k])x denotes a 3-D vector time series for k-th country, k=1,2,3,4 (in lexicographical order k=1 ~ CZ, k=2 ~ HU, k=3 ~ PL, k=4 ~ SK).

Each (Subscript[, k])x has three 1-D time series components denoted (Subscript[, k])(Subscript[x, n]), n =1,2,3, 
where n=1 ~ stock exchange index, n=2 ~ GDP, n=3 ~ inflation rate. 
Since each of them has 56 entries, we need even more subtle notation to identify any particular entry. 
Let (Subscript[, k])(Subscript[x, n,m]), m =1,2,…,56 denote individual entries. However, for some purposes we need to identify a particulatr year and quarter, too. 
Hence, we adopt the following notation (Subscript[, k])(Subscript[x, n,m(i,j)]) with index function m(i,j)=4(i-1)+j, 
where i=1,2,..,14 denote years 1997, 1998,.., 2010, and j=1,2,3,4 stands for quarters of each year Q1,..,Q4. 
. 
The raw downloaded data for V4 countries are denoted (Subscript[, k])y and their entries (Subscript[, k])(Subscript[y, n,m]), m=1,2,…,56, respectively.

Data transformation

The raw data (Subscript[, k])y, k=1,..,4 are given in their natural units, which are rather different in their numerical values. 
In order to make them suitable for our analysis based on differential geometry the raw data (Subscript[, k])y have been scaled and transfered into (Subscript[, k])x by procedure given by (1) and (2).

		(Subscript[, k])(Subscript[r, n]) = 0.25((∑_(j=1)^4)(Subscript[, k])(Subscript[y, n,m(9,j)])) , k=1,..,4, and n =1,2,3,				(1)
		
		where index function m(9,j),  j =1,2,3,4,  i=9, gives values {33,34,35,36}.

Quantities (Subscript[, k])(Subscript[r, n]) represent the scaling factors and give averaged values for corresponding V4 countries macroeconomic time series. 
In a role of reference year we have selected the year 2005, hence i=9, since we simply accepted this year as a break-year between ‘stable development’ and period accused by global financial crisis. 
Hence, the formula (1) gives an "averaged quarter" of the year 2005 for all macroeconomic quantities (n =1,2,3) and V4 countries (k=1,..,4).
 
Of course, it could be a matter of discussion, but the scaling procedure is rather flexible and could be applied for any other selected basis year, a quarter, or another period averaged.

  Vector time series (Subscript[, k])x with their components are given by (2), where T stands for transposition. 
		(Subscript[, k])(Subscript[x, n,m ])= (Subscript[, k])(Subscript[y, n,m ])/(Subscript[, k])(Subscript[r, n]),  m =1,2,..,56, and k=1,..,4, n =1,2,3,			(2)

					(Subscript[, k])x = ((( (Subscript[, k])(Subscript[x, 1,m ]), (Subscript[, k])(Subscript[x, 2,m ]), (Subscript[, k])(Subscript[x, 3,m ])))^T).


Corresponding Mathematica code snippet - for CZ (k=1) only:

Differential geometry approach

Differential approach - construction of interpolans and moving Frenet frames

We refer [3] and [4] for more details on differential geometry as being short and individual reference selection only.
In general, differential geometry deals with curves, surfaces or more general manifolds in analytic way. 
Hence in order to get a curve, our first step is to define interpolants of (Subscript[, k])x. 
First, we choose piecewise linear interpolation, and the second one is cubic spline interpolation, which both provide continuous functions.

Let (Subscript[, k])p(t), kq(t) denote piecewise linear and cubic spline interpolants of vector time series (Subscript[, k])x defined on interval [1,56] given by (3a) and (3b), respectively. 

Further, let d be a time series with m entries in general, then (Subscript[s, 1])(t;d) and (Subscript[s, 3])(t;d) stand for  piecewise linear continuous and cubic spline scalar interpolants, respectively, 
defined on interval [1,m], and built by well-known procedures. 

		(Subscript[, k])p(t) = ((Subscript[s, 1])(t;(Subscript[, k])(Subscript[x, 1,m ])), (Subscript[s, 1])(t;(Subscript[, k])(Subscript[x, 2,m ])), (Subscript[s, 1])(t;(Subscript[, k])(Subscript[x, 3,m ])))T , k=1,..,4,		(3a) 
		(Subscript[, k])q(t) = ((Subscript[s, 3])(t;(Subscript[, k])(Subscript[x, 1,m ])), (Subscript[s, 3])(t;(Subscript[, k])(Subscript[x, 2,m ])), (Subscript[s, 3])(t;(Subscript[, k])(Subscript[x, 3,m ])))T , k=1,..,4.		(3b) 

Example: for CZ (k=1) we get (Subscript[s, 1])(t;(Subscript[, k])(Subscript[x, 1,m ])) and (Subscript[s, 3])(t;(Subscript[, k])(Subscript[x, 1,m ])) by following Mathematica code

Having for each k-th country vector functions (Subscript[, k])p(t) and (Subscript[, k])q(t) we are able to construct well known Frenet frame at any point t.
 
Let (Subscript[, k])F(t) denotes the Frenet frame at point t which defines corresponding local basis at this point, and is composed by three specific vectors - a tangent vector, normal, and binormal vector, respectively.
			(Subscript[, k])F(t) = ((Subscript[, k])τ(t), (Subscript[, k])ν(t), (Subscript[, k])β(t)) ,  k=1,..,4,
			
	where  (Subscript[, k])τ(t) = ((d((Subscript[, k])p(t)))/(dt)) stands either for linear interpolant, or 
		 (Subscript[, k])τ(t) = ((d((Subscript[, k])q(t)))/(dt)) for cubic one, respectively.

Results

Trajectories in 3-D state space for each country individually

Evaluate the Mathematica notebook wtc2011~LLa.nb 
to plot (Subscript[, k])p(t) and (Subscript[, k])q(t) curves in 3-D space representing pathes of macroeconomic development of V4 countries (CZ, HU, PL, and SK) using data (Subscript[, k])x. 

The points on the curves are located at the following quarters 1997Q1, 1999Q1, 2001Q1, 2003Q1, 2005Q1, 2007Q1, 2009Q1 and 2010Q4, thus giving better insight to movement along the whole time span [1997Q1,2010Q4]. 

We may conclude that there is not a great difference between piecewise linear and cubic spline interpolants in all V4 countries, at the first sight.

Corresponding Mathematica code snippet - for CZ, again:

(* CZ plot *)
czpoints3Dcub=Table[Point[{czfPxCub[x],czfHdpCub[x],czfInflCub[x]}],{x,{1,9,17,25,33,41,49,56}}]; (* {x,1,lDat,8} *)
czp05cub=Table[Point[{czfPxCub[x],czfHdpCub[x],czfInflCub[x]}],{x,{1,9,17,25,33,34,35,36,41,49,56}}]; 
czpoints3Dlin=Table[Point[{czfPxLin[x],czfHdpLin[x],czfInflLin[x]}],{x,{1,9,17,25,33,41,49,56}}];
czp05lin=Table[Point[{czfPxLin[x],czfHdpLin[x],czfInflLin[x]}],{x,{1,9,17,25,33,34,35,36,41,49,56}}]; 
czpp3Dcub=Graphics3D[{PointSize[0.01],RGBColor[0,0,1],czpoints3Dcub}];
czpp3Dlin=Graphics3D[{PointSize[0.01],RGBColor[0,0,1],czpoints3Dlin}];
czf3Dcub=ParametricPlot3D[{czfPxCub[t],czfHdpCub[t],czfInflCub[t]},{t,1,lDat},PlotLabel->"CZ: plot 3-D (ref.base 2005=:=100%)\n  curve with cubic spline components {px(t),hdp(t),infl(t)}, t=1997,..,2010 ^{Q1,Q2,Q3,Q4}\n  state space Range[px/2005]xRange[hdp/2005]xRange[infl]\n   dots in t={97Q1,99Q1,01Q1,03Q1,05Q1,07Q1,09Q1,10Q4}",ImageSize->{750,750},AxesLabel->{"px","hdp","infl"}];
plotCZcub=Show[czf3Dcub,czpp3Dcub]
czf3Dlin=ParametricPlot3D[{czfPxLin[t],czfHdpLin[t],czfInflLin[t]},{t,1,lDat},PlotLabel->"CZ: plot 3-D (ref.base 2005=:=100%)\n  cont.piecewise linear curve {px(t),hdp(t),infl(t)}, t=1997,..,2010 ^{Q1,Q2,Q3,Q4}\n  state space Range[px/2005]xRange[hdp/2005]xRange[infl]\n   dots in t={97Q1,99Q1,01Q1,03Q1,05Q1,07Q1,09Q1,10Q4}",ImageSize->{750,750},AxesLabel->{"px","hdp","infl"}];
plotCZlin=Show[czf3Dlin,czpp3Dlin]

Trajectories for all V4 countries together

Evaluate the Mathematica notebook wtc2011~LLa.nb 
to plot all four curves (Subscript[, k])p(t) and (Subscript[, k])q(t) in 3-D space together in order to compare macroeconomic developments of all V4 countries (CZ, HU, PL, and SK) using data (Subscript[, k])x, k=1,2,3,4.

Corresponding Mathematica code snippet - for all V4 {CZ, HU, PL, SK} countries:

Trajectory lengthes for each country individually, and for all V4 countries together

Differential geometry introduces moving Frenet frame along a curve and provides definition of curve length in 3-D. 
Let z(t)=((Subscript[z, 1])(t), (Subscript[z, 2])(t), (Subscript[z, 3])(t))T be a smooth curve defined over an interval [a,b]. Its length l(a,b) is given by (4).

		l(a,b) = (∫_a^b)‖(Overscript[z, ·])(t)‖dt, (Overscript[z, ·])(t) = ((Subscript[(OverDot[z]), 1])(t), (Subscript[(OverDot[z]), 2])(t), (Subscript[(OverDot[z]), 3])(t))T,  (Subscript[(OverDot[z]), n])(t) = ((d(Subscript[z, n])( t))/(dt)), n=1,2,3	      (4)

Evaluate the Mathematica notebook wtc2011~LLa.nb to plot trajectory lengthes for each country individually, and for all V4 countries together, respectively.

The longest curve belongs to HU, the second one as to the lenght has PL, and finally CZ an SK curves are very similar at all. 
However, inspecting precisely the global lengths by elevation of the 2010Q4 points we identify the shortest path belongs to SK and the length of CZ curve is a little bit longer. 

Just above time axis t the length increments between adjacent quarter data are depicted. The total length of (Subscript[, k])p(t) is calculated simply by addition of corresponding increments. 

Corresponding Mathematica code snippet - for CZ, again:

Corresponding Mathematica code snippet - for all V4 {CZ, HU, PL, SK} countries with jpeg-image export:

Rotations of normed tangent vectors for each country individually, and for all V4 countries together  (*Subsection*)

Within differential geometry one can simply define normed tangent vector function w(t) using the first vector component  of Frenet frame along a curve as follows. and provides definition of curve length in 3-D. 
		w(t) = (((Overscript[z, ·])(t))/(‖ (Overscript[z, ·])(t)‖)),  where z(t)=((Subscript[z, 1])(t), (Subscript[z, 2])(t), (Subscript[z, 3])(t))T represents a smooth curve, again.

Evaluate the Mathematica notebook wtc2011~LLb.nb to plot rotation trajectories on the 3-D unit sphere S(0;1) for each country individually, and for all V4 countries together, respectively.

The corresponding Mathematica code looks as follows - for CZ (k=1) only:

Corresponding Mathematica code snippet - for all V4 {CZ, HU, PL, SK} countries with jpeg-image export:

(* *** plot su3a & {CZ,HU,PL,SK}_angleCurves *)
Show[{su3a,czfSU3lin,hufSU3lin,plfSU3lin,skfSU3lin},ImageSize->{1250,1050}]
Show[{su3a,czfSU3linThick,hufSU3linThick,plfSU3linThick,skfSU3linThick},ImageSize->{1250,1050}]

Conclusion

1) We have analyzed some macroeconomic development curves of V4 countries and their lengths by differential geometry approach. 

2) We consider the analysis interesting and promising.

3) Further research is ongoing.

Acknowledgement

Author acknowledges gratefully funding by the project LC06075 of the Ministry of Education, Czech Republic.

References

[1] Bartóková L.: The Evolution of the Monetary Policy Transmission Mechanisms of V4 Countries. 
E+M Ekonomie a Management (2/2010),6-18.

[2] Beck J., Lukáš L.:
Some comparative macroeconomic analysis of Visegrad countries using 
differential approach. 
Proceedings of Int.Conf. Mathematical Methods in Economics 2011.
 Jasna Dolina,Slovak Republic. 2011-09-07/09.

[3] Chern,S-S.,Chen,W.,Lam,K.S.:
Lectures on differential geometry.World Scientific Publ.,Singapore,2000,ISBN 981-0234-945.

[4] Gray,A.,Abbena,E.,Salamon,S.:
Modern Differential Geometry of Curves and Surfaces in Mathematica.3.e., Chapman and Hall CRC,2006,pp.1016,ISBN 1584884487.

[5] Skála,M.:
New Keynesian Macroeconomics-A New Perspective on Labour Market and Macroeconomic Stability (in czech).
E+M Ekonomie a Management (4/2010),6-16.

[6] Telínová,L.:
Comparison of stock exchange of the Visegrad group (in czech).
Plzeň:UWB/FEK,Master thesis,2011.