Statistical thermodynamics of economic systems

We formulate thermodynamics of economic systems in terms of an arbitrary probability distribution for a conserved economic quantity. As in statistical physics, thermodynamic macroeconomic variables emerge as the mean value of microeconomic variables and their determination is reduced to the computation of the partition function, starting from an arbitrary function. Explicit hypothetical examples are given which include linear and nonlinear economic systems, as well as multiplicative systems such as those dominated by a Pareto law distribution. We propose to use the formalism of phase transitions to study severe changes of macroeconomic variables.


Introduction
Thermodynamics is a phenomenological science that derives its concepts directly from observation and experiment. The laws of thermodynamics can be considered as axioms of a mathematical model, and the fact that they are based upon commonplace observations makes them tremendously powerful and generally valid. In particular, the interest of applying thermodynamics in a systematic manner to describe the behavior of economic and financial systems has a long history [1]. One of the difficulties of this approach is that it is necessary to identify a priori the economic variables that can be identified as thermodynamic variables, satisfying the laws of thermodynamics. The results of this identification are very often controversial. Even the basic thermodynamic assumption that an economic system be in equilibrium has been the subject of numerous discussions. The concept of economic entropy presents also certain difficulties and different definitions can be formulated [2,3]. Formal mappings between thermodynamic and economic variables can be formulated [4] which, however, leave the notion of entropy unclear and the range of models in which it holds undefined.
On the other hand, econophysics is a relatively new branch of physics [5] in which methods of applied theory of probabilities, that have been used with excellent results in statistical physics, are implemented to solve problems in economics and finance. In our opinion, one of the most prominent founds is that certain economic variables can be considered as conserved and their distribution among the agents of an economic system are described by simple probability densities. In fact, it is currently well established that wealth distribution in many societies presents essentially two phases [6,7,8,9,10,11,12]. This means that the society can be differentiated in two disjoint populations with two different probability distributions. Various analysis of real economic data from several countries have shown that one phase possesses a Boltzmann-Gibbs (exponential) probability distribution that involves about 95% of individuals, mostly those with medium and low wealths, whereas the second phase, consisting of about 5% of individuals with highest wealths, shows a Pareto (power law) probability distribution. Similar results are found for the distribution of money and income.
In this work we propose to use the standard formulation of statistical thermodynamics in order to connect in a systematic and rigorous way the thermodynamic approach with the statistical properties of complex economic systems found in econophysics. We obtain as a result that the entire properties of economic systems can, in principle, be formulated and considered in the definition of a partition function from which all the thermodynamic properties of the system can be derived. This paper is organized as follows. In Sec. 2 we formulate the fundamentals of statistical thermodynamics in the case of an arbitrary conserved economic variable. In Sec. 3.1 we analyze the simplest case of an economic system for which the conserved variable depends linearly on the microeconomic parameters. More general situations are analyzed in Secs. 3.2 and 3.3 where quadratic and multiplicative dependences of abstract parameters are considered. The partition function is analyzed in all the cases and possible interpretations are presented. In Sec. 4 we propose to associate drastic modifications of macroeconomic variables with the occurrence of phase transitions. Finally, Sec. 5 contains a summary and a discussion of our results.

