Money Creation and Financial Instability – An Agent-Based Credit Network approach –

We pick up the standard textbook approach of money creation and develop a simple agent-based alternative. We show that our model is well suited to explain the endogenous creation of money. Although more general, our model still contains the standard results as a limiting case. We also uncover a potential instability that is hidden in the standard approach but easily recognized within a strict individual-based and stock-flow consistent version. We show in detail how individual interactions build up systemic risk and how banking crises are triggered by the maturity mismatch of different cash-flows and spread by the depreciation of non-performing loans (e.g. interbankor government debt). JEL classification: C63, E42, E51, G01


Introduction
The recent crisis has vividly demonstrated that the stability of the banking sector is highly important for the stability of the economy as a whole. A collapse of single banks can have severe and long lasting negative effects on other banks and on the real economy. Unfortunately, mainstream economic theory is not capable of understanding phenomena like (endogenous) crisis because they rely on equilibrium and rationality assumptions and are thus inherently very stable. 1 To shed light on the instability of the banking sector, we pick up the simple textbook approach of money creation and develop an agent-based computational economic (ACE) alternative. We are able to show that systemic risk is inevitably interwoven with the creation of money in the credit market and thus an intrinsic property of modern economies.
The creation of systemic risk in the banking sector has been subject to numerous research projects in the aftermath of the financial crisis. Battiston et al. (2009) have developed an ACE model of a dynamic credit network. The authors build on a system of stochastic differential equations and show the existence of a destabilizing financial accelerator. In another related research project Tedeschi et al. (2011) developed a three sector ACE model that includes the credit sector but also a real sector. The authors find that credit connections between banks have no impact on GDP but create systemic risk. In another paper Lenzu and Tedeschi (2011) analyze an interbanking network and find that the network structure plays an important role for the stability of the system. In a very recent paper, Krause and Giansante (2012) developed a network based interbanking model and analyze its stability by letting one bank fail exogenously. They find that the network structure plays an important role in producing systemic risk and that the probability of observing a cascade is positively correlated with the size of the initially shocked bank.
What is novel in our approach is that we do not start with a given interbank network. Instead we show that it is the creation of money that gives endogenously rise to an interconnected banking sector and systemic risk. Such risk builds up even if no interbank market exists. Furthermore, we show that no depreciation of assets is needed to trigger a banking crisis. We also do not apply exogenous shocks to trigger banking crisis. Instead we show how individual interaction builds up systemic risk and also triggers bankruptcy cascades endogenously.
It has been argued in the literature on stock-flow consistent (SFC) modeling that the key to understand the recent economic crisis is debt growth. In line with the invocations of Arnold (2009) and Bezemer (2010) for an accounting of economics we have implemented SFC as the accounting part to an ACE model of the credit sector to investigate the potential contribution of SFC models to ACE macroeconomics.
A method that seems well suited for the analysis of endogenous crisis is ACE modeling. 2 ACE models can be understood as the simulation of artificial worlds that are populated by autonomous interacting agents. Every agent is equipped with properties describing his internal state and with behavioral rules that guide his interaction with others. Once created the artificial economy is left alone and agents interact according to the defined rules. Instead of solving an equation system the model is simply run. Aggregate statistics like the price index or GDP can then easily be calculated from the resulting individual dynamics.
One strength of the ACE method is that no assumptions about the macro level are necessary. The passage from micro to macro is by interaction and not by assuming a representative individual or by summing up heterogenous individual decisions and equilibrating aggregate supply and demand on the market for labor, goods, money and so on. All observed regularities of the aggregate variables are therefore endogenously emerging from micro assumptions and micro interactions. The method can help to shift the focus from calculating an equilibrium and proving its stability and uniqueness to the coordination of large decentralized economic systems. For example, one interesting question that can be answered in this context is: "How can agents that are not endowed with unrealistically high information processing capacities and are not even aware of their mutual existence, coordinate so well through the market mechanism? And why does this coordination mechanism break down from time to time?" 3 Besides the strengths of ACE, however, there are also some problems: Problem 1: The major weakness of ACE models is that the modeler is left with enormous degrees of freedom in choosing the types of agents, their behavioral rules and the structure of markets. Consequently the few ACE macro models that exist are very different in nature since they start with very different assumptions and employ very different ways of modeling. Additionally it is easy to deal with enormous complexity. ACE modelers are thus tempted to over-increase the level of complexity in their models (i.e. add more types of agents, behavioral rules, special cases for a certain interaction, ... ). Mainstream modeling, in contrast, includes the solution of a mathematical problem which puts a natural upper bound on the possible level of complexity. In order to keep his model tractable a DSGE modeler has to be much more disciplined in choosing his assumptions. As a result, the available ACE macro models are not only very different in nature, they are often so complex that it is unclear which macro pattern is a result of what micro property. Models appear as black boxes where the passage from input to output is not fully clear. 4 Problem 2: One loudly expressed critique of the mainstream approach is the top-down introduction of markets. Instead of growing the outcome of a market by individual interactions, its existence (with some exogenously given properties) is simply assumed and the aggregate of supply is equilibrated with the aggregate of demand. Although this criticism is perfectly justified there are some ACE authors who don't apply the same standard to their own models. They blame the Walrasian Auctioneer for being an unrealistic (because centrally operating) apparatus and consequently remove him from the model. But instead of putting a bottom-up interaction based alternative in its place, they simply use another central mechanism, e.g. central matching lists, queuing lists or rationing schemes. 5 We think that solving problem 2 should be seen as a step towards deeper microfoundation and a possible way of disciplining ACE.
In the paper at hand, we address problem 1 by keeping the model as simple as possible. No more classes of agents are introduced than is absolutely necessary to derive the intended results. Interaction rules are kept as simple as possible without introducing special cases for each and every interaction rule. The simulation software 6 is designed in a way that allows the modeler to visually inspect every single interaction that occurs somewhere on the individual level. By doing so we want to open the black box to the largest extent possible. At the same time the model becomes so intuitive that it can be directly understood without any prior knowledge. This aspect should also help to facilitate the discussion with the economic mainstream. We also address problem 2: Aggregates do not interact directly anywhere through some aggregate processes. Whenever transactions are performed they take place between two concrete individuals.

