1 Introduction

Studying the dynamics of finance behaviour and economics is very challenging. Because fractional operators are non-local, they are suitable for constructing models for long series, possessing a memory effect—more so than models using integer derivatives and integrals alone [1]. This is the reason why fractional differential equations possess large advantage in describing economic phenomena over large time periods.

Recently, a variety of fractional order models have been proposed in the literature to account for the behaviour of financial processes from different viewpoints. For example, as diffusion or stochastic processes by means of Lévy models [26], continuous time random walks (e.g. [712]), or differentiable manifolds [13]. Laskin [14] applied a modified fractality concept to describe the stochastic dynamics of the stock and currency markets. From a macroeconomic point of view, on the one hand, [15, 16] proposed a state space model for national economies involving three variables; a similar idea was used in [17] but considering variable orders. On the other hand, [18] and [19] investigated four- and three-variable discrete macroeconomic models, respectively. Likewise, [2022] discussed financial processes from the chaos systems perspective; results were adapted to estimate the evolution of macroeconomic variables in Japan in [23]. Finally, [24, 25] analysed the dynamics of world economies based on pseudo-phase plane and state space analysis.

Thus, many models have been published, among which the classical papers [26, 27] on GDP growth. Yet, to the best of our knowledge, no fractional model of GDP as a function of a vector of inputs had yet been found. Given this motivation, the objective of this work is to model the growth of national economies through their gross domestic products (GDPs) by means of a fractional order approach. More precisely, the GDP of national economies is given as function of a vector with nine variables. The particular cases of the national economies of the Iberian peninsula, viz. Spain and Portugal, along the last five decades, are studied. Preliminary results can be found in [28, 29]. The sources of the data are given in the “Appendix”.

This paper is organised as follows. For reference purposes, Sect. 2 introduces fractional derivatives. Section 3 describes the proposed method to describe the growth of national economies. In Sect. 4, the obtained results after fitting are given for both the Spanish and the Portuguese economies, and then compared. Finally, Sect. 5 draws the concluding remarks and perspectives future works.

2 Fractional calculus

Let us define differential operator D as \(_c^{}D_t^n f(t) = \frac{\mathrm {d}^n f(t)}{\mathrm {d}t^n}\) and \(_c^{}D_t^{-n} f(t) = \underbrace{\int _c^t \cdots \int _c^t f(\tau ) \,\mathrm {d}\tau \cdots \mathrm {d}\tau }_{|n| \ \text{ integrations }}\). It can be shown by mathematical induction that

$$\begin{aligned} _c^{}D_t^n f(t) = \lim _{h \rightarrow 0} \frac{\displaystyle \sum \nolimits _{k=0}^n (-1)^k \left( \begin{array}{c} n\\ k \end{array} \right) f(t-kh)}{h^n},\quad \ n \in \mathbb {N} \end{aligned}$$
(1)

where combinations of a things, b at a time are given by \(\left( \begin{array}{c} a\\ b \end{array} \right) = \displaystyle \frac{a!}{b!(a-b)!}\). This can be generalised using the Gamma function, which verifies \(\varGamma (n) = (n-1)!, n \in \mathbb {N}\) and is defined in \(\mathbb {C}\backslash \mathbb {Z}^-\), as