Statistical thermodynamics
Consider a hypothetical economic system in equilibrium for which a quantity, say M, is conserved. There is a reasonable number of arguments [13] which show that certain current economies can be considered as systems in equilibrium and some quantities, like the total amount of money in the system, are conserved during certain periods of time. For the sake of concreteness we will consider in this work that M is the conserved money, although our approach can be applied to any conserved quantity. Suppose that the system is composed of N agents which compete to acquire a participation m of M. In real economic systems, the total number of agents is such a large number that for most applications the limit N → ∞ is appropriate. In a closed economic system, the equilibrium probability distribution (density function) of m is given by the Boltzmann-Gibbs distribution ρ(m) ∝ e −m/T , where T is an effective temperature equal to the average amount of money per agent. The amount of money m that an agent can earn depends on several additional parameters λ 1 , λ 2 , ..., λ l , which we call microeconomic parameters. Since the density function can be normalized to 1, we obtain [14] where Q(T,x) is the partition function andλ represents the set of all microeconomic parameters. Here we have introduced the notationx = x 1 , x 2 , ..., x n to denote the possible set of macroeconomic parameters which can appear after the integration over the entire domain of definition of the microeconomic parametersλ.
Following the standard procedure of statistical thermodynamics [14], we introduce the concept of mean value g for any function g = g(λ) as These are the main concepts which are needed in statistical thermodynamics for the investigation of a system which depends on the temperature T and macroscopic variablesx. Consider, for instance, the mean value of the money m = mρdλ and let us compute the total differential d m : The first term of this expression can be further manipulated by using the definition of the density function (1) in the form m = −T (ln ρ + ln Q). Then, we obtain (recall that ρdλ = 1 and, therefore, d ρdλ = 0) where the entropy S and the "intensive" macroscopic variables are defined in the standard manner as Clearly, Eq.(4) represents the first law of thermodynamics. Since the definition of temperature and entropy are in accordance with the concepts of statistical mechanics, the remaining laws of thermodynamics are also valid. Similar results can be obtained for any quantity that can be shown to be conserved in an economic system. This reflects the fact that different thermodynamic potentials can be used to describe the same thermodynamic system.
It is useful to calculate explicitly the entropy S = (− ln ρ)ρ dλ by using the definition (1) in the form − ln ρ = ln Q + m/T . The result can be cast in the form This means that the entire information about the thermodynamic properties of the system is contained in the expression for the "free money" f which, in turn, is completely determined by the partition function Q(T,x).
In statistical physics this procedure is still used, with excellent results, to investigate the properties of thermodynamic systems. We propose to use a similar approach in econophysics. In fact, to investigate a model for an economic system one only needs to formulate the explicit dependence of any conserved quantity, say money m(λ), in terms of the microeconomic parametersλ. From m(λ) one calculates the partition function Q(T,x) and the free money f (T,x) which contains all the thermodynamic information about the economic system.
In the next sections we present several examples of hypothetical economic systems with relatively simple expressions for m(λ). In real economic systems, probably very complicated expressions for m(λ) will appear for which analytical computations are not available. Nevertheless, the calculation of the above integrals can always be performed numerically and the corresponding thermodynamics can be found qualitatively.

Hypothetical economic systems
The determination of the quantity m in terms of the microeconomic parametersλ is a task that requires the knowledge of very specific conditions and relationships within a given economic system. The first step consists in identifying the microeconomic parametersλ which influences the capacity of an individual agent to compete for a share m of the conserved quantity M. Then, it is necessary to establish how this influence should be represented mathematically so that m becomes a well-defined function ofλ.
Another aspect that must be considered is the fact that in a realistic economic system not all agents are equivalent. For instance, an agent represented by an individual who works at a factory for a fixed yearly income would be considerably different from an agent represented by the firm to which the factory belongs. An important result of econophysics is that the Botzmann-Gibbs distribution is not affected by the specific characteristics of the agents involved in the economic model [6]. For the statistical thermodynamic approach we are proposing in this work this means that we can decompose the quantity m into classes m = m I + m II + · · ·, and different classes can be described by different functions of different sets of microeconomic parameters. The formalism of statistical thermodynamics allows us to consider, in principle, all possible economic configurations as far as m is a well-defined function ofλ.
In the following subsections we will study several hypothetical economic systems in which m is given as simple ordinary functions of the microeconomic parameters. We expect, however, that these simple examples will find some applications in the context of economic systems with sufficiently well defined microeconomic parameters. Although the function m can represent any conserved economic quantity, for the sake of concreteness, we will assume that it represents the money and from now m(λ) will be referred as to the money function.