The Model
In this section we present a formal description of our model. Although the following presentation is already very detailed, we have to leave out some unimportant aspects that are only intended to make the graphical animation more convenient. The full source codes are available upon request. 4 Fagiolo and Roventini (2012) put it as follows: "The more one tries to inject into the model 'realist' assumptions, the more the system becomes complicate to study and the less clear the causal relations going from assumptions to implications are." The authors call this problem over-parameterization. They offer a detailed discussion of the pros and cons of ACE and some possible guides to assumption selection that prohibit over-parameterization. A similar point is made by Farmer et al. (2012) who argue that the fundamental question for ACE economics is, how aggregate macro behavior emerges from heterogeneous, interacting individuals at the micro level. This question can be addressed with stylized ACE models. 5 Examples are the goods market in Wright (2005), the goods and labor market in Dosi et al. (2008) and Dosi et al. (2010), the market in van der Hoog (2008) or the goods market in Tedeschi et al. (2011). ACE macroeconomics is still in its infancy and it is not our intention to blame authors for not solving problem 2 directly in the first generation of models. The models that exist so far did a great job in demonstrating the possibilities that ACE has to offer. 6 Our model is written in Netlogo. This is a multi-agent programmable modeling environment that is developed at the Center for Connected Learning and Computer-Based Modeling at Northwestern University.

3
The model description follows the ODD (Overview, Design concepts, Details) protocol. 7

Overview Purpose
Our model is a simple representation of the credit market. It picks up the textbook approach of money creation and shows that it also creates a complex interrelated network of financial claims between agents as a byproduct. This network of claims necessarily produces inherent instability and the thread of deep crises. Since our model has a natural benchmark in standard theory, it is well suited to contrast SFC/ACE models with the mainstream approach. We can only highlight on the qualitative differences here and have to leave quantitative comparisons for future research.

Entities, State Variables, and Scales
The artificial environment is populated by three different types of agents: Banks (BA), Households (HH) and a Central Bank (CB). HHs in our setting are interpreted as representatives of the complete real sector and therefore also have characteristics that are typically ascribed to firms: They buy goods but also produce them, they save but also take loans. We index BAs by the subscript b = 1, ..., B and HHs by h = 1, ..., H where we set B H. BAs and HHs are characterized by their positioning on a two dimensional landscape. Space plays a minor role in the model. It is used as a tool to provide random matching and to introduce frictions.
The CB is introduced to close the system from an accounting point of view. For simplicity, we ascribe it a passive role only. It does not supply money through refinancing operations or standing facilities. It is not located in the landscape.
The most important state variable that characterizes BAs and HHs is cash (C). It is the only medium of exchange, i.e. all transactions have to be payed with cash. We explicitly model every single agent's balance sheet at every point in time. 8 In this balance sheet C is recorded on the Assets side. Each agent can also possess claims on the cash of any other agent. We denote claims of HHs against BAs with D (for deposits) and claims of BAs against HHs with L (for loans). Obviously, D is recorded as an asset in the HHs balance sheet and as liability in that of BAs, vice versa for L. The balance sheet structure is exemplified in sheets 1 -3.
Each BA is required to deposit minimum reserves at the CB (denoted by R). Reserves R b are a claim of b against the CB. We assume that a BA can immediately and at any hight convert R into C and vice versa. This assumption accounts for the fact that transactions between private banks and the central bank are carried out much faster and for smaller time horizons (e.g. overnight) than 7 The ODD protocol has been developed to standardize the presentation of ACE models. The full description can be found in Grimm et al. (2010). 8 Compare Cincotti et al. (2010) for a detailed description of the implementation of accounting in a large scale ACE model.

Liabilities Cash
Loan For simplicity we assume that every HH can only have claims against one given BA (this BA is denoted b D,h ) and only one BA (denoted by b L,h ) can have claims against him. This simplification reflects the fact that most HHs are customers of a very limited subset of BAs and do not lend money from/to the entire set of BAs. 9 As long as more than one BA exists we assume b D,h = b L,h , i.e. h places his deposits and takes credits from different BAs. Otherwise the two positions D and L would partially cancel out against one another. We further assume, for simplicity, that b D,h and b L,h do not change.
Equity positions E b , E h , and E cb are given by the residual between assets and liabilities (= net worth). All entries -expect for equity -have to fulfill a non-negativity constraint. The sum of all individual assets has to equal that of liabilities. We can use this property to check whether all accounting operations have been performed correctly. In the simulations below we will check that For the ease of exposition and to stay in line with the textbook approach of money creation, we normalize the interest rate to zero. 10 We further assume that all BAs equity is initially zero E b = 0 ∀ b . Since with an interest rate of zero BAs can not make any profit, E b will remain zero and we can neglect the appearance of BAs net worth on the assets side of HHs balance sheets.

