  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.