Linear systems
The simplest model corresponds to the case m = c 0 = const. Then, the partition function (1) is given by where Λ i = dλ i , i = 1, 2, · · · , n, represent the macroeconomic parameters. The calculation of the thermodynamic variables, according to Eqs. (7), yields Furthermore, from the definition of free money f we conclude that m = c 0 , i.e., the mean value of money is a constant, as expected. This economic model is considerably simple. Each agent possesses the same amount of money c 0 , the entropy does not depend on the mean value of the money c 0 , and the state equations are m = c 0 and y i Λ i = T . The system is completely homogeneous in the sense that each agent starts with a given amount of money, c 0 , and ends up with the same amount. Probably, the only way to simulate such an economic system would be by demanding that agents do not interchange money; this is not a very realistic situation. Indeed, the fact that entropy is a constant, that does not depend on the mean value of money, allows us to renormalize the macroscopic parameters in such a way that Λ i = dλ i = 1, for each i, so that the total entropy vanishes. In this case, from Eq. (9) we see that f = c 0 and the corresponding equations of state are compatible with the limit T → 0. This resembles the argumentation used in the description of the third law of thermodynamics. This observation indicates that a completely homogeneous economic system is not realizable as a consequence of the third law of thermodynamics.
Consider now the function m = c 1 λ 1 , where c 1 is a positive constant. The corresponding partition function can be written as The relevant thermodynamic variables follow from Eqs. (6) and (7) as and the conservation law (4) becomes Moreover, comparing the above results with the definition of f , it can be shown that m = T , and so the fundamental thermodynamic equation in the entropic representation [15] can be written as This expression relates all the extensive variables of the system and it can be use to derive all the equations of state in a manner equivalent to that given in Eq. (11). Notice that in this case the entropy is proportional to the temperature (mean value of money) so that an increase of the average money per agent is necessarily associated with an increase of entropy. This observation is in agreement with the second law of thermodynamics. Notice, furthermore, that in a limiting case, similar to that considered in the first example given above, it is possible to renormalize the macroeconomic parameters Λ j such that the last term of the fundamental equation (13) vanishes. Nevertheless, in order to reach the minimum value of the entropy it is necessary to consider the limit T → 0. Again, we consider this result as an indication of the validity of the third law of thermodynamics. In Eq.(10) we have chosen the interval [0, ∞) for the integration along the variable λ 1 . As a consequence the macroscopic variable Λ 1 vanishes from the final expression for the fundamental equation (13), and consequently y 1 = 0. However, it is also possible to consider the interval [λ min 1 , λ max 1 ] so that the macroscopic variables λ min 1 and λ max 1 reappear in the fundamental equation and can be used as extensive variables which enter the conservation law (4). In a realistic economic system the interval of integration will depend on the economic significance of the microeconomic parameter λ 1 . For the sake of simplicity, we choose in this work the former case in which the corresponding macroeconomic parameter does not enter the analysis.
It is interesting to analyze the most general linear system for which where c 0 , c 1 , ... are positive real constants. It is then straightforward to calculate the partition function and the relevant thermodynamic variables All the macroscopic parameters vanish and the system depends only on temperature. However, the total number of macroscopic parameters n does enter the expression for the entropy so that to increase the mean value of the money by the amount ∆ m = n(T 2 − T 1 ), it is necessary to increase entropy by an amount ∆S = n ln(T 2 /T 1 ); both amounts are proportional to the total number of macroscopic parameters. Another consequence of this analysis is that once the constants c 0 and n are fixed, it is not possible to change the mean value of the money without changing the temperature of the system. This means that an isothermal positive change of m is possible only by increasing the total amount of money in the system.

Nonlinear systems
Consider the quadratic function m = c 1 λ 2 1 which generates the partition function where we have considered the microeconomic parameter λ 1 in the interval (−∞, ∞). The corresponding thermodynamic variables are which can be put together in the fundamental equation Again we see that the effect of considering the extreme values of the parameter λ 1 is that the corresponding macroscopic variable Λ 1 does not enter the expressions for the thermodynamic variables and, consequently, the corresponding intensive thermodynamic variable vanishes. Furthermore, it is evident that the power of λ 1 in the money function leads to a decrease of the mean value m .
To investigate the general case, we consider the monomial functional dependence m = c 1 λ δ 1 , with δ being an arbitrary real constant. A straightforward calculation leads to the following partition function and thermodynamic variables: and the intensive variables y i are given as in the previous case. It follows that δ > 0 in order for the mean value of the money to be positive. If δ > 1, the mean value of the money decreases, whereas it increases for 0 < δ < 1.
In such a hypothetical system, a way to increase the amount of money per agent would be to identify the microeconomic parameter λ 1 and apply the measures which are necessary for the money function m to become m ∝ λ δ 1 , with δ < 1.
If we consider a transition of an economic system from a state characterized by the parameter δ 1 to a new state with parameter δ 2 , maintaining the same temperature, the mean value of the money undergoes a change ∆ m = (1/δ 2 − 1/δ 1 )T , so that for a positive change we must require that δ 2 < δ 1 . Moreover, if we desire a positive change by an amount greater than the average money per agent (∆ m > T ), we must demand that δ 2 < δ 1 /(1 + δ 1 ). Even if the initial state corresponds to a linear system (δ 1 = 1), in which no increase of m is possible, we can reach a state of greater mean value m by demanding that δ 2 < 1/2. Of course, for a positive change of m the "price" to be payed will result in an increase of entropy by an amount which is proportional to the coefficient (1/δ 2 − 1/δ 1 ).
We see this possibility as an advantage of our statistical approach, In fact, we start from an equilibrium state with a lower value of m and end up in state with a higher value of m , by choosing appropriately a particular microeconomic parameter. The positive change of the macroeconomic variable m is induced by a change of a microeconomic parameter. Once the process is started, the system will naturally evolve into a state characterized by a higher value of m . This natural evolution occurs because, as has been repeatedly shown in computer simulations [13], the final equilibrium state corresponds to a Boltzmann-Gibbs probability distribution, which is a basic component of the approach proposed in this work.