Process Overview and Scheduling
Time in our setting necessarily comes in discrete steps. To come as close as possible to the ideal of continuous time we scale down the length of these time steps by so much that the model becomes practically continuous. In each (infinitesimal small) time step the agents are allowed to make decisions and act.
We assume that agents try to achieve a constant ratio between certain positions of their balance sheet, e.g. keep cash in a given relation to deposits. Whenever this relationship is not matched they take actions in order to reestablish it. In each time step we check for the state of every agent and assign him one mode depending on the relations of his balance sheet positions. The mode in turn determines the actions the agent undertakes.

Design Concepts Basic Principles
The basic principle underlying our model is the creation of money. If money is defined as the sum of cash and deposits owned by HHs, it is created both, by the central bank (via the monetary base) and by the banking sector (via dept/loan contracts). In equilibrium the money amount is a multiple of the momentary base. This property of money is well known. But instead of simply deriving the equilibrium outcome, we show that the equilibrium-benchmark is the long run result of a disequilibrium process composed of individual interactions.

Emergence
We will only model interactions among individuals in an explicit way: For every single transaction we impose a flow of cash from one specific agent to another. This is also true if a loan is granted from a BA to a HH. 11 Each flow is accounted for in the balance sheets by changing the agents' stocks and maybe creating a claim of one against the other. We do not assume the existence of a credit market with a given set of properties (like equilibrium or monopolistic competition). We can, however, interpret the sum of all individual credit contracts as the credit market. This market is an endogenous object growing out of individual transactions. It has endogenous properties founded in micro interactions.

Adaption
The agents in our model act to achieve a given relation between certain entries in there balance sheet. HHs try to divide their wealth (C h + D h ) into cash and deposits so that they are in a fixed relation to each other. If the wealth of a HH is composed, for example, of a too high share of cash relative to deposits he places further cash in his bank account to match the target relation. BAs are modeled in a similar way. Instead of matching a given C-D-ratio they have to keep minimum reserves R b as a given fraction of deposits D b .

Objectives
To stay in line with the common behavioral assumptions that are used in basically all textbooks 12 to derive the monetary multiplier, we assume that a HH h wants to divide his wealth up into C h and D h so that holds. Where q is a parameter which, for ease of exposition, we assume to be equal among all HHs. BAs on the other hand have to obey a reserve requirement according to where r is a policy parameter of the CB that determines BAs' reserve requirements as a fraction of deposits. Recall that D b is not the aggregate sum of all HHs' deposits but only of that subset of HHs for whom b D,h = b holds, i.e. sum of all deposits that have been placed at BA b. Since our model is a disequilibrium model, we do not assume that (1) and (2) hold. Instead we will define the agents' behavioral rules such that they strive to arrive at those relationships. It might be possible, however, (e.g. after a liquidity shock by the CB) that some agents temporarily don't meet (1) or (2), respectively.

Learning
We do not apply a complicate learning procedure for the agents. Instead we assume, first, that knowledge is generally local, i.e. agents know their own state variables but not those of others. Second, since the positioning of banks on the landscape is not changing over time, we assume it to be general knowledge. Therefore, HHs do not need to apply a searching mechanism to find a BA.

Interaction
Interactions always take place between two agents. Every interaction induces a flow of cash from one agent (say A) to another (B): A's cash entry is reduced by a given amount, while B's is increased by the same amount. Some transactions (e.g. buying a good) are directly completed after the flow of cash from A to B. Other types of transactions (e.g. borrowing/lending) consist of the commitment to repay later and additionally cause the creation of claims of A against B.
This way of modeling interactions makes sure that all flows between two agents are in line with the change of their stocks (i.e are SFC 13 ). It proves a disciplined way to introduce money into ACE macroeconomics since it obeys a "fundamental law of macroeconomics analogous to the principle of 12 e.g. Mankiw (2007), chapter 18. 13 A formal definition of SFC can be found in Patterson and Stephenson (1988) or Taylor (2008). conservation of energy in physics" 14 .

Stochasticity
Whenever agents are satisfied with their current state, they do not initiate transactions and take a random walk around the landscape. Obviously, this random walk is based on stochasticity. Regarding interactions, we use pseudo random number generators in two ways. (1) When an agent can choose only one partner to interact with, he decides by picking randomly.
(2) Whenever a BA has surplus liquidity (C b > 0) it offers a loan of the highest possible amount 1+r . If a HH decides to take a loan from that bank, we determine its demand randomly between the supplied amount 1+r and a small lower bound value close to zero.

Observation
When running the model we keep track of the balance sheet of every single agent. For all positions that denote a claim of one agent against another we save the amount of that claim and the two involved agents. Given the set of all individual balance sheets and the way they are interwoven with one another, we can also calculate different monetary aggregates as the respective sum of different individual positions.