$$\begin{aligned} \left( \begin{array}{c} a\\ b \end{array} \right) = \left\{ \begin{array}{ll} \frac{\displaystyle \varGamma (a+1)}{\displaystyle \varGamma (b+1)\varGamma (a-b+1)}, &{}\quad \text{ if } a,b,a-b \notin \mathbb {Z}^-\\ \frac{\displaystyle (-1)^b \varGamma (b-a)}{\displaystyle \varGamma (b+1)\varGamma (-a)}, &{}\quad \ \text{ if } a \in \mathbb {Z}^- \wedge b \in \mathbb {Z}_0^+ \\ 0, &{} \quad \ \text{ if } [(b \in \mathbb {Z}^- \vee b-a \in \mathbb {N}) \wedge a \notin \mathbb {Z}^-] \vee \\ &{}\quad (a,b \in \mathbb {Z}^- \wedge |a|>|b|) \end{array} \right. \end{aligned}$$
(2)

Using (2), it is reasonable to generalise (1) for non-integer orders as

$$\begin{aligned} {}_c^{}D_t^\alpha f(t)&= \lim _{h \rightarrow 0^+} \frac{\sum _{k=0}^{\lfloor \frac{t-c}{h}\rfloor } (-1)^k \left( \begin{array}{c} \alpha \\ k \end{array} \right) f(t-kh)}{h^\alpha } \end{aligned}$$
(3)

Values c and t are called terminals. The upper limit of the summation in (3) is diverging to \(+\infty \). When \(\alpha \in \mathbb {N}\), all terms with \(k>\alpha \) will be zero; thus (3) reduces to (1) when \(h>0\). This is the only case in which the summation has a finite number of terms and the result does not depend on terminal c. The upper limit \(\lfloor \frac{t-c}{h}\rfloor \) was set so that, if \(\alpha = -1, -2, -3, \ldots \), (3) becomes a Riemann integral (calculated from c to t).

For more details on operator D, properties, alternative definitions (e.g. the Caputo definition mentioned below) and Laplace transforms, see e.g. [1, 30].

3 Economic growth model

Consider a simple model of a national economy in the following form:

$$\begin{aligned} y(t) = f(x_1,x_2\ldots ) \end{aligned}$$
(4)

where the output model y is the GDP (in 2012 euros) and the \(x_{k}\) are the variables on which the output depends. The inputs considered are the following:

  • \(x_{1}\): land area (km\(^{2}\));

  • \(x_{2}\): arable land (km\(^{2}\));

  • \(x_{3}\): population;

  • \(x_{4}\): school attendance (years);

  • \(x_{5}\): gross capital formation (GCF) (in 2012 euros);

  • \(x_{6}\): exports of goods and services (in 2012 euros);

  • \(x_{7}\): general government final consumption expenditure (GGFCE) (in 2012 euros);

  • \(x_{8}\): money and quasi money (M2) (in 2012 euros).

The rationale behind this choice of variables is the following:

  • Natural resources are represented by \(x_{1}\), and their quality by \(x_{2}\);

  • Human resources are represented by \(x_3\), and their quality by \(x_4\);

  • Manufactured resources are represented by \(x_5\);

  • External impacts in the economy are represented by \(x_6\);

  • Internal impacts in the economy are represented by \(x_7\) (budgetary impacts), \(x_8\) (monetary impacts) and also by \(x_5\) (investment). Rather than having \(x_5\) play two roles, we will rather use another variable \(x_9 \equiv x_5\) to represent the impact of investment in the economy, bringing the number of inputs up to 9.

This choice of variables joins those traditionally considered in growth accounting [3133] to those acknowledged by Keynesian models having short-term inputs related to impacts in the economy. The quality of manufactured resources is sometimes translated in a variable such as the number of patents filed each year. We did not use this variable, not so much because of difficulties in finding data, as because this indicator is a poor translation of what it is intended to measure, since nowadays patent systems are increasingly globalised [34].

The integer order model considered is

$$\begin{aligned} y(t)&=\, C_1x_1(t) + C_2x_2(t) + C_3x_3(t) + C_4x_4(t) \nonumber \\&\quad +\,C_5\int _{t_0}^tx_5(t)\mathrm {d}t + C_6x_6(t) + C_7x_7(t) \nonumber \\&\quad +\,C_8\frac{\mathrm {d}x_8(t)}{\mathrm {d}t} + C_9\frac{\mathrm {d}x_9(t)}{\mathrm {d}t} \end{aligned}$$
(5)

where \(C_{k}\) are constant weights for each of the variables, and \(t_0\) is the first year considered. Notice that:

  • The accumulated gross capital formation \(\int _{t_0}^tx_5(t)\mathrm {d}t\) is used as a measure of manufactured resources;

  • The variation of M2 \(\frac{\mathrm {d}x_8(t)}{\mathrm {d}t}\) is used as a measure of the monetary impacts in the economy;

  • The variation of the gross capital formation \(\frac{\mathrm {d}x_9(t)}{\mathrm {d}t} = \frac{\mathrm {d}x_5(t)}{\mathrm {d}t}\) is used as a measure of the impact of investment in the economy.

Its generalization to non-integer orders is as follows:

$$\begin{aligned} y(t)=\overset{9}{\underset{k=1}{\sum }}C_{k}\text {D}^{\alpha _{k}}x_{k}(t), \end{aligned}$$
(6)

where \(\alpha _k\) are the differentiation orders of each variable. The Caputo definition was used [1].

Fig. 1
figure 1

Data for Spain: a land area, b arable land, c population, d school attendance, e gross capital formation, f exports of good and services, g general government final consumption expenditure; h Money and quasi money

Fig. 2
figure 2

Data for Portugal: a land area, b arable land, c population, d school attendance, e gross capital formation, f exports of good and services, g general government final consumption expenditure, h money and quasi money

4 Results

As an application of this model, the economies of Spain and Portugal are going to be modelled in the period between 1960 and 2012. This period was considered not only because it is the one for which reliable data can be easily obtained, but also because this is the period where modern economic growth consistently took hold of both these national economies of the Iberian Peninsula. (See economic data in Figs. 1, 2 and also Tables 5, 6 in the “Appendix”.)

The goal of the fitting is to calculate the numerical parameters, i.e., orders \(\alpha _{k}\) and coefficients \(C_{k}\), of the proposed dynamic models (5) and (6) for the two particular national economies. Notice that, for the integer model, the orders are all fixed: that of \(x_5\) is \(-1\), those of \(x_8\) and \(x_9\) are 1, as mentioned in Sect. 3, and all the remaining orders are 0.

The fitting procedure is implemented in MATLAB, using Nelder-Mead’s simplex search method as implemented in function fminsearch, by minimising the mean square error (MSE) defined as

$$\begin{aligned} \mathrm {MSE}=\frac{{\sum \nolimits _{j=1}^{N}}(y_{j}-\hat{y}_{j})^{2}}{N}, \end{aligned}$$
(7)

where N is the number of points, and \(y_{j}\) and \(\hat{y}_{j}\) are the real output and the model output, respectively. In order to evaluate the goodness-of-fit of the obtained models, apart from MSE, the following performance indices will be also calculated:

  1. 1.

    The mean absolute deviation (MAD) as

    $$\begin{aligned} \mathrm {MAD}=\frac{{\sum \nolimits _{j=1}^{N}}|y_{j}-\hat{y}_{j}|}{N}. \end{aligned}$$
    (8)
  2. 2.

    The coefficient of determination (R\(^{2}\in (0,1)\)) defined as

    $$\begin{aligned} \mathrm {R}^{2}=1-\frac{{\sum \nolimits _{j=1}^{N}}(y_{j} -\hat{y}_{j})^{2}}{{\sum \nolimits _{j=1}^{N}}(y_{j}-\bar{y})^{2}}, \end{aligned}$$
    (9)

    where \(\bar{y}\) is the mean of the GDP.

  3. 3.

    The t and p values for each variable.

The calculation of these indices is carried out by means of the MATLAB command regstats.

As will be seen below, not all variables turned out to be necessary for the models. This will be evaluated from t and p values for each variable, checking if the performance indexes MAD and \(R^2\) deteriorate significantly when removing one or more variables from the model, and using the Akaike Information Criterion (AIC), given by

$$\begin{aligned} \mathrm {AIC} = N \log \frac{\displaystyle \sum \nolimits _{j=1}^N \left( y_j-\hat{y}_j\right) ^2}{N} + 2K + \frac{2K(K+1)}{N-K-1} \end{aligned}$$
(10)

where K is the number of parameters of the model. The value of the AIC gives no information about the quality of a model, but comparing the AIC values of different models shows which ones are more likely to be a good model for the data: a lower value indicates a more likely model. Furthermore, if we have M models, the Akaike weight given by

$$\begin{aligned} w_i = \frac{\displaystyle \exp \left( -\frac{\displaystyle \mathrm {AIC}_i-\min _M\mathrm {AIC}}{2}\right) }{\displaystyle \sum \nolimits _{j=1}^M \exp \left( -\frac{\displaystyle \mathrm {AIC}_j-\min _M\mathrm {AIC}}{2}\right) } \end{aligned}$$
(11)

gives the probability of model i being the best among the M models.

Fig. 3
figure 3

Fitting results for the Spanish case (models with nine variables): the integer model is given by (5), the fractional\(_1\) model by (6), and the fractional\(_2\) model by (12)

Table 1 Fitting results for the Spanish economy: orders of the fractional operator and coefficients

4.1 The Spanish economy

The models obtained for the Spanish economy are shown in Fig. 3, with the values of the orders \(\alpha \) and the coefficients C given in Table 1. It can be seen that the differentiation orders obtained for \(x_1\), \(x_2\), \(x_3\), \(x_6\) and \(x_7\) of fractional order model (6) are zero (or almost zero), which leads us to consider a simpler model, in which only variables \(x_{4}\), \(x_{5}\), \(x_{8}\) and \(x_{9}\) are assumed to have fractional order influence, as follows:

$$\begin{aligned} y(t) = \overset{}{\underset{k=1,2,3,6,7}{\sum }}C_{k}x_{k}(t) +\overset{}{\underset{k=4,5,8,9}{\sum }}C_{k} \, D^{\alpha _{k}}x_{k}(t). \end{aligned}$$
(12)

What this means is that not all economic indicators have the same influence over time on the GDP: for some (those with \(\alpha =0\)) only the current value matters. The results related to this model are also included in Fig. 3 and Table 1.

The performance indices calculated for models (5), (6) and (12) are summarised in Table 2, where t values corresponding to variables which are necessary for the model, assuming a 5 % significance level, are in bold. As observed, the population (\(x_3\)) and the variation of GCF (\(x_9\)) have a considerable effect on the integer model, whereas the remaining variables have low influence. In contrast, for the fractional models, it is clear that only the arable land (\(x_2\)) and the GGFCE (\(x_7\)) are variables without much influence in the GDP. This can be confirmed using the AIC: models obtained without one of the variables with a t value higher than the threshold assumed have a \(0\,\%\) probability of being the best.

The fractional models have a clearly better performance, confirmed by all performance indexes, at the expense of needing more variables (7 against 2 for the integer model).

Taking into account the low influence of variables \(x_{2}\) and \(x_{7}\) in the model, let us consider a simpler model with only 7 inputs, with an integer form given by

$$\begin{aligned} y(t)&=\,C_{1}x_{1}(t)+C_{3}x_{3}(t)+C_{4}x_{4}(t)+C_{5}\int _{t_{0}}^{t} x_{5}(t)\mathrm {d}t\nonumber \\&\quad +\, C_{6}x_{6}(t)+C_{8}\frac{\mathrm {d}x_{8}(t)}{\mathrm {d}t} +C_{9}\frac{\mathrm {d}x_{9}(t)}{\mathrm {d}t}, \end{aligned}$$
(13)

and a fractional form as

$$\begin{aligned} y(t)=\overset{}{\underset{k=1,3,6}{\sum }}C_{k}x_{k}(t)+\overset{}{\underset{k=4,5,8,9}{\sum }}C_{k}\text {D}^{\alpha _{k}}x_{k}(t). \end{aligned}$$
(14)

The obtained models consisting of seven variables are shown in Fig. 4. The values of the orders \(\alpha \) and the coefficients C are also given in Table 1, and the performance indices in Table 2.

Table 2 Performance indices for the Spanish economy

There is, of course, a slight deterioration of performance, but the results obtained with fractional model (14) remain highly satisfactory. Actually, the AIC results in this model having the higher probability of being the best among all the five. Again, this is achieved at the expense of the model needing more independent variables than its integer counterpart, as seen from the t and p values.

Furthermore, fractional orders of \(x_8\) and \(x_9\) appearing in Table 1 are nearly \(\pm 1\). It is worth mentioning that the sign of \(\alpha _8\) is different in the integer and fractional models (13) and (14). This is particularly significant since it shows that M2 has an effect over a long time (a derivative of order almost \(-1\) is not a local operator). On the other hand, variables \(x_1\), \(x_3\), \(x_6\) and \(x_9\) turn out to have influence in the present only.

Fig. 4
figure 4

Fitting results for the Spanish case (models with seven variables): the integer model is given by (13), and the fractional model by (14)

4.2 The Portuguese economy

The models obtained for the Portuguese economy are shown in Fig. 5. The values of the orders \(\alpha \) and the coefficients C are given in Table 3.

It can be seen that the differentiation orders for \(x_1\), \(x_2\), \(x_3\), \(x_6\) and \(x_7\) are zero (or almost zero), which leads us to consider a simpler fractional order model, as was done for Spain. In this case, only variables \(x_{4}\), \(x_{5}\), \(x_{8}\) and \(x_{9}\) are assumed to have fractional order influence, as follows:

$$\begin{aligned} y(t) = \overset{}{\underset{k=1,2,3,6,7}{\sum }}C_{k}x_{k}(t)+\overset{}{\underset{k=4,5,8,9}{\sum }}C_{k}\text {D}^{\alpha _{k}}x_{k}(t). \end{aligned}$$
(15)

Again, what this means is that only economic indicators for which \(\alpha \ne 0\) have an influence over time on the GDP, not limited to the current value. The results related to this model are also included in Fig. 5 and Table 3.

Fig. 5
figure 5

Fitting results for the Portuguese case (models with nine variables): the integer model is given by (5), the fractional\(_1\) model by (6), and the fractional\(_2\) model by (15)

The performance indices are summarised in Table 4. In that table, t values corresponding to variables which are necessary for the model, assuming a 5 % significance level, are in bold. It is clear from the results that the area (\(x_1\)) and the population (\(x_3\)) are variables without much influence in the GDP; the arable land (\(x_2\)) is also unnecessary for the fractional model. The results of the AIC confirm what variables are not needed in the model, even though this time the match is not perfect, but almost.

Furthermore, just as for the model for Spain, the fractional model has a clearly better performance, at the expense of needing more variables (in this case, 6 against 3 for the integer model).

Taking into account the low influence of variables \(x_{1}\), \(x_{2}\), and \(x_{3}\) in the model, let us consider a simpler model with only 6 inputs, with an integer form given by

$$\begin{aligned} y(t)&=\,C_4x_4(t) + C_5\int _{t_0}^tx_5(t)\mathrm {d}t + C_6x_6(t) \nonumber \\&\quad +\,C_7x_7(t) + C_8\frac{\mathrm {d}x_8(t)}{\mathrm {d}t} + C_9\frac{\mathrm {d}x_9(t)}{\mathrm {d}t}, \end{aligned}$$
(16)

and a fractional form given by

$$\begin{aligned} y(t)=\overset{}{\underset{k=6,7}{\sum }}C_{k}x_{k}(t)+\overset{}{\underset{k=4,5,8,9}{\sum }}C_{k}\text {D}^{\alpha _{k}}x_{k}(t). \end{aligned}$$
(17)
Table 3 Fitting results for the Portuguese economy: orders of the fractional operator and coefficients
Table 4 Performance indices for the Portuguese economy
Fig. 6
figure 6

Fitting results for the Portuguese case (models with six variables): the integer model is given by (16), and the fractional model by (17)

These new models for the Portuguese economy are shown in Fig. 6. The values of the orders \(\alpha \) and the coefficients C, as well as performance indices, are also given in Tables 3 and 4, respectively. Once more, results obtained with fractional model (17) remain highly satisfactory (while w is equal to zero, other indices prove it is likely the best option), at the expense of more independent variables than its integer counterpart.

In this case, fractional orders of model (17) appearing in Table 3 are all (nearly) multiples of 1 / 2, just as in the equations of fractional diffusion (see e.g. [35]). We can thus hypothesise that such diffusion models (useful in areas such as bioengineering or soil dynamics) can also explain how these variables affect the economy; this hypothesis can only be checked when more countries are studied. It is worth mentioning that the sign of \(x_8\) and \(x_9\) is different in the integer and fractional models (16) and (17). This is particularly significant for \(x_8\) (not so much for \(x_9\), since \(x_9=x_5\) and \(\alpha _5\) was already negative), since it shows that M2 has an effect over a long time (a derivative of order \(-1.5\) is not a local operator). So we can say that variables \(x_5\) and \(x_8\) have an influence on the GDP over time similar to that of diffusion processes, while other variables only have influence in the present.

4.3 Comparison: Spanish versus Portuguese economy

The main differences of the models for Portuguese and Spanish economic growth are found in the number of variables which have real influence in economy. In the Portuguese economy, these are school attendance (\(x_4\)), GCF (\(x_5\)), exports of goods and services (\(x_6\)), GGFCE (\(x_7\)) and M2 (\(x_8\)). In the Spanish case, the area (\(x_1\), which, being a constant, means an independent term) and the population (\(x_3\)) are important too, while GGFCE (\(x_7\)) is likely not to be needed.

Spain is about five times the size of Portugal in both area and population and is the European Union’s fifth largest economy, whereas the Portuguese economy is ranked in the fourteenth position. The results obtained in this work do not allow us to see whether differences in relevant variables are connected with the size of the country and its economy or not.

In the models for both countries, among the variables which appear to be relevant, some have differentiation orders in the fractional model (6) which are zero (or almost zero), leading us to consider a simpler model—namely (12) for the case of Spain, in which only variables \(x_{4}\), \(x_{5}\), \(x_{8}\) and \(x_{9}\) are assumed to have fractional order influence. These are not the same, however, as in the model for Portugal: \(x_4\) has no fractional order in the Portuguese model; \(\alpha _9\) is nearly 1 in the model for Spain (revealing no long term effects) but is negative and fractional in the model for Portugal (revealing a cumulative influence over time); only \(\alpha _5\) and \(\alpha _8\) seem to denote a comparable effect of their variables for both countries.

5 Conclusions

This paper investigated modelling of national economic growth, namely, the gross domestic product (GDP), from a fractional calculus (FC) point of view. Nine macroeconomic indicators, chosen according to the practice established in the literature, were used to account for the behaviour of this financial process. The particular cases of Spain and Portugal were studied for the period 1960–2012, and results show that fractional models have a better performance than the other alternatives considered and proposed in the literature. In the end, simplified models with six or seven inputs were obtained. External and internal impacts, manufactured resources, and the quality of the natural and human resources are seen to be important factors.

Our future efforts will focus on the study of other economies of the European zone, and how the model could be realistically controlled. This last issue has been addressed, at least for fractional systems, mostly in a purely mathematical way (see e.g. [36]), without considering what might be feasible in practice.