{'fraction_non_alphanumeric': 0.034688668064545534, 'fraction_numerical': 0.007733916795818519, 'mean_word_length': 4.134175832748264, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 19, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Scale Invariance, Bounded Rationality and Non-Equilibrium Economics

We study a class of heterogeneous agent-based models which are based on a basic set of principles, and the most fundamental operations of an economic system: trade and product transformations. A basic guiding principle is scale invariance, which means that the dynamics of the economy should not depend on the units used to measure the different products. We develop the idea of a"near-equilibrium"expansion which allow us to study the dynamics of fluctuations around economic equilibrium. This is similar to the familiar"perturbation theory"studied in many areas of physics. We study some simple models of both centralized and decentralized markets. We show the relaxation to equilibrium when appropriate. More interestingly, we study a simple model of a decentralized market that shows a spontaneous transition into a monetary phase. We use mean field theory analysis to provide a statistical interpretation of the monetary phase. Furthermore, we show that such phase can be dynamically unstable. Finally, we study some simple centralized financial markets, one of which shows a speculative bubble and a crash.


Introduction
It is fair to say that the global economic system is one of the most complex structures known in the biosphere. Compared to physics, economics differs in the important fact that the basic constituents, or "particles", are already quite complex: human beings. Moreover, they act on greed and according to expectations about how the future will unfold.
How can one even start to understand such a system when we need to model people's behaviors? One key revolution came from the concepts of game and decision theory [1,2]. In particular, the utility maximization theorem of Morgester and Von Neumann In this paper we introduce a class of economic agent-based models which are built around some basic set of principles and the most fundamental operations of an economic system: trade and transformations. More precisely, there are a finite number of products in the economy which the agents can trade or transform into other products. The amount of each product in the economy can be measured in any units the agents want to use. One of the basic principles is that the dynamics of the economy should be invariant under a change of product measure. This principle is analogous to the "gauge symmetries" found in physical systems 1 . We call this gauge symmetry scale invariance 2 . We will show that such a symmetry principle gives rise to very useful restrictions on the possible dynamics.
Another important guiding principle is bounded rationality. Our agents are boundedly rational in that they do not need to know all the information of the economy in order to make a decision. Moreover, they only have a finite set of possible operations that they can do at every time step. They choose to do the operations which give them maximum satisfaction.
Another important principle is that prices are relational and they simply describe the relative flux of products between two or more agents. Such fluxes do not have to be the same among all agents. Therefore, not all agents have to agree on a "price". Related to this fact, we assume that agents possess a "what-by-what" matrix which represent the agents' opinion on the exchange rate between the different products in the economy. These represent part of the information that agents have about the economy. This type of economic modeling is based in the ideas of Brown et. al [19]. The framework presented here allows to simulate heterogeneous agents expectations.
We develop the idea of a "near-equilibrium" state, where the agents' expected utility is close to being maximal. In this way we are able to derive approximate "flow" equations which describe how many products are exchanged or transformed in any of the possible economic operations. The equations are written for general expected utilities, and they allow for fast numerical implementation. Moreover, our semi-analytic approach allow us to apply mean-field theory to certain agent-based models. We argue that the concept of a "near-equilibrium" state is similar to the familiar "perturbation theory" of Quantum Field Theory, in which we expand the theory around a particular vacuum. This provides a constructive way to study fluctuations around an economic equilibrium.
We then present various numerical simulations of particular market models. We study both decentralized and centralized markets. One of the interesting questions 1 The models that we will study turn out to have an extra "accidental" gauge symmetry which we discuss below. 2 The idea that gauge theories might have applications in economics was introduced to me by Lee Smolin [18]. Nevertheless, this idea has been considered before by Ilinsky [20], Malaney and Weinstein [21], which have also been influential in Smolin's ideas. we address is the emergence of (commodity) money. We study a class of decentralized markets that show a spontaneous transition into a monetary economy. In other words, agents collectively trade using a common product as a "currency". We use a mean field theory analysis to show that such transition has a purely statistical origin. Furthermore, we show that in some cases such monetary phase can be dynamically unstable.
We also give simple examples of centralized financial markets. In one of these models, we include agents' speculations about the future price of the products, which leads to a bubble and a crash.
The organization of the paper is as follows. In section 2, we introduce a list of basic principles that we use as a guidance to build our class of agent-based models. In section 3, we elaborate on the allowed form of the utility functions. In section 4 we introduce the idea of a near-equilibrium state, and derive a set of propositions which give us the flow equations used in the numerical algorithms. We also make an analogy with fluid dynamics. In section 5 we present numerical simulations of decentralized markets. The monetary phase is studied in section 5.4. In section 6 we present simulations of centralized markets. In section 7 we conclude.

A Minimal Economic System
In this section we present the basic properties and assumptions of the "minimal" economic system we wish to study. Some of the statement that we will make are very generic and need to be refined in order to construct particular models. This will be done in the next sections.
• Agents and Products: We will consider a fixed number of agents N , which we label by Greek letters α, β = 1, 2, . . . , N . The set of all such agents is denoted by A, and we will use the notation α ∈ A to refer to some generic agent α in the set A. There will be P different kinds of products which we label with Latin letters, i, j = 1, 2, . . . , P . The set of all kinds of products is denoted by P. By abuse of notation, we will sometimes refer to an arbitrary product by the latin letter itself, e.g. i ∈ P.
• Time: We assume that the economy evolves in integer time steps.
• Inventories and Scale Invariance: Every agent has an inventory of products, with quantity n i α of product i. Sometimes we will write n α = (n 1 α , n 2 α , . . .). Agents are free to measure each product in arbitrary units. For example, product 1 might be measured in liters, and product 2 in pounds. In order to make a trade (see below) the two agents must agree on a unit of measure. Therefore, for simplicity we assume that all agents agree on the same units of measure for each product.
Nevertheless, we assume that the dynamics of the economy is invariant under changes of units for all agents. Under such change, the inventories transform as, We say that the transformation (1) is a "gauge" symmetry. We call this symmetry scale invariance 3 .
• State Space: The state of the economy at any point in time is given by the set ψ = {n i α |i ∈ P, α ∈ A}. Let H the set of all such possible states. We see that for fixed agent and product number, and if we do not allow agents to have negative amount of products, • Agents' Rationality: We assume that agents have beliefs about how the future will unfold. Different agent can have different beliefs and future time frames in mind. We will denote the belief of agent α by I α . By abuse of notation we will sometimes call such belief "information". Nevertheless, we should stress that such information might be biased or might not be based on a good model of Nature. Furthermore, agents are not assumed to have full knowledge of the state of the economy and other agents' beliefs. Therefore, we do not assume rational expectations.
We assume, however, that agents make rational decisions given the information I α . In other words, we assume that agents' decisions satisfy the Savage-Von-Neumann-Morgenstern axioms of decision theory [1]. Then, by the Utility Maximization Theorem, it follows that such agents must carry an index of satisfaction Ω α , α ∈ A. The index of satisfaction is a map, Agents always seek to maximize Ω α . We assume the following properties of the index of satisfaction, where ∂ i = ∂/∂n i α . The index of satisfaction is given in terms of the agents' utility U α as, where E[·|I α ] denotes the future expectation given the information I α . The utility also satisfies the properties (4).
• What-by-What Matrices: At any point in time, some agents might have an opinion on what each product of their inventory is worth in units of another product 4 . That is, they carry an exchange rate matrix which we call "what-by-what matrix" (w-w matrix for short). The entries of such matrix are denoted by (M α ) i j . Note that this matrix is part of the beliefs of the agent, and so by abuse of notation we could say that M α ∈ I α . Moreover, agents not only have an idea of what M α should be today but what it should be in the future based, perhaps, in some previous experience.
Let P α be the set of products for which agent α has an entry in his/her w-w matrix. Rationality of the agent requires that the w-w matrix obeys the reciprocal relation, and the transitivity conditions, We say that a w-w matrix that obeys the conditions (6) and (7) is consistent. Under the gauge transformation (1), the w-w matrix transforms as, • Scale Invariance and Utility: Given the structures given so far, we note that all tensors must be constructed out of the inventories n i α and the w-w matrices. Moreover, scale invariance dictates their transformation properties with respect to (1). For example, a tensor of the form T ij k must transform as T ij k → φ i φ j (φ k ) −1 T ij k . Therefore, one cannot have a combination such as n 1 α + n 2 α , since n 1 α and n 2 α are measured in different units. One can have, however, T 1 = n 1 α + (M α ) 1 2 n 2 α . It is easy to see that this will transform as T 1 → φ 1 T 1 under (1).
The form of the utility function is also restricted by scale invariance. First, let's suppose that U α has a fixed scale dependence with respect to the transformations (1). Then, consider the difference in happiness between an allocation n ′ α and n α : This is certainly a physically meaningful quantity which allows the agent to determine if n ′ α is more desirable than n α . Doing the transformation (1), it follows that the difference in happiness for the same physical allocations n ′ α and n α , will depend on the units used to measure the products. This does not make any sense 5 . Therefore, to avoid such paradoxes, the utility function much change at most by a constant under (1). It follows that, whereŨ α has a fixed scale dependence under (1). Scale invariance and the consistency of the w-w matrix, will imply a bigger gauge symmetry which we will discuss in the next section.
• Trading Network: We fix the "background" market structure which includes the trading network and the operations which each agent are allow to make (see below). We will consider the case of both a decentralized and centralized market.
• Economic Operations: An operationÔ on the market is a map which changes agents' inventories. Therefore, it is also a map on the economic state as: We consider two basic kinds of operations: a trade (T ) and a transformation or metabolism (M). A trade is an exchange of products between two agents. Therefore, product number is conserved in this case. A metabolism is a transformation of the form, i → j .
Such transformation can be synchronized into more complex ones, e.g.
We also allow the possibility of a decay (D) such that where E is the energy dissipated in the process. The dissipated energy cannot be used by the agents and so it cannot lead to a change in utlity. Nevertheless, the fact that decays reduce product number, implies that utility will be reduced by a decay process.
Since economic operations affect the agents' inventory, they also cause a change in their satisfaction. Let, for a general operationÔ. In other words, ∆ O Ω α is the change of the agent satisfaction due to the operationÔ with fixed information. 5 It is like saying: "I would get more happiness if I buy the same amount of gas at the same price but using Liters instead of Gallons".
• Dynamics: Given the market structure restrictions, at every time step each agent will perform the operationÔ that give him/her the maximum positive change in satisfaction ∆ O Ω α > 0. As we pointed out, decay processes will have ∆ D Ω α < 0. Nevertheless, we assume that such processes are beyond the control of the agents.
We wish to emphasize that agents will not do inter-temporal optimization problems such as the ones considered in discount factor models [4]. Instead, they make a decision at every time step regarding which operation maximizes his/her satisfaction.
• Equilibrium: We define equilibrium as a state where there is no operationÔ such that ∆ O Ω α > 0. In other words, all agents are as satisfied as they get given the operations they can perform. We will be more explicit about the meaning of equilibrium for each one of the economic operations, in section 4.
• Linear Response Theory and the Near-Equilibrium Expansion: We will derive approximate expressions for the action of each of the transformations given that agents are close to being satisfied. Thus, ∆ O Ω α 0 The properties given above define a broad class of minimal economic systems. However, in order to produce particular models we need to be more specific with respect to the market structure and the way agents maximize their satisfactions. In this minimal model we are considering anonymous agents, and so we do not have contracts and credit. The addition of such features will be left for future work. Nevertheless, one can introduce interest rates as an exogenous process if desired.
One of the biggest critiques of the unbounded rationality paradigm is the complexity of the optimization processes that agents must do in order to find the equilibrium [8]. This also presents a challenge when it comes to numerical simulations: utility maximization is a very inefficient algorithm specially if we want to have heterogeneous agents expectations. In this paper we solve this problem in two steps. First, we go back to the very basic operations of economics which are trade and metabolisms. In this way, at every time step agents have only a finite number of operations that they can do. This is, in fact, more akin to real life. Second, and more importantly, we will develop a "linear response theory" such that satisfaction maximization can be approximated in closed form for general utilities, assuming that agents are close to being satisfied. That is, agents make decisions following "gradients" of satisfaction.
This kind of approximation is reminiscent of the familiar "perturbation theory" used in particle and other areas of physics. In perturbation theory, one starts with a particular vacuum state of the theory. In economic terms, this means first identifying a particular equilibrium state (or a family of them). One can then do a systematic expansion of small perturbations around such equilibrium. The study of such perturbations is necessary to gain an understanding of the stability of the vacuum state (or economic equilibrium).
Another analogy with physics comes from fluid dynamics where one assumes a near-equilibrium state at every point in the fluid. Then, one makes an expansion in gradients of velocity, temperature and chemical potential that describe the small deviations from local equilibrium. From this point of view, and taking into account the principles outlined above we can say that: The physics of economics is the study of the flow of products through the social network in respond to "gradients" of satisfaction. Moreover, prices are relational and given by the ratio of fluxes: e.g. M i j = −∆n i /∆n j for a trade i ↔ j.
In the next section, we will examine in more detail how scale invariance restricts the form of the utility functions.

Scale Invariant Utility Functions
In physics, gauge symmetries can greatly reduce the number of parameters in a physical model. In our scale-invariant formulation of economics, this is also the case. As we noted in the previous section, scale invariance severely restricts the form of the utility functions that agents can use. In this section we will study some examples of scale invariant utility functions and their corresponding index of satisfaction. Nevertheless, we stress that the "flow equations" derived in the next section are written for a general index of satisfaction.
An example of a scale invariant utility which we use below is, where 0 < ν < 1, and the index j is arbitrary. The exponent ν measures how much weight the agent puts on the value of his w-w matrix vs. his intrinsic inventory preference. For example, for ν = 1, the utility is simply the log of the inventory, and so the agent is a wealth maximizer. On the other hand, for small ν we will see that the agents put more attention to their number of products n α . Also note that ∂ i ∂ j U α = 0 and so all products are substitutes for this agent. The argument of the log is being measured in units of product j. Now suppose we made some other choice instead of j. Using the consistency of the w-w matrix one finds, Therefore, the utility (and hence the index of satisfaction) changes by a constant. Since all economic operations involve derivatives of the utility, we see that the choice of measure is arbitrary. This is an accidental gauge symmetry. With this utility, every product is treated in equal footing, and so that the emergence of money will be a purely dynamical phenomenon. In fact, the monetary phase can be interpreted as a breaking of this gauge symmetry. An important property of the utility (16) is that, for ν = 0, 1, This property, along with Eqs. (4) implies that the utility function considered above (and hence the index of satisfaction) is convex. Convexity promotes diversification 6 . For example, an agent will be happier having two kinds of products that only one. To see this, consider an agent with product i and j. Furthermore, suppose that it has the same net value in each product: Convexity might seem like a special property of this utility function. However, it serves a deeper purpose. A purely wealth maximizer agent will tend to give away all his "money" in a single transaction. This is obviously not a realistic human behavior. In macroeconomic theory it is often said that the fundamental problem that agents face is, precisely, how much to consume and how much to save to consume later [4]. It is then assumed that agents do inter-temporal optimization, and thus somehow they must know their consumption plan for the rest of their lives! This is a very unrealistic assumption.
In our case, one can avoid facing this problem by considering convex utilities. In this way, the agent will not be willing to give up all of any of the products he/she possesses. Convexity will also be important in order to prove some of the propositions in the next section. Therefore, for the most part of this paper we will only consider convex utility functions. Note that we can always take ν 1 in order to have approximate wealth maximizer. The main results are insensitive to wether ν is exactly one or not.
Utility functions can also be completely independent on the w-w matrices, e.g.
In this case ∂ i ∂ j U α = 0, and so the products are not substitutes. Utility functions can also depend on both substitutes and non-substitutes.

Linear Response and Economic Operations
In this section we will explain in more detail the different kinds of economic operations that agents are allowed to do. The operations that we will consider are bartering between two agents, an agent making a trade at fixed exchange rate, a production process and a central agent that sets prices in respond to excess demand. In sections 5 and 6, we will explain how to use these operations in particular market models. Our main goal here is to derive approximate formulas for the flow of products trough the economy given that agents are trying to maximize their satisfaction. These formulae will be implemented below both in numerical simulations, and in mean-field theory analysis. The prevailing theme will be the near-equilibrium expansion.

Trading at a fixed Exchange Rate
In this section we consider an agent that exchanges two products i, j at a fixed rate M i j which might be different from his own w-w matrix. More specifically, the trading process which we callT 1 takes the form, Our goal is to find ∆n i , given that the agent is trying to maximize his satisfaction. We assume that the agent is in a near-equilibrium state, which we define in detail below. The proof of the following proposition will require a convex index of satisfaction.
Proposition 1: In a near-equilibrium state, the amount of product i and j that agent α would trade at a fixed rate M j i is given bŷ where Moreover, the gain in satisfaction is given by, The tradeT 1 is allowed iff J ii α > 0.
Proof : In order to prove this proposition we need to ask ourselves: what does it mean to be in equilibrium? The maximum increase in happiness is a change of inventory ∆n i * such that, where the satisfaction index is now a function of ∆n i as, We say that the agent is at equilibrium if the solution to Eq.(25) is ∆n i * = 0. That a point satisfying the first equation in (25) exist, follows from the convexity of the index of satisfaction. To see this, suppose that ∂Ω α /∂(∆n i ) = (∂ i Ω α − M j i ∂ j Ω α ) < 0. Then, we can make ∆n i < 0, and keep depleting the amount of product i. However, the convexity of the index of satisfaction implies that ∂ i Ω α will eventually become very large and positive. Thus, the sign of ∂Ω α /∂(∆n i ) will be reversed. By continuity, there must be a value of Whether this is a minimum or maximum must be checked by computing the second derivative w.r.t. ∆n i .
Therefore, near equilibrium we can expand the gain in satisfaction as, The maximization equation reads The linearized solution is given by Eq. (22), where we evaluate all quantities at ∆n i = 0. Note that all indices in Eq. (22) reflect their correct tensor transformation properties under Eq. (1). In writing Eq. (23) we have used the fact that at equilibrium, the inventory of agent α will obey M j i = ∂ i Ω α /∂ j Ω α | eq . Therefore, we can approximate, where δ means a first order deviation from equilibrium. The gain in satisfaction can be computed inserting (22) in (27), and it is given by Eq. (24).
We see that Eq. (22) represent a maximum iff J ii α > 0. If J ii α < 0 the trade will not proceed as it will represent a decrease in satisfaction. For most utilities, since ∂ 2 i Ω α < 0, it is easy to satisfy J ii α > 0. Nevertheless, we need to check case by case since one can have ∂ i ∂ j Ω α < 0.
In sections 5 and 6 we will discuss how the agents use the result of Proposition 1 to make a decision of wether to trade withT 1 or not. In any case, once the agent decides that he will trade with the operationT 1 , Eq. (22) give us the flow of objects within the linear response approximation. This should be compared to the constitutive relations of hydrodynamics where the shear tensor has an expansion in gradients of the fluid velocity with the first term being the well-known "shear viscosity". In our case, J ii α plays a similar role as a "transport coefficient" that tell us how the products will flow under a gradient of "satisfaction". Note that this proposition can be easily extended to higher orders.

Barter
In a barter economy, two agents must bargain an exchange rate and how much product to trade. We will call such operationT 2 . It is easy to get carried on trying to come up with a complicated algorithm to describe the bargaining process. However, one can simply assume that both agents "quickly" converge to an equilibrium. The reader might ask: isn't this going back to general equilibrium theory, which is what we are trying to avoid? To answer this question, one must consider what are the different time scales involved in the problem. How much time does it take for two parties to reach a price agreement vs. the time it takes the whole economy to equilibrate (if it does)? We can safely assume that two agents can reach an agreement much faster than the relaxation time of the whole economy.
This situation should, again, be compared to the case of fluid dynamics. The fact that we can speak of a temperature of a fluid at some point in space, means that we are assuming the fluid is in a state of (near) equilibrium locally in space. However, the global dynamics of the fluid can be quite complicated (e.g. turbulence).
After the bargaining process, the inventories of the two agents α and β will be updated as, When both agents are in a near equilibrium state, there is a unique two-agent equilibrium which is summarized in the following proposition: Proposition 2 : Near equilibrium, the amount of product i and j that two agents α and β exchange as a result of a bargaining process (T 2 ) is given by, where and Moreover, the gain in satisfaction is given by, The tradeT 2 will proceed iff L iij > 0.
Proof: To prove this proposition we can simply use the fact that at equilibrium, by definition, the excess demand will be zero. If agent α and β are in a near-equilibrium state, we have already calculated the amount of goods that they require to maximize their satisfaction (proposition 1). In terms of i we have, where M * is the equilibrium exchange rate, which is to be determined. The condition of zero excess demand is simply ∆n i α + ∆n i β = 0. This determines the exchange rate to be, Inserting Eq. (36) this back into (35) gives, Since we have been using the near-equilibrium approximation in (35), we must be consistent with it. Looking at Eq. (37), we notice that if both agents have the same preferences, there will be no trade. More precisely, This makes perfect sense: the only reason two agents will ever trade is because they have different preferences (or expectations). To be consistent with the near-equilibrium approximation, we should assume that the two agents' preferences are not very different. To do this, we define, We now need to expand to leading non-trivial order in (derivatives of) δΩ. Thus, to leading order, the exchange rate (36) gives, Moreover, Eq. (37) gives precisely Eq. (30) of the proposition. The gain in satisfaction for both agents can be calculated from Eq. (24) of proposition 1. Inserting Eq. (39) into (24) and respecting the near-equilibrium approximation, we get Eq. (34).
It is interesting that to the leading approximation, the two-agent equilibrium is egalitarian (∆Ω α = ∆Ω β ). One can then, alternatively, prove this proposition starting from the assumption that the two-agent equilibrium is egalitarian. For an egalitarian equilibrium there is a unique way to decide what to trade: the agents simply trade the pair which gives them the best (mutual) satisfaction. If one goes beyond the nearequilibrium approximations used above, both agents will not necessarily get the same satisfaction.

Metabolisms
In this section we will consider a transformation or metabolism of the form, Such transformation will be made using the current technology which we encode in a production matrix.
Definition 1: A Production Matrix is the rate into which product i and product j are depleted in the conversion i + j → k. We write and we assume that both products i and j must be present at the same time. By convention, we will always take the upper index to be one of the input products, and the lower index the output product. Thus, note that P i k = 1/P k i in general, as P i k and P k i represent very different processes.
Agents will only perform metabolisms that increase their satisfaction. We are now ready to calculate how much output is produced in a production process, assuming near-equilibrium state.
Proposition 3 : Near equilibrium and with constant production matrices, the output of a metabolic processM : i + j → k can be approximated by where The change in satisfaction is given by, Production is assumed to be an irreversible process and so, it can only take place iff −∂ i Ω α P i k − ∂ j Ω α P j k + ∂ k Ω α > 0 and K kk α > 0.
Proof: The rate of change in satisfaction is given by, In order for the agent to produce k, it must be able to increase it's satisfaction and so we need d(∆ M Ω α )/dn k > 0. As the agent keeps producing k and depleting i and j, it will make at least one of the derivatives ∂ i Ω α or ∂ j Ω α very large and positive. This follows from the convexity of the index of satisfaction. Thus there is a point where the derivative (47) will change sign. This represents the equilibrium point. Following the general spirit of a near-equilibrium expansion, we assume that the agent is close to that equilibrium point. Integrating Eq. (47) and expanding around ∆n k = 0 we get, It is easy to see that the maximization equation, gives Eq. (42). Moreover, inserting (42) in (48) we get the change in satisfaction (46).
One can also consider a simpler process such as i → k. The resulting equations can be obtained from the proposition above by setting P j k = 0.

Price Setting by a Market Maker
Another economic operation that we will consider is the case where there is a special agent (Market Maker) which sets prices according to excess demand. This agent can interact at every time step with a different number of agents. This is different from the bartering process. In the later, two agents negotiate a price. The Market Maker, however, satisfy the excess demand of his customers, but has the privilege of setting the stock prices. For simplicity, we will assume that the Market Maker is a wealth maximizer. One then can prove the following proposition: Proposition 4 : Let M n ≡ M j i the exchange rate between products i and j at time step n. Then, the Market Maker will adjust the exchange rate at every time step as, where the sums go over all agents interacting with the Market Maker, and all quantities in the RHS are evaluated at time step n − 1.
Proof: The excess demand for product i from the buyers/sellers at price M n can be found from proposition 1, Therefore, the satisfaction of the Market Maker (MM) changes by, We assume that the excess demand is not big enough to deplete the MM inventory. This needs to be checked at every time steps in the simulations.
The MM now maximizes his satisfaction w.r.t. M n : This equation can be written as, Since the MM is a profit maximizer, his utility has the form, where M MM is the "model" that the MM has of the price. Thus, We now assume that the MM expectation is such that E This model of a Market Maker is very similar to other models in the literature [10] which assume a linear relation between the price adjustment and excess demand. Here, however, we give a precise microeconomic derivation.

What-by-What Matrices and Information
In the previous sections we have presented the four basic economic operators: an exchange at a fixed rate (T 1 ), an exchange trough a barter process (T 2 ), a production process (M) and a centralized Market Maker who sets prices according to excess demand. We have given "flow" equations describing how much stuff is traded/produced based on the maximization of satisfaction near equilibrium. Moreover, we have formulas for the change of satisfaction for fixed information.
However, once a trade is performed, one has new information about the system: there is an exchange rate −∆n i /∆n j . How do agents process such information? Recall that agents carry models of the exchange rates, (M α ) i j . A trading process produces a new data point which can be fed into such model. As we assumed in section 2, agents have enough rationality to maintain a consisten w-w matrix. Given a trade with only two products, say i and j, there is no unique way of updating all entries of the w-w matrix. Here we propose a simple formula to do this.
For the operationT 1 we propose that agents update their w-w matrix as 7 , where we evaluate at the point ∆n i = ∆n j = 0 (that is, before the actual trade). For the barter operationT 2 we propose a similar form, where we evaluate at the point ∆n i = ∆n j = 0 (that is, before the actual trade), and Ω = Ω α + Ω β . Note that in a barter both agents must agree on the final exchange rate and thus (M α ) i j = (M β ) i j . Finally we see that the definition (60) coincides with the actual exchange rate computed within the linear approximation, Eq. (31). The conditions (59) and (60) can be relaxed in more general models.

Simulations of Decentralized Markets
In this section we consider some numerical simulations of simple decentralized market models. In these models, agents are paired at random. Such structure is known in the literature as "search equilibrium" [23,25,26]. However, we emphasize that we are working out of equilibrium. Once two agents find each other they trade trough a Barter operation (T 2 ). However, they can choose which trade to make such that they obtain the most mutual satisfaction according to Eq. (34). In other words, they get to choose which pair of products to trade at every time step. Since every agent can be paired with any other, we see that the we have a complete network.
We start in subsection 5.1 with an example of a decentralized market with only two products and no production. We show how there is price discovery and explain the properties of the relaxation to equilibrium. Using a simple mean-field theory analysis we estimate the relaxation time. In section 5.2 and 5.3, we add the simple transformations i → j and j → i. We find that the system can self-organizes into periodic price cycles with price convergence, or remain in a disordered steady-state where agents never converge to an equilibrium price.
In section 5.4 we address the interesting question of the emergence of (commodity) money. We consider the case of three products i, j and k but now with a simple transformation i → j and j → i. In this case, k is not being transformed and so it can only be traded. We find that for certain initial conditions, the system self-organizes into periodic price cycles. Moreover, the system can self-organize into a phase where all agents use k as a currency. In other words, all trades involve either i ↔ k or j ↔ k but not i ↔ j. However we find that such phase is unstable.
Using a mean field theory analysis, we give a purely statistical explanation for the emergence of money. We find that, quite generically, the product which becomes the currency must be distributed among the population with the greatest variance, and the smallest covariance with relation to the other products.

Two Products and the Convergence to Equilibrium
In this section we study the simplest economic model satisfying the properties of section 2. The model has N agents and two products which we call i and j. The utility has the form We assume that the agents' expectations for the price for the next time step is the same price that they found in the previous time step. That j | t is the price found trough the bartering process in the previous time step. We further assume that the agents are completely certain about their prediction so that Var[(M α ) i j | t+1 ] = 0. Therefore, it follows that Ω α = U α . Let us now describe the algorithm.
Model #1: 1. Agents start with some (random) inventory n i α and n j α and price (M α ) i j 2. At every time step, agents are paired at random (we take an even number of agents).
3. Every pair of agents (α, β) decides which trade (T 2 ) to perform according to which gives them the larger satisfaction in Eq. (34). They perform their favourite trade and update their inventories as, where ∆n i and ∆n j is given in Eqs. (30) and (31) with the utility given in Eq. (61) above. Note that all derivatives are taken before updating the inventory and the price. They also update their prices using Eq. (60).
4. The process is iterated from step 2.
In figure 1 we show a typical result of such simulation. For the simulation we used N = 100 agents. We took the exponent of the utility to be ν = 1/2. The initial inventories were taken from a uniform random distribution in the intervals: n i α ∈ [1, 2], n j α ∈ [4,5]. Note that the system is scale invariant and so the overall order of magnitude of the inventories is irrelevant. The initial prices were taken from a uniform random distribution in the interval (M α ) i j ∈ [1, 1.1]. Figure 1 shows the prices (M α ) i j of every agent in different colors. We see the convergence towards a fundamental price. The horizontal line is the fundamental price which, by scale invariance and the form of the utilities, is simply (M ) i j = n i /n j , where n i and n j are the total number of products i and j in the economy.
We can get a better understanding of the relaxation to equilibrium by doing a mean field theory analysis of the pricing formula (60). Let (M α ) i j ≡ M α and let the brakets · denote averages over the population. Then we expand, for all α ∈ N .
To leading order Eq. (60) gives us the average price at time t in terms of the price at t − 1: Here we used the fact that since the product number is conserved the average product numbers are constant in time and that n i / n j = n i /n j . One can easily iterate this equation to obtain, We see that as t → ∞ the price M goes to the fundamental one n i /n j . We can define the relaxation time for such process by ν t ≡ e −t/τ , and we find We see that for small ν the relaxation time is small and so equilibrium is reached quickly. For ν → 1 the relaxation time becomes infinite and the system takes longer to equilibrate. In fact, the price formula (65) fits the numerical data quite well as shown in figure 1. Another view of the relaxation time can be obtained using the flow equation (30). Doing a similar mean field theory analysis we find, where The first term in Eq. (67) gives the linear response to gradients in product number. The second term is the linear response due to price gradients. We see that as ν → 0, the first term dominates and the system is very sensitive to inventory gradients. This is why the relaxation time is smaller. For ν → 1, the second term dominates. This means that agents are very sensitive to price movements, and hence are less sensitive to the distribution of products. We should also note that the limit ν → 1 is singular and so our linearized approximations break down. A third way to look into the equilibrium state of the system is through the product distribution. The utility maximization implies, Using the utility Eq. (61) and the fact that Ω α = U α in this model, we get that in equilibrium, the inventory must be constrained such that If the agents have roughly agreed on a price we get Therefore, we see that at equilibrium, agents' product numbers should lie in this line. Figure 2 shows a scatter plot of agents inventories in the (n i , n j ) plane, and the equilibrium line M n j α − n i α = 0. The plot was taken at time step t = 50 for the simulation of fig. 1 (ν = 1/2). We see that indeed agents have reached equilibrium.

Production, Price Cycles and Self-Organization
We can now implement some production processes in our two product example. For this simple market there are only two possibilities: i → j and j → i. We can specialize the results of proposition 3 to this simpler production operation. For the process i → j, we just take P i k ≡ P i j and P j k = 0. Similarly, for j → i, we take P j k ≡ P j i and P i k = 0. The algorithm will be the same as the previous one, except that at every time step, we allow the agents to choose which production process to do before doing a trade. That is, all agents have the same "skills". They choose which process to perform according to which one gives them the best satisfaction, which can be computed from Eq. (46). Then they update their inventories according to Eqs. (43) and (44) (with the appropriate indices). If both processes decrease their utility they choose not to produce.
We note that for P i j > 1 and P j i > 1, the output of each process will decrease the total number of products. Therefore, these operations will tend to decrease the utility and therefore will not be used by the agents. Now, for P i j < 1 and P j i < 1, the total number of products is increased. For example, for P i j = 1/2, we have a transformation 1j → 2i. In order to illustrate the self-organization of the system, we take a system with N = 10 agents and ν = 1/2. Moreover, we take the initial inventory of all agents to be the same: n i α = n j α = 1 ∀α ∈ N . However, in order to start the dynamics we take the initial w-w matrix from a uniform distribution in the interval (M α ) i j ∈ [0.8, 1.2]. Finally, the production rates are taken to be P i j = P j i = 1/2. In figure 3 we show the result of this simulation for the w-w matrix of all agents. We see that the system goes first trough a disordered phase but at some point it converges to a cyclical equilibrium state. The red dashed line is the fundamental price M i j = n i /n j . Note that due to the finite relaxation time, the agents are not completely converging to this price. Nevertheless, they do agree on a price between each other. One can show that the reason for the price cycles is that agents are twitching collectively between the two types of productions. Another important point is that the total number of products in the economy is growing exponentially in time. For example, in figure 4 we plot the log of the total number of product i as a function of time.

Not Equilibrium, but a Steady-State
So far we have seen cases where the agents collectively find an equilibrium price, even when it is time dependent. However, this is a rather special situation. More generally, the system never quite reaches an equilibrium. Rather, one can say that the system is in a steady-state. In such a state, the prices might not converge towards a unique equilibrium, but oscillate around it. Moreover, agents do not quite agree on the prices. In this section we show an example of such behavior. The model is similar to the one of the previous section. However, instead of letting the agents decide which production process they do, we assign them fixed skills. That is, they have the ability to do either i → j or j → i, but not both. We distribute the skills randomly among the agents. In figure 5 we show a typical run of such system. We have taken N = 100 agents, ν = 1/2 and P i j = P j i = 0.9. For the initial conditions we have, n i α = n j α = 1 and (M α ) i j ∈ [1, 1.1]. We note that the prices never quite reach an equilibrium.
In figure 6 we show the average of log M i j , along with log(n i /n j ), which is the "equilibrium" price. We note that both are systematically away from each other. This shows that the system is truly in a non-equilibrium state.

The Emergence of Money
In this section we study the emergence of (commodity) money in a simple system with three product and production. We want to emphasize that the "currency" that we will see emerging correspond to commodity money as it is an object that give agents satisfaction. This should be contrasted with "fiat" money which is intrinsically worthless to the agents. There is a large body of literature regarding the emergence of money. In the classic paper [23], Kiyotaki and Wright (KW) study a simple general equilibrium model with three goods and N agents that could produce one of three kind of products and consume one of them (which is different from the one they produce). The agents find each other at random and have very simple strategies of "trade or not-trade". The model also included the cost of storing for the different products.  Figure 5: Disordered steady-state of a two product system. The agents are performing the metabolic process i → j and j → i, but now with assigned skills. The red-dashed line is the equilibrium price M i j = n i /n j .
The authors found Nash equilibria where either commodity or fiat money serving as the medium of exchange. This kind of general equilibrium models where agents find each other at random is usually known as "search equilibria". There have been many subsequent works following the KW model, see e.g. [25,26]. For an interesting previous attempt to explain the emergence of money see [24]. Even though these models are interesting in that they show the existence of Nash equilibria with commodity or fiat money as a medium of exchange, they do not provide a explanation on how such transition could take place from a primitive barter economy. An attempt to explain the transition from a barter to a fiat money economy was developed in [27]. The transition is explained still in the framework of general equilibrium theory by introducing a centralized government agent which "must be able to promise credibly to limit the issue of money". This approach has been criticized by Selgin [28] which claims that there is no known direct transition from barter to fiat money in history. Instead, it seems that fiat money is a rather recent development and that it has always followed an existing commodity money standard (or that the fiat money was convertible to some commodity such as gold).
In order to see a dynamical transition from barter to commodity money, one needs to go beyond equilibrium theory. The author is not aware of any non-equilibrium model that shows this transition. However, we should mention the models of [29,30] which show that the price of fiat money can be determined dynamically. One important reason to have a non-equilibrium theory with a monetary phase transition, is to address the question of monetary stability [31,32]. In fact, we will find that in our first example the monetary phase is unstable. Before describing the simulations, we want to make a mean field theory analysis of the bartering process described in proposition 2. Suppose two agents find each other, and must decide which products to trade. In the near-equilibrium approximation, both agents will gain the same satisfaction as we showed in proposition 2. Thus, they will be able to unambiguously decide which pair to trade according to Eq. (34). Let us now suppose that all agents have reached, more or less, an agreement on the exchange rate of products. In fact, they can disagree on the prices, but we will need to assume that such disagreement is much less than the inventory fluctuations. In equations, where the brackets indicate averages over the population, and δn = n − n , etc. are the fluctuations.
We can now expand the gain in satisfaction, Eq. (34), for a trade of i and j between agents α and β around the averages. To leading order, we get We remind the reader that we are assuming utility functions of the form (16). We see that the terms with the averages on the RHS of Eq. (73) will not vary much according to which product the agents trade. The terms in the parenthesis are the ones which give the largest fluctuations. These last terms will determine what products the two agents will decide to trade. We can now take an average over the whole population and get, where we have defined the variables For a product to become the favorite medium of exchange, it will need to maximize (74). This can happen in various ways. From Eq. (74) we see that such product (call it i ′ ) must have the greatest variance (Var(x i ′ ) ≫ Var(x i ), ∀i = i ′ ) and/or the smallest covariance with the rest of the products (Cov(x i ′ , x i ) ≈ 0, ∀i = i ′ ). This last condition means that such product should be distributed pretty much independently from the other products. Now let us see how can this happen in some numerical simulations.
Lets begin by studying a barter economy with three products i, j and k and the transformations the transformations i → j and j → i. That is, the model is just like the one we studied in section 5.2, but now with an extra product k that does not gets transformed. So what would be the signature of a monetary phase? We say that the system is in a monetary phase with currency k if all (or most) agents make the trades i ↔ k and j ↔ k but not i ↔ j. Note that the existence of this phase must be due to the dynamics of the system as the agent utilities are invariant under changes of inventory measure. In other words, all products are treated in equal footing in a trading process.
We have found that, in this model, the monetary phase only exist for some relatively fine tuned initial conditions. As an example, we take N = 100 agents with ν = 0.1. We also take the rate of production to be close to one: P i j = P j i = 0.95. This means that the total number of i and j will grow slowly. Initially, we give every agent the same amount of stuff: n i α = n j α = 1. Finally, we take our initial w-w matrix from a uniform random distribution in the interval (M α ) i j ∈ [1, 1.01] and (M α ) i k ∈ [1, 1.01]. Figure  7 shows the (M α ) i j entry of the w-w matrix for the first 20 time steps. All agents' are plotted in the same figure, but their agreement is so good that they are hard to distinguish. The dashed red line is the fundamental price M i j = n i /n j . The price cycles are what we expected from the previous simulations. Now comes the surprising part. In figure 8 we plot the fraction of agents using product k in a trade. We see that for the first 60 time steps, more than 95% of all agents are using k in a trade. This is the monetary phase! However, what is surprising that after t ∼ 70, the agents cease to use k as a currency. That is, they are bartering with all possible combinations. We have plotted the line 2/3 since this is the fraction of agents we expect to use k in a trade if the trades are being chosen at random. We don't observe any particular movement in the prices that coincides with the end of the monetary phase.
We now want to understand the existence and stability of the monetary phase using the mean field theory analysis described above. First, we note that ignoring the price discrepancies between agents is a very good approximation in this case. In figure 9 we plot log (x i − x j ) 2 for the different pairs of products. In the plot, we have only shown a time interval around the end of the currency phase, to make it more clear. First, we can see that the monetary phase is not an equilibrium as the variances are changing over time. Furthermore, we see that during this phase ( . This is what we expect from the mean field theory analysis. However, once the product variances stabilize (a true "equilibrium"), we find that , and so no trade pair is preferred over the others. This is the end of the monetary phase. The example above is interesting in that the monetary phase arises "spontaneously" from the intrinsic dynamics of the system. However, this is not the only example where agents choose a preferred medium of exchange. In fact, according to the mean field theory analysis, all we need to have is a product with larger variance and smaller covariance than the rest. We can make this happen "artificially" by endowing agents with a particular product at every time step. As an example, we study the same model as above, but without production. However, we assume that the amount of product k that different agents have varies according to, where t is the time step, and we take r from a uniform distribution with zero mean 8 . Therefore, the total amount of product k will not change on average. In figure 10 we show the fraction of agents bartering with product k. We see the roughly 90% use k in an exchange. In figure 11 we plot log (x i − x j ) 2 for the different pairs of products. We see that indeed the trades i ↔ k and j ↔ k are preferred over i ↔ j. This makes k the favorite medium of exchange. In this simulation, the agents do not completely agree on the prices. In figure 12 we plot the variances of the M i j and M i k entry of the w-w matrix. We see that they do not go to zero. This is another example of a steady-state rather than an equilibrium.

Simulations of a Centralized Market
In proposition 4, we defined a centralized market with a Market Maker which sets prices according to excess demand. This structure is more appropriate in order to simulate financial markets. There is a large body of work on agent based simulations of financial markets (see the review [17] and references therein). One important line of research along these lines is the impact of agents' heterogeneity to stock price movements (see the recent papers [9,10] and the reviews [11,12]). In fact, it has been claimed that some of the most salient stylized facts of financial time series such as, fat tails, volatility clustering, and decaying autocorrelations are, in fact, due to the heterogeneous strategies and expectations of the market participants.
Our purpose in this section is not to provide new insights into these phenomena. Instead, we want to illustrate that the framework presented in this paper is very appropriate to study the effects of agents' heterogeneity.
To this end we present some simple simulations of centralized markets. We begin in section 6.1 with the simplest model of homogeneous expectations, in order to see the expected convergence to equilibrium. In section 6.2 we consider a model where  agents make speculations about the price return of the next time step. We show the emergence of a speculative bubble and a subsequent crash. In all simulations we will use only two products for simplicity. Moreover the utility will be of the usual form, Eq. (61). In the following we will use the notation M ≡ M j i . The basic algorithm for all the models is as follows, Model # 2: 1. Agents are started with some random initial inventories and expectations on the next w-w matrix value. This step will be explained in more detail below.

2.
A new market closing price is computed from Eq. (50). We use a market maker with an infinite supply of products and so we do not have to worry about depleting his inventory.
3. Agents update their inventories using where, and M n is the closing price.
4. Agents update their beliefs for the next time step.
5. The process is repeated from step 2.  Figure 10: Fraction of agents using k in a trade. This is with no production, but with an exogenous endowment of k as described on the text.

Homogeneous Expectations
In the simplest model, agents will have homogeneous expectations about the next w-w matrix value. First, consider a fixed expectation, That is, agents agents believe that the next price is the same as the previous one. This is the model of rational expectations. Furthermore, we can assume for simplicity that agents are certain about this prediction and so Var[(M α ) n ] = 0. Therefore, their satisfaction indices will be of the form, In figure 13 we show the result of a simulation where agents have such and homogeneous beliefs. We took N = 100 agents with ν = 0.5, and the initial endowments where taken from a uniform distribution in the interval n i α ∈ [1, 5] and n j α ∈ [1,8]. The initial closing price was taken to be M 0 = 1. We see that, as expected, agents reach an equilibrium which, by scale invariance, is M eq = n j /n i . Note that the total number of products is not conserved here since we assumed a market maker with an infinite supply.
We note that the w-w matrix is an internal valuation tool, and so it can be interpreted as a "fundamental" price which comes from some exogenous information that the agent might have at hand. We should note that agents which hold a fixed belief about a stock price are usually called "fundamentalist" in the literature [10]. This is in order to distinguish them from the "chartist" which make a prediction based on a previous price trend. Therefore, the model that we are considering here can be interpreted as consisting of fundamentalist only. A popular way of modeling fundamentalist is to assume that they hold fixed beliefs about the price of a stock [10]. For example, our agents can have expectations based on some internal model such as the log-normal random walk: where the return r α is taken from a gaussian normal distribution with zero mean (at every time step). The index of satisfaction can now be approximated, to leading order in the variance of r α as, where σ 2 α = Var[r α ]. It is usually assumed that the model (81) comes from some fundamental information about the "company", which all agents have access to. Therefore, all agents will have the same model.
In this case, one expects the market closing prices M n to follow closely the agents' model (81). However, we need to remember that our agents might put more importance to the actual distribution of products than to their w-w matrix. The parameter that controls the relative importance of their w-w matrix and their inventories is the exponent ν in the utility. For small ν the agents will put more importance to the "fundamental" price M = n j /n i , than to their models. This will be important in triggering the market bubble in the next section.
Here we illustrate this by running a simulation with N = 10 agent, where all agents have the same model (81) and they all have the same prediction for the return at every time step. We take ν = 0.5 as an illustration. The initial distribution of goods is taken from the same uniform distribution as before. Moreover, we take the variance of the model (81) to be σ α = 0.01. In figure 14 we show the closing prices along with the model prices and the "fundamental" equilibrium prices M = n j /n i . We see that the actual closing prices are half way between the model and the fundamental ones, as expected. If we take ν = 0.9 instead, we see in figure 15 that the closing prices reasemble more the model price. If we want to see fat tails, volatility clustering, etc. we need to add some chartist strategies as in [10]. We won't pursue this here.

A Speculative Bubble
In this section we present a simple example of a speculative bubble (see e.g. [33]). As we have seen the parameter ν controls how much weight an agent puts in his own model of the market, versus the "fundamental" price which comes from the total number of goods in the economy. In the first model that we presented in the previous section the agents had the simplest prediction E[(M α ) n ] = M n−1 . Thus, they took information from the market and incorporated it in their models. In the second example, they had fixed beliefs, E[(M α ) n ] = (M α ) n−1 , and so they where totally ignoring the market's closing prices. Here we want to construct a model that is in between these two. The agents' prediction will be of the form, where now r α is a speculation on what the log return should be in the next time step. We let all agents choose their own values of r α at every time step. For simplicity we assume that all agents are certain about their beliefs and so Var[(M α ) n ] = 0, and that all agents' beliefs r α are taken from the same gaussian distribution. The index of satisfaction is then, In figure 16 we show the results of a simulation with N = 500 agents, ν = 0.5, and the initial inventory endowments are taken to be n i α = n j α = 1. We also take the returns r α from a normal gaussian distribution with mean µ = 4 and standard deviation σ = 2. At every time step we take r α from that distribution. Thus we see that agents are consistently betting on a positive return (on average). Figure 16 shows that at the beginning, the agents' speculation drive the market prices up. However, the fundamental price is falling so fast that the market price cannot keep with it. Eventually the bubble bursts and the market price is driven to zero.
The existence of the bubble lies in the fact that agent pay attention to both their inventories and their beliefs. If we take a larger value of ν, say ν = 0.9, agents will put more weight to their beliefs than to their inventories, and they can even turn around the fundamental price as shown in figure 17.  Figure 14: Closing prices for a market where all agents are "fundamentalist" whose internal price is given by the random walk of Eq. (81). The red line is closing price. The blue line is fundamental equilibrium price M = n j /n i , and green the agents' model. This is for a model with ν = 0.5.

Conclusions
In this article we have studied a class of heterogeneous economic agent-based models which are built upon some basic set of principles, and a set of fundamental operations which include trade and product transformations. The agents have very limited information on the system, and have only a finite set of operations that they can perform. Therefore, they have bounded rationality. One of the key assumptions was the principle of scale invariance. That is, that there is no other scale in the economy apart from the units that agents use to measure the products, and the dynamics of the economy must be invariant under unit transformations. Moreover, all prices are relational. These assumptions are based on the idea that economic systems have approximate (or exact) gauge symmetries which restrict their possible dynamics. We also introduced the concept of a "near-equilibrium" expansion. We argued that this is the analog of "perturbation theory", which is a very familiar technique in physics. The near-equilibrium approximation allow us to derive approximate "flow" equations that describe how many products agents exchange in a trade, and produce in a metabolic process. These equations are written for a general convex index of satisfaction. These equations can be applied to a wide variety of market models as we showed in the text.
An interesting point that we studied was the (possible) convergence towards a global economic equilibrium. In section 5.1 we saw that this can indeed happen. Moreover, we calculated the relaxation time to equilibrium in a particular model with two products. However, as we pointed out in section 5.3, one can also have steady states where the  Figure 15: Closing prices for a market where all agents are "fundamentalist" whose internal price is given by the random walk of Eq. (81). The red line is closing price. The blue line is fundamental equilibrium price M = n j /n i , and green the agents' model. This is for a model with ν = 0.9.
agents never quite reach a price equilibrium. Another interesting aspect of these models is that they can show a spontaneous transition to a monetary economy. We studied this point in section 5.4. There, we showed that the monetary phase can be explained from a mean field theory analysis, in terms of the distribution of goods. Finally, in section 6 we showed that one can also address the question of stock markets and agents' expectations within our class of models.
The models presented in this article can be extended in variety of ways. First of all, one would like to develop a more systematic treatment of the near-equilibrium expansion. In particular, one would like to have a way of analytically studying the stability of certain economic equilibria and calculating relaxation times. Moreover, one would like to do this for different network topologies. It turns out, that the natural language to study such questions is that of Markov Chains and Graph Theory. This is currently work in progress [34]. See also [35] for a review on networks in economics.
Another important question to address is the role of contracts and credit. These must be added to any realistic model of the economy. Contracts require us to go beyond anonymous agents. This is a difficult topic to deal within agent-based models. Nevertheless, it is possible to introduce contracts into our class of models. This is also work in progress.
Finally, there is the question of innovations. That is, new products come into existence quite frequently in a real economy. This question has recently be addressed in [36]. The authors studied an economy of wealth maximizing agents. The agents were endowed with metabolic processes like the ones we have studied here. Moreover, new products can pop into existence. In their economy, though, all agents agree on a price and they could only trade using a prescribed money. Therefore, it would be interesting to extend the work of [36] using our scale invariant approach. The author believes that the ultimate goal of any non-equilibrium approach to economics, is to ultimately provide a prediction for certain statistical laws that can be matched with econometric data. These "laws" might involve relations between the distribution of prices and the underlying products, as an example. The semi-analytical modeling approach presented here is amenable to this kind of prediction. However, more realistic market models must be studied. closing price, and the blue one is the "fundamental" price M j i = n j /n i . Here we took ν = 0.9.