Details Initialization
At the beginning all HHs are randomly distributed over the landscape, while BAs are placed evenly (figure 1). We initialize all balance sheet entries with zero, i.e. there is no money in the economy.

Submodels
A HHs current state of C h and D h straightforwardly implies three different modes of action: • HH mode 0 (C h = q · D h ): Desired cash quote holds exactly, no action required.
If C h = q · D h holds for HH h, he enters mode 0. In this mode, there is no need for h to initiate any transaction. We illustrate this mode by a random walk around the landscape. In the case of C h < q · D h he enters mode 1. The HH then directly walks to BA b D,h to withdraw deposits until (1) holds. If, vice versa, C h > q · D h holds (mode 2) he directly walks to b D,h to place the excess cash 14 Godley and Cripps (1983), p. 14. Found in Bezemer (2010). Similarly, we define 3 modes for BAs. All modes follow directly from the assumption that each Bank b has to hold reserves R b proportional to the deposits that HHs have placed on bank accounts of b. The different modes are thus given by: Liquid funds match target value of reserves.
• BA mode 1 (F b > r · D b ): Too much liquid funds, grant a credit.
• BA mode 2 (F b < r · D b ): Not enough liquid funds, withdraw a credit.
are equal to the required reserves, b transfers all liquid funds into reserves (C b = 0 and R b = r · D b ). Equation 2 holds, the bank enters mode 0, and no further transactions with other agents are initiated by b. If b's liquid funds are larger than r · D b , the bank holds reserves R b = r · D b . The remaining surplus liquidity is hold in the form of cash (C b > 0) and a loan is offered to real sector agents at the amount of C 1+r . If F b < r · D b holds, the bank, first, transfers all liquid funds into reserves. Second, it withdraws a loan that has been granted to a HH earlier. Practically this is done by sending a withdraw credit signal to one of the HHs that b has a claim on and that is currently in mode 0. In reality, banks can not withdraw all loans completely at any time. E.g. because the borrower has bought real assets (like machinery or buildings) and is not able to provide money immediately. To account for this fact, we assume that a BA can only withdraw one credit at a time and that it always picks the spatially most distant HH. Therefore we assure that withdrawing credits takes time (because the HH has to $ Loan for HH in mode 3

Withdraw-Signal
Offer-Signal Figure 2: Simplified decision structure and interaction of households and banks walk his way to the BA first) and is limited in size. For simplicity we also assume that BAs are not punished by the CB if they are unable to supply the minimum reserve requirement.
The 3 modes we have introduced for the HHs above do not yet allow to take and repay a loan. We therefore have to add 3 additional modes to close the credit circle.
• HH mode 3: Pick up a loan from b L,h .
• HH mode 4: Use loan to buy a good from another HH.
If BA b offers a loan, one HH of those that are in mode 0 and for whom b L,h = b holds, gets informed about the loan offer and enters mode 3. This HH then moves to b L,h and picks up a loan. Similar to the withdrawing of a credit we assume that it is offered only to one HH at the same time and always to the one with the highest distance to b. The amount of that loan (∆L h ) is randomly determined between the supply C b 1+r and a small lower bound 15 . After taking a loan, the HH h uses the new liquidity to purchase a good (mode 4). He randomly walks around the landscape until he meets some other HH (sayh) who is in mode 0. h buys a good fromh and pays with cash. This transaction is accounted for in the balance sheet of h as a decrease of cash by ∆L h and an increase of cash in the sheet ofh. We are interested in the production and consumption of goods only insofar as it provides a motivation for taking a credit. We therefore assume thath produces the good directly before the transaction takes place and h consumes it directly thereafter. One can think of this as a service (e.g. hair cut). This simplification allows us to neglect the real sector and to keep the flow of goods out of the balance sheets. It seems odd at first that HHs take loans to buy goods although they still have money left. Households, however, also represent the firm side of the real sector and with this behavioral assumption we account for firms' leveraging. 16 If a HH receives a withdraw credit signal, he enters mode 5 and directly walks to BA b L,h . Once reached, he transfers cash to the BA until the loan is repaid or until he has no liquid funds left.