Multiplicative systems
An interesting case follows from the money function m(λ) = c 1 ln λ 1 . In fact, the partition function is given by where we have used λ 1 ∈ [x, ∞), with x = λ min 1 . This expression is nothing more but the partition function (cumulative probability) of the Pareto distribution density ρ P ∝ 1/x 1+α which has been shown to correctly describe the distribution of money (and other conserved economic quantities) in the upper tail of the distribution, i.e., for amounts greater than x. A similar derivation of the Pareto law was recently performed in [16].
We now have the possibility to analyze the Pareto distribution in terms of macroeconomic parameters. The computation of the thermodynamic variables using Eq.(7) yields Notice that the intensive variable y conjugate to the lower limit x of Pareto's distribution appears with a different sign, when compared with the remaining intensive variables y j , j = 2, 3, ..., n. As a consequence of this change of sign the conservation law is given as so that if we interpret, by analogy with physical systems, the intensive variables as "forces", we can conclude that the "'force" corresponding to Pareto's distribution is negative. Moreover, if from the above expressions and that of the free money f , we calculate the mean value m , we obtain The origin of the second term is clear because we have chosen the money function as m = c 1 ln λ 1 , and x is the minimum value of λ 1 . The first term, however, is new and has the interesting property that it diverges as c 1 → T . This means that it is possible to increase arbitrarily the value of m in the upper tail of the distribution of money, maintaining the values of x and T fixed, solely by fine tuning the value of the constant c 1 so that it takes the value of the average amount of money per agent T . Perhaps this simple observation could be useful for the understanding of the monetary evolution that takes place in the upper class of the wealth distribution in certain economies. Finally, we analyze the case of the money function which corresponds to the density distribution where c 1 , d 1 and δ are constants. This expression is known in the literature as the Gamma distribution and has been used in econophysics to investigate models with multiplicative asset exchange [17]. A straightforward computation shows that the corresponding partition function can be cast in the form an expression which is essentially equivalent to the partition function (20) following from the monomial function m ∝ λ δ 1 discussed in Sec. 3.2. In particular, in the limit d 1 << T the two partition functions coincide. Strong differences can appear near the points where the function (29) diverges. This occurs when T → 0, which we should avoid in accordance with the third law of thermodynamics, and at the poles of the Gamma function, i.e, for (1 − d 1 /T )/δ = −k = 0, −1, −2, · · · The last possibility, however, is not necessarily in disagreement with the third law of thermodynamics since at the poles the temperature can be made to tend to a constant positive value, It is not difficult to derive the thermodynamic variables for this case. The singular pole structure of the partition function leads to a peculiar behavior of the thermodynamic variables which deserve a more detailed and deeper analysis. Outside the poles, however, the thermodynamic behavior is essentially dictated by Eqs. (21) which correspond to a Boltzmann-Gibbs distribution with a power law dependence for the money function. This result shows that from a macroeconomic point of view there is no essential difference between the Gamma law distribution and the Boltzmann-Gibbs distribution, as far as the value for the temperature does not correspond to a singular pole of the partition function of the Gamma distribution. This result explains in a simple manner why in concrete examples it is possible to mimic the results of an exponential distribution by choosing appropriately the additional parameters of the Gamma law distribution [18].