The Endogenous Creation of Money
In this section we are going to analyze how private individuals endogenously create money. We initialize our population as described above with all balance sheet positions set to zero. The parametrization is given by H = 60, B = 9, q = 0.15 and r = 0.04. As the initial impulse to the system we simulate a helicopter drop, i.e. the CB creates 10 units of cash and leaves it to the HHs. For simplicity we assume that it is completely given to one randomly determined HH. This simplification allows us to focus on one individual agent at the beginning of the simulation since all others remain in mode 0. In later simulations, the helicopter money is distributed among all HHs. Sheet 4 and 5 illustrate two individual balance sheets immediately after the helicopter drop. The cash entry of one HH h is increased by 10 which also increases h's equity by 10. In the CBs balance sheet the currency position is increased by 10 which induces a fall in equity by 10. 17 Figure 3 illustrates part of the landscape. Each agent in the figure has a subscript showing his two most important assets. These are C h /D h for HHs and C b /R b for BAs.
In t = 1 all agents are in mode 0 except for h. Obviously, h's share of cash is too large compared to (1). He therefore enters mode 2 and walks in the direction of BA b D,h to place deposits there. 18 15 Technically, this lower bound Lmin = min 0.01, C b 1+r is required to assure convergence towards a steady state. When a BA reduces its surplus liquidity, its offered loan contracts are also decreasing. The lower bound assures that a falling C b does not generate loan contracts that are also converging against zero. 16 To gain further insight into the rationale of borrowing from a management science perspective, see Jensen (1986), Harris and Raviv (1990) or Stulz (1990).  Sheet 7: Bank b (t = 300) The creation of money through lending is obvious from sheets 4 -7. While in t = 1 there are 10 units of money among the private agents (the cash of HH h), there are 18.5 units in t = 300 (1.3+8.7=10 for HH h plus 8.35 units of cash for BA b).
We have now described one transaction in full detail. After this one, there are of course millions of other transactions following. While the computer program explicitly models all these transactions in full detail, we can step back and focus our attention on the emergence of aggregate properties.
used to buy goods (e.g. Pigou effect) but financial securities (here: deposits).
First of all we look at the endogenous generation of a network of claims. Figure 5(a) illustrates BAs as black points and HHs as white circles. The first transaction in t = 300 between h and b has created a claim of h on the cash of b. We illustrate this claim as a link from h to b. Since the other agents did not take/grant a credit yet, they are not connected. A second connection will be produced as soon as b uses the excess cash to grant a loan to another household (e.g.h), a link from b toh is created. As time goes by, more and more individual transactions are carried out. BAs grant more and more loans to HHs while HHs increase their possession of deposits. By performing these transactions, the agents endogenously weave a network of claims on each other. At the same time these transactions endogenously produce money. Figure 6 shows the development of the monetary aggregates over time. BAs transform the monetary base from cash into reserves (left panel). At the same time HHs transform cash into deposits and thus allow banks to grant credits. The additional credits strongly increase M 1 (right panel). The process continues until (1) is fulfilled for every HH and (2) for every BA. Such a state results -up to a numerical precision of three digits -around t = 20 000. The monetary aggregates in this situation are given by M 1 ≈ 60.53 and L ≈ 50.53. The market is characterized by a highly entangled network of credit claims ( figure 5(b)). In this state, every HH is connected to two BAs (b D,h and b L,h ).

Equilibrium Benchmark
From macroeconomics textbooks 19 we know that the monetary multiplier µ 1 and µ L that determine the aggregate amount of M 1 and L in equilibrium are given by and For our parametrization we get µ 1 = 6.053 and µ L = 5.053. Since the monetary base in our simulation is given by M B = 10, the equilibrium values of M 1 and L are given by M 1 = 60.53 and L = 50.53.
We did not assume for our model that the market is characterized by a permanent equilibrium. In the long run, however, it converges against the theoretical equilibrium values M 1 and L . Our model is therefore a generalization of the simple equilibrium multiplier because it does not rely on an equilibrium assumption. Instead it shows that the equilibrium can be reached endogenously by individual transactions in disequilibrium. The model also illustrates that, by assuming equilibrium, one ignores that the creation of money takes time. Further we enrich the baseline approach because we keep track of all agents stock as well as the claims that they imply. This property will become essential in the next section. Now that we have demonstrated the creation of money as a product of interaction between HHs 19 e.g. Mankiw (2007), chapter 18. 14 and BAs we can introduce the next dimension of credit markets: Interbank lending.

The Interbank Market
To introduce an interbank market for credits we augment BAs mode 1 and mode 2. If a BA enters mode 1 it does not only offer a credit to HHs but also to other BAs. On the other hand, if a BA enters mode 2 it first tries to bridge the shortage in liquidity by taking a credit from another BA. If this is not possible, e.g. because no bank has currently a surplus of liquidity, it withdraws a credit from a HH. To account for interbank credits we have to extend the balance sheet of banks by I b + (interbank receivables) and I b − (interbank liabilities). An example is given in sheet 8.
A credit from one bank (say b) to another (b) is accounted for by a decrease of C b and an increase of Cb. At the same time a claim is created by increasing I b + and Ib − by the same amount. In contrast to credits from BAs to HHs we assume that credits between BAs can be carried out immediately and that they have a fixed repay date (t repay = t + x) in the near future. The maturity x is randomly determined between 1000 and 2000. 20 This assumption should account for the fact that interbank credits are typically granted quicker and over shorter time horizons than credits to the real sector. 21 The creation of money in the previous section followed a monotonic path, i.e. from the exogenous increase of cash until an equilibrium was reached, the aggregate M 1 was never decreasing. As a result, no HH and no BA has ever encountered a shortage of liquidity (HH mode 1 and BA mode 2). Interbank lending, however, depends on one BA with a surplus and another with a shortage of liquidity at the same time. In the following we extend HHs behavior in the real sector in order to generate such different endowment with liquidity for BAs.
First, we assume that HHs who are satisfied with their financial position (mode 0) do not simply stop their economic actions but interact with one another. To introduce such real market interaction between HHs we change the above definition of HHs mode 0 in the following way.
• Extended HH mode 0 (C h = q · D h ): Buy/sell goods. 20 Recall, HHs have to walk to their BA (which takes some time) before taking a credit. A fixed repay date is also not set. 21 Cocco et al. (2009), Demiralp et al. (2006. As before, a HH h for whom C h = q · D h holds enters mode 0 and takes a random walk around the landscape. Additionally he is now looking for transactions with other HHs. As soon as h encounters another HH (sayh) who is also in mode 0 one of the two HH is randomly determined to be the seller of a good and the other one to be the buyer. The price p is also randomly determined between 50% of the buyers cash and zero. C h is reduced by p while Ch is increased by the same amount. As before -for ease of exposition -we assume that the exchanged good does not enter the balance sheet.
This transaction causes one HH to enter mode 1 and the other to enter mode 2. The first will convert deposits into cash while the second will transfer cash into deposits. As a result, BA b D,h will end up with a shortage of liquidity and b D,h with a surplus. Of course, this (random) behavior is not particularly realistic. But since we are only interested in the impact of real sector transactions on the credit market this way of modeling is sufficient for our purpose because it serves as a means for interbank lending. 22 It is now theoretically possible that a BA is not able to fulfill its debt obligations if, for example, some HHs demand liquidity from it over a short period of time and no other BA has a surplus of liquidity to grant a credit. We therefore have to define how agents behave in such a case. For simplicity we assume that, as soon as a BA b is not able to fulfill an obligation, it becomes public knowledge that it is insolvent. All HHs who have deposits at it immediately withdraw as much as possible of them (bank run) and no other BA will grant further credits to it. At a randomly determined t during the next 2000 time steps, the insolvent BA is removed. All remaining balance sheet positions are depreciated and those HHs for whom b D,h = b holds will pick another solvent BA for placing their deposits. Now that the interbank market is introduced, we will perform some simulations of the extended model in the next section.

Endogenous Instability
To analyze the impact of interbank lending on the credit market we run a new simulation. Initially all agents' balance sheet positions are again set to zero. We introduce money by an exogenous helicopter drop 100 cash units that are equally distributed among HHs.
As in section 4, we find that money is endogenously created over time (see figure 7). But now, the economy does not smoothly approach an equilibrium and settle down there. Instead, when the market gets close to equilibrium (e.g. t = 20 000, ..., 32 000) we observe small erratic fluctuations (see zoom window) that emerge as a result of random trading. During such a period one often finds a BA that is in mode 1 and simultaneously another BA in mode 2. 23 Consequently there are a lot of interbank credits being granted during such times. Now that BAs lend to each other, they are also directly linked by credit relations (illustrated as black lines in figure 8). Interconnectedness of the network of claims will thus be higher.
Around t = 33 000 one BA becomes insolvent and has to leave the market. As a result the deposits of some HHs and the interbank credits of some BAs are destroyed which makes the money amount drop. This destruction of money leads to a shortage of liquidity which drives another bank into insolvency shortly after. Again money is destroyed which is illustrated as a second drop in the monetary aggregates about 500 periods later. Although BA failures are now possible, convergence to the close neighborhood of the benchmark equilibrium (3) and (5) is still assured as long as at least one BA is present. Only in the case of a complete breakdown (i.e. if no BA survives a bankruptcy cascade), the benchmark can not be reached anymore.

The Cause of Bankruptcies
To explain the chain of events that drives BAs into bankruptcy, we have to leave the macro level of aggregates and markets and enter the micro level of single agents and interactions. For illustration purpose we pick one BA (say b) at t = 20 000 and look at its balance sheet (sheet 9). At this point in time b has liquid funds equal to C b + R b = 3.01. As stated above, interbank credits have a fixed repay date. We can therefore create a liquidity forecast for b based on the current liquidity and its future change by due credits. Figure 9 shows such a forecast for the subsequent 2000 periods. For the current time step (k = 0) it starts at 3.01. For k = 1, ..., 2000 it decreases if b has to repay credits and increases if b receives credit repayments from other BAs. Since interbank credits on the assets and liabilities side are almost equal (   Bank b has a very robust financial position. When we pick another bank (sayb) at the same point in time we might find a very different picture. Sheet 10 and figure 10 illustrate the situation ofb. The liquidity forecast starts at Cb + Rb = 2.17. It follows a downward trend because the bank has taken much more credits from other BAs than it has granted (35.26 > 28.15). Around k = 600 the liquidity forecast falls below zero. In this situation,b will not be able to fulfill its debt obligations. Note however, that this insolvency is not a result of too low equity. The value of equity is zero from the beginning on since nothing is added or removed from it. It results simply because cash in-and outflows have become asynchronous.
Recall that the described situation is just a snapshot in t = 20 000. What will happen as time goes by? BAb will repay credits and its liquid funds will decrease. Therefore, it will enter mode 2 and try to get new liquidity (e.g. new credits from other BAs or withdraw loans from HHs). Ifb is successful (e.g. in raising new credits) until t = 20 600 it does not become insolvent but instead rolls it's debt position over. The process can continue andb can stay in the market. At some future point in time (t = 33 000) it might happen that, first, no other BA has the necessary surplus in liquidity and, second, the HHs who borrowed fromb are not able to repay as quick 25 asb needs cash.  Therefore,b is unable to roll over the debt position and becomes insolvent. Other agents withdraw as much credits and deposits fromb as possible which makes the endogenously produced money amount fall. Other BAs who are also in a weak financial position or who have lent tob and depend on repayment will also be in trouble now and eventually become insolvent. A bankruptcy cascade might follow. We can illustrate the spill over of this cascade by looking at two lenders ofb ( figure 11). Both have a robust financial position: The liquidity forecast of the first one is almost a horizontal line while that of the second has a slight upward trend (no depreciation case). Ifb becomes insolvent, it is not able to pay all of its credits back. Consequently, the two lenders will not receive all of the granted credits back. The depreciation line shows the same liquidity forecasts but with all credits tob depreciated, i.e. the development of liquid funds depending on current liquidity and the future credit flows if no credit tob is repaid. The insolvency ofb rotates liquidity forecasts downward. Both BAs will therefore also be financially less robust. They withdraw credits and grant less to other BAs which can drive further BAs into insolvency and so on.
In our simulation the crisis is spread by the non-performance of interbank debt. But the argument is general enough to be extended to any depreciation of bad debt. Regarding the current developments in southern Europe, for example, it is intuitively clear that a depreciation of bad government bonds has exactly the same effect on banks' liquidity position and can therefore also trigger a bankruptcy cascade among BAs.
We have identified instability as an emerging property of the aggregate that stems from asynchronous in-and outflows of liquidity created by individual transactions. The liquidity requirements of a failing BA, in turn, creates the risk of contagion. This result casts serious doubt on the value of general equilibrium modeling, since all interesting behavior is observed outside of equilibrium. The questions under what conditions a banking sector brakes down, or what the state can do to stop a bankruptcy cascade, for example, can not be answered if we restrict ourselves to equilibrium.
To evaluate the threat of systemic risk, we perform a Monte Carlo experiment with 2000 runs of the model. Results are shown in table 1. The start-column gives the probability that, conditional on the amount of interbank credits in a period t, a first bank will fail in the near future (i.e. until t + 800). The other columns give the conditional probability that, if a failure has been observed in t, a further bank will fail until t + 800. In other words, the start-column contains the relative frequency that a crisis starts and the other columns those that it spreads to a further BA.
First of all we find that the amount of interbank credits monotonically increases the probability to fail. This effect is obviously a result of a stronger entangled web of claims. If a BA has taken more credits from others, it becomes more likely that these credits can not be payed back. Or, vice versa, the more credits a BA has granted, the more assets it has to depreciate if its borrower fails. As a consequence, debt growth is a central factor that originates financial instability. 26 We also find that the probability to observe a bankruptcy is much higher if there have been bankruptcies before. E.g. assume the system is in a state where interbank credits are between 400 and 600. In this state, the probability that an initial BA will fail is 0.17. But if one BA has already failed before, this probability increases to 0.62. If two BAs have failed before, it increases to 0.73. We can therefore identify a clear contagion effect of bankruptcies. This effect, however, is nonmonotonic, i.e. probabilities are first increasing the more BAs have failed, but decreasing later. In the case of IB credits > 800 it even falls below the probability that a crisis is started. The economic rationale for this non-monotonicity is the following: As soon as the first BAs are removed from the market, there are some HHs who have withdrawn as much deposits as possible from those BAs and consequently hold their wealth in cash only. Those households will pick another solvent BA for depositing part of their cash. Thus they will provide further liquidity to the liquid BAs which will help to stabilize those. This behavior will bifurcate the economy. Money is withdrawn from the insolvent BAs and given to the solvent ones. The downside is that the latter will be in excess of liquidity but won't provide it to the former. The upside is, that such behavior protects the healthy BAs by reducing their probability to fail and thus helps to stop a cascade. 27 We can now analyze the effect of an interbank market on the emergence of systemic risk. We perform another Monte Carlo simulation with the interbank market turned off. Table 2 compares the probabilities to fail conditional on the existence of an interbank market. Firstly we find that the probability of a first bank to fail is very small in both scenarios. The banking sector is therefore very stable under normal conditions. With no interbank market the probability is only 0.04. If an interbank market exists it even decreases to 0.02. The existence of an interbank market therefore stabilizes the banking sector because of the improved possibilities for BAs to refinance.
Secondly we find that the probabilities of contagion are much higher if an interbank market exists (e.g. 0.78 0.14). The impact of an interbank market is therefore twofold. It stabilizes the banking sector under normal conditions but strongly increases systemic risk. 28 Interestingly, the probabilities of contagion do not become zero if the interbank market is turned off. Therefore, the interbank market amplifies but does not create systemic risk. If one BA becomes bankrupt, it starts withdrawing as much credits from HHs as possible. These HHs in turn withdraw deposits from other BAs. These other BAs might thus also be driven into liquidity problems and might ultimately become insolvent. Bankruptcy cascades can thus also be transmitted by HHs if BAs are not directly connected by an interbank market.
One strength of ACE modeling is that parameter heterogeneity can be directly introduced. We can therefore easily check whether our results are robust against assumption of parameter heterogeneity among agents. Instead of setting q = 0.15 for all HHs, we draw the individual q h from a uniform distribution with support [0.1, 0.2], i.e. q h ∼ U(0.1, 0.2). Since the minimum reserve requirement is equal for all BAs, we do not assume heterogeneity among the parameter r. Repeating the Monte Carlo exercise shows that the above results are stable against parameter heterogeneity (results are not shown).

An Aggregate Perspective
The strength of ACE modeling is that it allows for a completely disaggregated view on the economy. This advantage can be made clear if we ask ourselves how the previous simulation would look like if one does not have access to the individuals in the simulation but only to the aggregates. For example if we only have the sum of all individual HHs as the household sector that is "representing" all its constituting individuals and the sum of all BAs as the banking sector. Sheet 13: Central Bank Sheets 11, 12 and 13 show the situation of the above simulation at t = 20 000 from an accounting perspective. First of all the three balance sheets look qualitatively identical to the ones before. But there is an important difference in the balance sheet of the banking sector. Since every interbank credit appears on the assets side of one bank and the liabilities side of another, it cancels out in the aggregate (IL = ID = 0). Interbank lending therefore simply disappears on the aggregate level (sheet 12). This is also directly visible when looking at the cash forecast of the banking sector. Since all committed repayments of interbank loans induce a positive flow for one bank and a negative flow for another, they simply cancel out on the aggregate and the cash forecast becomes a horizontal line (figure 12). Since this horizontal line can impossibly intersect with the x-axis, we are blind to the event of insolvency following from a fall of liquid funds below zero. At the same time we are unable to picture the credit market as an endogenous network but only as the relation between two aggregate representatives in isolation ( figure 13). An event like agent A withdrawing credits from B which forces B to withdraw from C and so on (i.e. a bankruptcy cascade through the web 22 transmitted by the individual need for liquidity), is simply unimaginable. These considerations make clear why it is problematic to deal with aggregates directly, even if they are heterogenous or SFC. Financial instability is neither deducible from the behavior of a single individual in isolation nor from the aggregate of all (heterogenous) individuals. It follows only from a population of individuals and their interaction. It makes also clear why it is not sufficient to replace the rational representative agent by a non-rational one, 29 or to introduce heterogeneity among some kinds of agents (e.g. households), sum these agents up and confront the resulting sums of supply and demand with the other side of the market. For a deep understanding of the above phenomenon, it is inevitable to perform an individual and interaction based analysis.

Conclusion
We have developed a model of the credit and interbank market. The only two different kinds of agents it consists of are households and banks. Behavioral rules of these agents are very simple and closely follow those used in basically every introductory macroeconomics textbook. We have shown how money is produced in the banking sector (as a multiple of the monetary base) through individual interactions in a disequilibrium process. After some time the economy converges against an equilibrium which is known from standard theory. We have therefore demonstrated that an ACE model can generalize standard theory and yield much richer dynamics.
We have also shown that the creation of money is inevitably producing instability. When applying a perspective that is strictly individual based and SFC it is impossible to make sense of endogenous money without a web of claims between agents. This web, however, produces the threat of systemic risk. Instability is therefore systematically produced in monetary economies and can not be put aside as an exogenous shock or a friction. The DSGE literature reduces all dynamics to the response to exogenous shocks. This is also the case for crises. In such models a crises is, at best, triggered exogenously and amplified by an (maybe asymmetric) accelerator. 30 The model developed in this paper has a number of advantages over standard theory: (1) The model is not restricted to equilibrium. Instead it is generally described by a disequilibrium process that still contains equilibrium results as a limiting case.
(2) The model is truly microfounded because it depends on micro assumptions only. 31 All aggregates like the credit market and its properties, e.g. (dis)equilibrium and instability, follow from these micro assumptions only. Mainstream economics in contrast ignores that a market is already an aggregate concept and should as thus also be microfounded. Instead it calls a model microfounded if it still depends on market assumptions. To make clear that our ACE model allows for deeper microfoundation than mainstream theory, one might also call it microscopically founded. 32 (3) Time plays an active and important role because (instead of just dating quantities in permanent equilibrium) it facilitates the self-organization process of agents towards equilibrium which is unimaginable without the lapse of time. (4) The individual does not rely on rationality assumptions. Nonetheless the aggregate of all agents together (the market) is capable of reaching an efficient state (equilibrium). 33 (5) We do not rule out crisis by definition. Instead we show that financial instability and severe crisis are an intrinsic and endogenously occurring property of our financial system. (6) Our model is also stock-flow consistent. A difference to "standard" SFC models is that we computed the balance-sheets for every single agent (microscopic level) instead of only consolidated balance sheets for every type of agent (aggregate level). Therefore we can dispense with the usual (consolidated) matrix notation.
In this paper we had to abstract from reality in some respect: Interest rates are set to zero, banks have no equity and the agents' behavior is mechanical and unstrategic. In future research, of course, these restrictions have to be relaxed. The model can also be used to answer policy relevant questions if the CB is ascribed a more active role: The impact of standing facilities, reserveor equity requirements on economic stability can be analyzed, for example, questions with are highly interesting for policy makers after the successive implementation of Basel III. One could also introduce an asset market (e.g. housing). If the price for such assets would rise, HHs would be wealthier and consequently be able to increase borrowing. In this context, one could analyze the effect of an asset market collapses and the optimal CB response in this context. 34 30 Consult Corsetti et al. (2012) for a recent example. 31 In contrast to the standard notion of microfoundation, our behavioral assumptions are not derived from utility-or profit maximization. They are, however, no more ad hoc than assuming that agents can be described by the maximization of a utility function with certain convexity properties. 32 This name also suggests itself because agent based (or individual based) simulations are sometimes also called microscopic simulations. 33 This point is nicely in line with the Austrian school, e.g. Mises (1920) and Hayek (1945). 34 Keen (2011)