Phase transitions
An important feature of many thermodynamic systems is their capability to exist in different phases with specific interior and exterior characteristics which can drastically change during a phase transition. The thermodynamic approach proposed in this work insinuates the possibility of considering the phase structure of economic systems and the conditions under which a particular economic system can undergo a phase transition. In this section we will perform such an analysis for the hypothetical systems studied above.
Recall that a phase transition is usually associated with discontinuities or divergencies in the thermodynamic variables or its derivatives. In particular, the behavior of the entropy function is used as a criterion for the analysis of phase transitions. Moreover, the heat capacity is an important thermodynamic variable which indicates the existence of second-order phase transitions. From the results presented in the preceding sections one can show that the heat capacity for systems characterized by a monomial money function, m = c 1 λ δ , is constant, namely C = 1/δ, with C = 0 for the limiting case m = c 0 = const. Since the constant δ must be positive for the mean value m to be positive, the temperature of such systems raises under an increase of "economic heat", and vice versa. An inspection of the remaining thermodynamic variables shows that such systems cannot undergo a phase transition. The situation is different in the case of multiplicative systems. For a system characterized by a Pareto law distribution, we obtain from Eq.(23) (31) A phase transition occurs in the limit c 1 → T . This is also the value for which the mean value of the money raises unlimitedly. This shows that a phase transition can be induced by choosing appropriately the parameter c 1 and the corresponding economic system undergoes a drastic change with agents possessing more and more money; however, this hypothetical process must end at some stage due to the natural boundary imposed by the fact that the total amount of money in the system is fixed and finite.
In the case of a system with a Gamma law distribution and partition function given in Eq.(29), the phase structure is much more complex. The analytical results are rather cumbersome expressions that cannot be written in a compact form. A preliminary numerical analysis shows that near the poles of the partition function first-order and second-order phase transitions occur with two possible scenarios. The first one is similar to the phase transition of a system with a Pareto law distribution with the mean value m increasing either exponentially or as m ∝ 1/(d 1 − T ) c , and d 1 → T , where the value of the constant c depends on the kind of pole of the partition function. The second scenario is characterized by a rapid reduction of m , tending exponentially to a fixed positive value m 0 which depends on the kind of pole. Unexpectedly, we also found divergencies in the corresponding heat capacity which are not related to the poles of the partition function. A more deep analysis will be necessary to understand the complete phase structure of this specific multiplicative system.

Discussion and conclusions
In this work we propose to apply the standard methods of statistical thermodynamics in order to investigate the structure and behavior of economic systems. The starting point is an economic system in which a conserved quantity is present. In certain current economies it has been shown that such quantities exist, the money being one of them. We have shown that to any conserved quantity it is possible to associate a function m (the money function, for instance) from which all the thermodynamic variables and properties of the system can be derived. The money function depends on a set of microeconomic parameters which generate macroeconomic parameters at the level of the partition function. The thermodynamic variables depend on the macroeconomic parameters and satisfy the ordinary laws of thermodynamics.
Starting from simple money functions, we consider linear, nonlinear and multiplicative systems as examples of hypothetical economic systems in which it is possible to apply our approach, obtaining analytical results. In all the cases, we computed the most relevant thermodynamic variables and analyzed their behavior. The results show that it is possible to manipulate the microeconomic parameters in order to control the output at the level of the macroeconomic parameters. We see this possibility as an advantage of our statistical approach. One can start from an equilibrium state with some given mean value for the money m , and raise its value by choosing appropriately a particular microeconomic parameter. Once the process is started, the system will naturally evolve into a state characterized by a greater value of m . This natural evolution occurs because, as has been repeatedly shown in computer simulations [13], the final equilibrium state corresponds to a Boltzmann-Gibbs probability distribution, which is a basic component of the approach proposed in this work. This evolution, however, must be understood as in standard thermodynamics, i.e., the evolution process must be quasi-static so that at each step the economic system is in equilibrium. A more realistic evolutionary model must take into account nonequilibrium states, a task that cannot be treated within the standard approach of statistical thermodynamics. It would be interesting to investigate if the existing generalizations of nonequilibrium thermodynamics can also be applied in the context of economic systems.
We propose to use the formalism of phase transitions to analyze the behavior of economic systems. The relatively simple examples studied in this work show that in fact a phase transition can be associated to drastic changes of the mean value of the money. Economic crisis are usually accompanied by far-reaching modifications of some macroeconomic variables. It would be interesting to propose more sophisticated and realistic models for money functions and investigate their behavior during phase transitions. If a crisis could be understood this way, an appealing problem would be to explore the possibility of controlling its consequences.
In the context of systems with many constituents, thermodynamic interaction is an important concept which can completely modify the interior and exterior structure of the system. In physics, one can introduce thermodynamic interaction into a system by choosing appropriate potentials, because we understand the physical meaning of the Hamiltonian function. In our approach the analogous of the Hamiltonian is the money function; we believe, however, that its economic significance, at least at the moment, is much more sophisticated. Therefore, we propose to use a different method to introduce thermodynamic interaction into an economic system. Recently, the theory of geometrothermodynamics [19] was formulated with the aim of describing thermodynamics in terms of geometric concepts. One of the results of this formalism is that thermodynamic interaction can be interpreted as the curvature of the equilibrium space. This has been shown to be true not only in the case of ordinary thermodynamic systems, like the ideal gas and the van der Waals gas [20,21], but also in more exotic configurations like black holes [22]. This opens the possibility of introducing thermodynamic interaction by just modifying the curvature of the equilibrium space. In fact, it can be shown that all the hypothetical economic systems analyzed in this work have very simple equilibrium spaces for which the manipulation of curvature is not a difficult task. We expect to analyze this possibility in the near future.