Debt , deleveraging and business cycles : An agent-based perspective

The recent financial crises pointed out the central role of public and private debt in modern economies. However, even if debt is a recurring topic in discussions about the current economic situation, economic modeling does not take into account debt as one of the crucial determinants of economic dynamics. The authors’ contribution, in this paper, is to investigate the issues of borrowing and debt load by means of computational experiments, performed in the environment of the agent-based Eurace simulator. The authors aim to shed some light on the relation between debt and main economic indicators. Their results clearly confirm that the amount of credit in the economy is a very important variable, which can affect economic performance in a twofold way: fostering growth or pushing the economy into recession or crisis. The outcomes of their computational experiments show a rich scenario of interactions between real and financial variables in the economy, and therefore represent a truly innovative tool for the study of economics. Special Issue New Approaches in Quantitative Modeling of Financial Markets JEL E2, E3, E44, E51


Introduction
The great financial crisis of the years 2007-2009 was triggered by increasing delinquencies in the US subprime mortgage market but soon, through the channels of derivative instruments and asset-backed securities, propagated worldwide to the banking sector. A significant number of banks were bailed out by taxpayer money and, in the Fall 2008, the interbank market nearly came to a halt. The collapse of confidence in the credit market had severe effects in the real economy, which suffered the first worldwide recession since the 1930s.
The great financial crisis was indeed preceded by a global credit bubble enabled by the globalization of banking and a period of unusually low interest rates and risk spreads; data show that since 2000 the combined public and private debt grew rapidly in most mature economies, see McKinsey Global Institute (2010). Advanced economies are now in a deleveraging phase where both private and public sectors are trying to reduce their debt levels. In particular, households are repairing their balance sheets after years of credit-funded consumption expenditures and mortgage-financed real estate boom. Governments are adopting tight fiscal policies to reduce the debt burden, accumulated during the crisis because of banks' bailout and lower tax revenues. Historical data analysis shows that a major financial crisis is nearly always followed by long period of deleveraging and that historically deleveraging episodes exert a significant drag on GDP growth, see McKinsey Global Institute (2010).
It can then be argued that the boom-bust credit cycle of the 2000s has played a significant role in the developments of the great financial crisis (Keen (2009)) and that is still playing a central role in shaping the future prospects of developed economies, which are now on the track of a slow but uncertain recovery. Despite this, and despite the prominence of debt in discussion about current economic difficulties, perhaps surprisingly, it is quite common to abstract from debt in most mainstream economic modelling, as for the dynamic stochastic general equilibrium (DSGE) models (see De Grauwe (2010)) currently adopted by major central bank and policy makers.
A recent pioneering attempt to include debt in a DSGE framework has been done by Eggertsson and Krugman (2010). Indeed, the focus on debt and generally on credit and its influence on economic activity is not new, and one of the first most notable example is actually the debt-deflation theory of the great depression by Fisher (1933). In the post WWII mainstream economics, however, the insights by Fisher were not taken into account and only the concept of insufficient aggregate demand was incorporated in the so-called neo-classical synthesis of the 50s and 60s (Patinkin (1965)). Later on, the rational expectation revolution (Lucas (1972)) and the real business cycle theory (Kydland and Prescott (1982)) of the 70s and the 80s, by taking to the extreme the Walrasian paradigm of money neutrality, even neglected the relevance of monetary variables in the economy and therefore the importance of credit. Years before, the monetary theory by Friedman and Schwartz (1963) was in this respect a notable exception by linking monetary aggregates with business cycles, even if no consideration about credit was present.
On the other hand, among the so-called post-keynesian, credit and money were regarded as central in the functioning of the economy. The most prominent scholar in this respect was Hyman Minsky which proposed theories explaining endogenous speculative investment bubbles as prosperous phases of the economy when corporate cash flow rises beyond what is needed to pay off debt and speculative euphoria develops, but soon thereafter debts exceed what borrowers can pay off from their incoming revenues, which in turn produces a financial crisis (Minsky (1986)). As a result of such speculative borrowing bubbles, banks and lenders tighten credit availability, even to companies that can afford loans, and the economy subsequently contracts. Beside the Minsky's pioneering work, it is worth citing the endogenous credit-money approach of the post-Keynesian tradition (Fontana (2003); Arestis and Sawyer (2006); Kriesler and Lavoie (2007)). Contrary to the neoclassical synthesis that considers money as an exogenous variable controlled by the central bank through its provision of required reserves, to which a deposit multiplier is applied to determine the quantity of privately-supplied bank deposits, the essence of endogenous money theory is that in modern economies money is an intrinsically worthless token of value whose stock is determined by the demand of bank credit by the production or commercial sectors and can therefore expand and contract regardless of government policy. Money is then essentially credit-money originated by loans which are created from nothing as long as the borrower is credit-worthy and some institutional constraints, such as the Basel II capital adequacy ratios, are not violated. As the demand for loans by the private sector increases, banks normally make more loans and create more banking deposits, without worrying about the quantity of reserves on hand, and the central bank usually accommodates the demand of reserves at the short term interest rate, which is the only variable that the monetary authorities can control. In this study, we fully endorse and follow the endogenous credit-money approach.
More recently, the experience of the 1997 Asian financial crisis and of the Japan lost decade has attracted the interest of a number of scholars towards the problem of debt, balance sheets distress, and deleveraging (Krugman (1999); Kiyotaki and Moore (2002); Werner (2005); Koo (2008)). In particular, Koo (2008) has argued that both Japan's lost decade and the Great Depression were essentially caused by balance-sheet distress, with large part of the economy unable to spend due to excessive debt.
Finally, in the last few years, the experience of the great financial crisis has made an increasing number of economists aware about the importance of debt and leverage, and a number of studies has therefore appeared, yet far to be general purpose macroeconomic models, see e.g. Geanakoplos (2010); Adrian and Shin (2010). The purpose of this paper is to study the problem of debt, leverage and deleveraging by means of Eurace, a large-scale agent-based model and simulator of the economy. Eurace represents a fully integrated macroeconomy consisting of three economic spheres: the real sphere (consumption goods, investment goods, and labour markets), the financial sphere (credit and financial markets), and the public sector (Government and Central Bank). Following the agent-based approach (Tesfatsion and Judd (2006)), Eurace economic agents are characterized by bounded rationality and adaptive behavior as well as pairwise interactions in decentralized markets. The balance-sheet approach and the practice of stock flow consistency checks are followed as model development paradigm, see Cincotti et al. (2010); Teglio et al. (2010bTeglio et al. ( ,a, 2011Teglio et al. ( , 2001 for early accounts. We argue that the agent-based approach is better suited to deal with a realistic view of the economy, and is able to take into account the complex pattern of interactions in the credit markets, like networks topologies, credit rationing, bankruptcy waves and information cascade effects, which are very important issues the causes and the unfolding of debt-induced recessions. Furthermore, despite the attempts in the new so-called Keynesian literature Gertler (1990, 1995); Greenwald and Stiglitz (1993); Kiyotaki and Moore (1997); Eggertsson and Krugman (2010)) to incorporate debt and financial factors, the investment-finance linkage is still considered as a propagator mechanism of shocks which are exogenous with respect to the economy. On the contrary, the agent-based approach is able to emphasize the role of the investment-finance link not just as a propagator of exogenous shocks but as the main source of financial instability and business cycles, in line with the Minsky's financial instability hypothesis (Minsky (1986);Fazzari et al. (2008)).
A number of agent-based macroeconomic models have been developed in the last few years with the aim to focus on credit and financial factors as key driver of the business cycle, see e.g. Delli Gatti et al. (2005Gatti et al. ( , 2009); Raberto et al. (2008a); Chiarella and Di Guilmi (2011), but they still don't offer a complete understanding of the economy as a set of interrelated markets, i.e. credit, financial, labor, consumption and capital goods. Conversely, the Eurace model is grounded on a complete integration of all these interrelated markets, and therefore represents a truly innovative tool for the study of economics.
The paper is organized as follows. In section 1 a description of the main features of the model is given. The following sections focus on the Eurace model detail. In particular, section 2 describes the production sector of Eurace, section 3 presents the households, and section 4 the banking sector. The government and the central bank are described in sections 5 and 6, respectively. Results are presented and analyzed in section 7.

A general overview of the Eurace model
Eurace is a macroeconomic model and simulator which is under development since 2006 when the project started within a EU-funded research grant under the sixth framework programme. The aim of Eurace is the design and implementation of an agent-based macroeconomic simulation platform able to integrate different sectors and markets, in particular, goods markets, labor markets, financial markets and credit markets. The Eurace project proposes an innovative approach to macroeconomic modelling and economic policy design according to the new field of agent-based computational economics Tesfatsion and Judd (2006). The simulator and the economic model have been constantly evolving since the start of the Eurace project in 2006. The Eurace model and simulator is a fully-specified agent-based model of a complete economy. Eurace is dynamically complete, that is, it specifies all real and financial stocks and flows and allows to aggregate upward from the microspecifications to the macroeconomic variables of interest. In the modelling of agent decision processes, Eurace follows the usual and realistic assumptions of agent-based economics about bounded rationality, limited information gathering and storage capacities, and limited computational capabilities of the economic agents. These assumptions lead us to use simple heuristics to model the agents' behaviour, derived from the management literature for firms, and from experimental and behavioural economics for consumers/investors. We also make use of experimental evidence from the psychological literature on decision making. The rules used by the agents are simple but not necessarily fixed. Their parameters can be subject to learning, and thus adapted to a changing economic environment. Here we can make a distinction between adaptive agents and learning agents: the first use simple stimulus-response behaviour to only adapt their response to their environment, while the last use a conscious effort to learn about the underlying structure of their environment. The modelling of the market protocols is empirically inspired by real-world markets. The consumption goods market is decentralized and characterized by one-to-one interactions between firms and consumes. This is a simple form to model localized markets with potential rationing on both sides. Households go shopping on a weekly basis. In particular, market protocols capture important market frictions based on problems of search, matching and expectation formation in turbulent environments that are present in real world labour and goods markets. The labour market functions by way of a local search-and-matching protocol that likewise resembles a real world job search by unemployed workers. For the artificial financial market we model a real-world market protocol: the clearinghouse. Government bonds are usually sold by auction. For the credit market we use a firm-bank network interaction mechanism. This reflects how real-world firms appear to manage their credit lines as comes out from the empirical data that have been examined concerning firm-bank network interactions. In the Eurace model, a double-entry balance sheet with a detailed account of all monetary and real assets as well as monetary liabilities is defined for each agent. Monetary and real flows, given by agents' behaviors and interactions, e.g. market transactions, determine the period by period balance sheet dynamics. Stock-flow consistency checks have then been done at the aggregate level to verify that all monetary and real flows are accounted for, and that all changes to stock variables are consistent with these flows. This provides us with a solid and economically well-founded methodology to test the consistency of the model. The choice of time scales for the agents' decision making has been made in order to reflect the real time scales in economic activities. The agents' financial decisions are made on a shorter time scale (day) than the economic decision making, e.g., consumption and production, where the proper time horizon can be a week, a month, or a quarter. In reality, most human decision-making and interaction is asynchronous, due to the autonomous decisions of the agents. We model this asynchronous decision making by letting agents have different activation days. This means that on a single market different agents are active on different days. Thus, who interacts with whom changes from day to day. Some activities, however, are synchronized. This is in particular the case when they are institutionally initiated as, for instance, yearly tax payments, or monthly wage payments. We use synchronous decision making/interactions whenever it reflects the reality. One of the main goals of EURACE is to analyze how far qualitative properties of the phenomena arising in economies with interacting heterogeneous agents change as the number of involved agents goes up. A research topic that has been to a large extent ignored in previous work in agent-based computational economics. Based on this goal, the implementation of the Eurace platform is designed to be scalable to a large number of agents. The Eurace model has been implemented in FLAME 1 (Flexible Large-scale Agentbased Modelling Environment). The FLAME framework is specifically designed to provide a formal and very flexible approach to agent-based modelling and enables the creation of agent-based models that can be run on high performance computers. The framework is based on the logical communicating extended finite state machine theory (Xmachine) which gives the agents more power to enable writing of complex models for large complex systems. The agents are modelled as communicating X-machines allowing them to communicate through messages being sent to each other as per designed by the modeller. This information is automatically read by the FLAME framework and generates a simulation program which enables these models to be parallelized efficiently over parallel computers.
2 The production sector 2.1 General features Two types of producers are considered in the Eurace model: capital goods producers and consumption goods producers. Capital goods producers employ energy and raw materials to produce capital goods following a job production process. Consumption goods producers use capital goods and labor to produce homogenous consumption goods that will be sold to households. Contrary to consumption goods producers, capital goods producers do not have production inventories as well as financing needs because of the job production process and the variable production factors employed. Capital goods producers can be represented as stylized agents with both real and financial inputs and output. Conversely, consumption goods produces are much more complex agents characterized by both flows and stocks (e.g., inventories, physical capital, etc...) and will be described in details in the following.

Consumption goods producer (firms)
Consumption goods producer, henceforth firms, are the bulk of the production sector in the Eurace model. They employ labor and capital goods to produce consumption goods by means of a Cobb-Douglas technology. Quantity and price decisions are based on standard inventory planning and mark-up pricing rules. Firms ask loans to the banking system in order to finance their production plans and to fulfill their payments commitments, i.e., taxes, dividends, interests, and loan repayments. If rationed in the credit market, firms issue new shares to raise the required money in the equity market. Production, investment and financing decisions are taken, processed and completed by firms once a month at their assigned activation day. Activations days are different and specific to any firm. Table 1 presents the typical balance sheet of a firm f at a given business day. Liquidity M f and inventories I f are updated daily following firms' cash flows and sales, while physical capital K f is updated once a month following capital accumulation due to investments and capital depreciation. Debt D f is also computed once a month (at the same day of capital, i.e., at the activation day) following the outcomes in the credit market, i.e., borrowing of new loans and repayment of old loans. Equity E f is also updated once a month at the activation day as residual according to the usual accounting rule: where p C is the monthly consumption goods price index and p K is the price of capital goods, both referred to the calendar month. A business month is defined by

Assets
Liabilities M f : liquidity deposited at a given bank D f = ∑ l λ f ,i : total debt I f : inventories (sum of outstanding loans) K f : physical capital E f : equity Table 1: Balance sheet snapshot of firm f . a set of n business days, henceforth simply days, and any activation day sets the starts of a business month which is specific for any firm and does not correspond to calendar months, which have an equal duration of n days but start at days 1, n +1, 2n +1, etc....

Production, investments and financing
Let us consider that firm f has made its production plan decision at the activation day which sets the beginning of business month τ. Suppose that firm's f production plan 2 consists in producing a quantity q is a monthly interest bill and this explains the division by 12. The sum of debt installments is given by ρ ∑ i λ f ,i τ−1 where ρ is the constant fraction of loans to be repayed at any month. The tax bill is a constant fraction ξ of previous month gross earnings (or gross profits) In particular, the firm decides the planned per-share dividend d τ of firm f at month τ are therefore given by summing all scheduled financial payments, the foreseen production and investment costs referred to the production planned for month τ. Costs include the foreseen labor costs, i.e., w τ N f τ , whereN f τ is the labor demand, and investments costs p k τÎ f τ . It is worth noting that effective costs may be lower than the foreseen ones, because N f τ ≤ N f τ due to possible rationing of firm f in the labor market and thus its inability to hire all the planned employees. On the contrary, given that we stipulate a job production for capital goods producers, effective investmentsÎ f τ should be expected to be always equal to planned ones, unless the firm f is unable to collect the necessary liquidity needs L f τ . The foreseen liquidity needs are then given by: Finally, it is worth noting that the interest bill, taxes and loans repayments are determined out of the firm control, while dividends, labor and investments costs, can be scaled down in the case the firm is unable to raise the necessary monetary resources in the credit market or in the stock market. Details on the firms' decision process about production, pricing, factor demand, and financing will be given in the next paragraphs.

Production and price decision
Each firm keeps a stock of its unsold production as inventories I f . Once every business month, during its activation day, the firm checks if its stock needs to be refilled. According to the approach of using standard managerial methods wherever it is applicable, a standard inventory rule for managing the stock holding is employed. Let us suppose that at activation day t, which sets the start of business month τ, firm f has an inventories stock I f t and expects a demand Q f τ for the business month τ. Standard results from inventory theory suggest that the firm should choose to produce a quantity q f τ for month τ given by: Expected demand Q f τ is estimated using a linear regression based on previous sales. To avoid excessive oscillations from one month to the other of the planned production quantity, q f τ is smoothed according to the following rule: where q f k is the quantity produced in the previous T months. On this account, the consumption goods producer shows some inertia in adapting the actual production quantity to the desired quantity. As discussed in more detail below, the realized production volume q f τ can deviate from the planned output q f τ due to rationing on the factor markets.
Production times of consumption goods are not explicitly taken into account and the produced quantities are delivered on the same day when production takes place. The local stock level is therefore updated accordingly.
Consumption good producers employ a standard mark-up pricing rule in setting prices. In particular, the new sale price p f τ at month τ is set considering a fixed markup µ on unit costs c f τ as follows: where units costs c f τ are calculated as a weighted average of the unit costsc f τ related to realized production q f τ and the unit costs c f τ−1 related to previous periods production which is still unsold and stocked in the inventories Present production unit costsc

Factors demand
The production technology in the consumption goods sector is represented by a Cobb-Douglas type production function with complementarities between the quality of the investment good and the specific skills of employees for using that type of technology. See Dawid et al. (2008Dawid et al. ( , 2009) for details about this approach. Every worker v has a level of general skills b v ∈ {1, ..., b max } and a level of specific skillsb v t . The specific skills of worker v indicate how efficiently the corresponding technology is exploited by the individual worker. Building up those specific skills depends on collecting experience by using the technology in the production process. The shape of the evolution of productivity follows a concave curve, the so-called learning curve, when the organizational productivity is recorded after implementing a new production method or introducing a new good. Concavity in this context means that the productivity rises with proceeding use of the production method or production of the new good, but this increase emerges at a decreasing rate. We transfer this pattern of organizational learning on the individual level and assume that the development of individual productivity follows a learning curve. The specific skills are updated once in each production cycle of one month. Further, we assume that updating takes place at the end of the cycle.
A crucial assumption is the positive relationship between the general skills b v of a worker and his ability to utilize his experiences. Building up worker's technology specific skills depends on a worker's level of general skills, i.e. his education and the other general abilities which are not directly linked to the particular technology. Taking the relevance of the general skill level into account the specific skills of a worker v for technology j is assumed to evolve according tō where we denote with A f τ−1 the average quality of the capital stock of firm f where worker v is employed. The function χ is increasing in the general skill level of the worker. Note that this formulation captures the fact that in the absence of technology improvements marginal learning curve effects per time unit decrease as experience is accumulated and the specific skills of the worker approaches the current technological frontier.
Factor productivity is determined by the minimum of the average quality of physical capital and the average level of relevant specific skills of the workers. Capital and labor input is substitutable with a constant elasticity and we assume constant returns to scale. Accordingly, output for a consumption goods producer is given by where B f τ denotes the average specific skill level in firms and α + β = 1. Given the planned production quantity q f τ set according to Eq. 5 and the available technology set by Eq. 10, firms have to decide the desired amount of both capital K f τ and labor N f τ to fulfill their production plans. The choice is made according to the standard rule of cost minimization given a production goal. The solution is the labor and capital amounts at which the marginal rate of substitution between the two factors equates the ratio of their costs, i.e., where w f τ is the average wage currently paid by the firm to its employees and c f K,τ is the average cost of capital computed as the sum of the present average monthly loan rater f τ for the firm with the monthly depreciation rate ξ , all multiplied by the the present unit cost of capital p It is worth noting thatr f τ is computed as a weighted average of firm f loan rate, where the weights are given by the amount of every loan.
Taking into account the planned production quantity q f τ , Eq. 11 in conjunction with the production function defined by Eq. 10, where α + β = 1, yields the desired demands for capital and labor: If the desired capital amount is lower than the available capital, considering available at month τ should be used, because its cost is always paid. The desired amount of labor should be recomputed considering the present capital endowment by using Eq. 11. Finally, given the supposed technological constraint, a maximum increase of physical capital κ is foreseen The monthly realized operating profit of a consumption goods producer is the difference of sales revenues during the previous period and production costs given by the wage bill, the interest bill and the cost of capital depreciation. Wages for the full month are paid to all workers at the day when the firm updates its labor force. Investment goods are paid at the day when they are delivered.

Financing
According to the pecking-order theory (Myers and Majluf, 1984), any firm f meets its liquidity needs first by using its internal liquid resources P f τ , i.e., the cash account deposited at a given bank; then, if P f τ < L f τ , the firm asks for a loan of amount λ f τ = L f τ − P f τ to the banking system in order to be able to cover entirely its foreseen payments. Credit linkages between firm f and any bank b are defined by a connectivity matrix which is randomly created whenever a firm enters the credit market in search for funding. In order to take search costs as well as incomplete information into account, each firm links with a limited number of banks, which are chosen in a random way.
Firms have to reveal to the linked banks information about their current equity and debt levels, along with the amount of the loan requested λ Then the firm f agrees to get the loan from the bank applying the lowest interest rate. On banks' hand, they receive demands by firms sequentially and deal with them in a "first come, first served" basis. As explained with more detail in the following section, the firm can be credit rationed. If a firm can not obtain a sufficient amount of credit from the bank that is offering the best interest rate, the firm will ask credit to the bank offering the second best interest rate, until the last connected bank of the list is reached. It is worth noting that, although the individual firm asks loans to the bank with the lowest lending rate, the total demand for loans does not depend directly on the interest rates of loans.
When firm f receives a loan from bank b, its cash account P f τ is increased by the corresponding amount b, f τ . If the firm is not able to collect the needed credit amount, i.e., if P f τ is still lower than L f τ , the firm has still the possibility to issue new equity shares and sell them on the stock market. If the new shares are not sold out, the firm enters a state called financial crisis. When a firm is in financial crisis, we mainly distinguish two cases: if the firm's available internal liquidity is still sufficient to meet its committed financial payments, i.e., taxes, the debt instalment and interests on debt, then these financial payments are executed and the dividend payout and the production schedule are rearranged to take into account the reduced available liquidity; otherwise, if the firm is unable to pay its financial commitments, it goes into bankruptcy.
The model designs two types of bankruptcies, called insolvency and illiquidity bankruptcies. The first type is when firm's equity goes negative. The second type is when the firm is unable to pay its financial commitments but still owns a positive

Assets
Liabilities M h : liquidity deposited at a given bank n h g : government bonds holdings (none) n h f , n h b : equity shares holdings of firm f and bank b equity. The significative difference between the two types of bankruptcies is the following: in case of insolvency bankruptcy, firm's debt is restructured according to a new target level of debt that has to be a fraction of firm's total assets. The exceeding part of the debt is written-off. When a firm goes into bankruptcy, it fires all its employees, stopping production for a period τ f B . During this period, the firm tries to rise new capital in the financial market in order to increase its liquidity.

Investment goods producers (IG firms)
There exists a single type of technology for investment goods. The investment good is offered with infinite supply by investment goods producers which produce on job and have no inventories and financing needs. Energy and raw materials are the only factor of production and are assumed to be imported from abroad. The price of energy and raw materials is exogenously given. The price of capital goods p K is a mark-up on energy prices. Profits of investment good producer are distributed in equal shares among all households. Put differently, it is assumed that all households own equal shares of capital goods producers and that shares are not traded in the market. Therefore, the amount payed by consumption goods producers for investment goods is partially (the part related to mark-up) channeled back into the economy, while the part related to energy costs leaves the Eurace economy.

Households
Households are simultaneously taking the roles of workers, consumers and financial market traders. Households' total monthly income is made by both labor and capital income. Gross labor income is given by the monthly money wage w τ , payed by the employer, or by an unemployment benefit received from the Government. The unemployment benefit is set at a fixed percentage η of the last salary received. Households receive gross capital income from the equity shares and government bonds held in their financial portfolio. Capital income is given by dividends payed by firms on a monthly basis and by monthly government bonds coupons. Households pay taxes on both labor and capital income. Labor and capital income taxes are a fixed percentages, ξ H w and ξ H K , respectively, of the gross income. Households financial wealth is given by their assets portfolio and by the liquidity deposited at a give bank. We stipulate that households have no liabilities. Table 2 presents the typical balance sheet of an household.
Once households receive their labor income or unemployment benefit, at the activation day of the firm where they are employed, they set the consumption budget for the entire duration of the month. Saving-consumption decision is modelled according to the theory of buffer-stock saving behaviour (Carroll, 2001;Deaton, 1992), which states that households consumption depends on a precautionary saving motive, determined by a target level of wealth to income ratio. Consider household h receiving a gross money wage w τ at a particular day. Consider the total net income of the household y h τ which includes the after tax money wage as well as the net capital income earned during the previous month. Consider also the financial wealth W h τ of household h at month τ which includes its assets portfolio, valued at the most recent market prices, as well as liquidity. Following the buffer stock theory of consumption, the household sets the budget for consumption c h τ in the following month as: whereȳ h is the average total net income of household h in the last ν months and x is the target wealth to income ratio. The rationale of the rule is that if, for instance, the present wealth to average income ratio is higher then the target one, i.e., W h τ /ȳ h > x, then the household spends more then his or her income in order reach the target value. The parameter φ H sets the adjustment speed.
Households can either invest their savings in the asset market, by trading stocks or bonds, or can put them in a saving account that pays a fixed, risk-free interest rate. The financial market operates on a daily basis and is characterized by a clearing house mechanism for price formation which is based on the matching of the demand and supply curves. Households portfolio allocation is modeled according to a preference structure designed to take into account the psychological findings emerged in the framework of behavioral finance and in particular of prospect theory (Kahneman and Tversky, 1979;Tversky and Kahneman, 1992). In particular, a key prospect theory insight, i.e., the myopic loss aversion, is considered. Myopic loss aversion depends on the limited foresight capabilities characterizing humans when forming beliefs about financial returns (Benartzi and Thaler, 1995). Further details about the belief formation and the preference structure are provided in Raberto et al. (2008b); Teglio et al. (2009).
Once the monthly consumption budget c h τ has been determined, household h samples on a weekly basis the prices of different consumption goods producers and then decides which goods to buy. We assume that the decision is random and that follows a probability distribution given by a logit model. This approach is standard in the marketing literature where logit models are intended to represent the stochastic influence of factors not explicitly taken into account. Denote by F h the set of consumption goods producers whose goods has been sampled by household h in the given week. Since in our setup there are no quality differences among consumption goods, the choice probability Prob h, f of good f ∈ F h produced by the f -th consumption goods producer depends solely on relative prices as follows: where Λ parameterizes the intensity of market competition, i.e., the bigger Λ is, the more price sensitive probabilities are and the more competitive the market is. Once the consumer has selected a particular consumption good producer f , he spends his entire weekly consumption budget, i.e., c h τ /4, for good f provided that the inventory is sufficiently large. In case the consumer can not spend all his budget on the product selected first, he spends as much as possible, removes that product from the list F h , updates the logit values and selects another product to spend the remaining consumption budget there. If he is rationed again, he spends as much as possible on the second selected product and rolls over the remaining budget to the following week.

The banking sector
The primary purpose of the banking sector is to finance consumption goods producers by means of bank loans. Any bank meets the demand for a loan from a firm, provided that the risk-reward profile of the loan is considered acceptable by the bank. The reward is given by the interest rate which is charged and the risk is defined by the likelihood that the loan will default. Given the loan request amount λ f by firm f , bank b calculates the probability π f that the firm will not be able to repay its debts as: The default probability π f correctly increases with the firm's leverage and is used as a risk weight in computing the risk-weighted loan portfolio of banks, henceforth W b . D f and E f are firm's debt and equity, respectively. According to the computed credit worthiness of the firm, the bank informs it about the interest rate that would be applied to the requested loan: where r cb is the base interest rate set by the central bank and γ b π f is the risk spread depending on the firm's credit risk π f . The parameter γ b sets the spread sensitivity to the credit worthiness of the firm. The central bank acts as the "lender of last resort", providing liquidity to the banking sector at the base interest rate r cb . It is worth noting that banks lending rate does not depend on the expected demand for loans but only on the evaluation of firm's credit risk. Banks can then lend money, provided that firms wish to take out new loans, and that their regulatory capital requirement are fulfilled. Let us remark that granting new loans inflates the balance sheet of the banking system because it generates also new deposits 3 .
The model regulatory capital requirement are inspired by Basel II accords and state that the capital ratio of banks, given by the equity E b divided by the risk-weighted assets W b , has to be higher than a given threshold, defined as 1 α , where α is the key policy parameter used in this study. Hence, if firm f asks for a loan λ f , bank b supplies a credit amount b f determined as follows: The value of risk-weighted assets W b is computed by the weighted sum of outstanding loans of bank b where the weights are given by the default probability (the default risk) of each loan defined in Eq. 17. Bank's liquidity, i.e., M b as in Table 3, is an asset but its default risk shall be considered zero, therefore it does non enter in the computation of W b .
The parameter α can be interpreted as the leverage level banks are allowed to have. Equations 19 state that bank b is available to satisfy entirely the loan demand λ f if it does not push W b above the Basel II threshold, set at α time the net worth (equity) of the bank, otherwise the bank can satisfy the loan demand only partially or even is not allowed to lend any money at all, and firm f is rationed in the credit market. Thus, it can be argued that banks are quantity takers and price setters in the loans market, with the policy constraint of a fixed capital adequacy ratio.
In order to better visualize the stock-flow accounts for banks, a typical balance sheet of a bank is reported in table 3. For any bank b, the stocks of total deposits Assets Liabilities M b : liquidity S b : standing facility deposited at the central bank (debt to the central bank) L b : bank's loan portfolio D b : total (households' and firms') deposits at the bank E b : equity   Finally, at the end of the trading day, both liquidity M b and equity E b are updated in order to take into account money flows which regard bank b, i.e., interest revenues and expenses, taxes and dividends. The bank can choose if paying or not dividends to shareholders, and this choice is crucial for driving its equity dynamics. In particular, if a bank is subject to credit supply restriction due to a low net worth compared to the risk-weighted assets portfolio, then it stops paying dividends so to raise its equity capital and to increase the chance to match in the future the unmet credit demand. Finally, loans are extinguished in a predetermined and fixed number of constant installments, n .

The Government
The Government is responsible for the fiscal and welfare policies. It collects taxes on corporate profits, household labor and capital income, and sets the three corresponding tax rates. Taxes are collected on a monthly basis while tax rates are revised yearly downward or upward by a given percentage tick in order to pursue a zero budget deficit goal. Taxes constitute the revenues side of government budget. Government expenses are made by unemployment benefits, households transfers and the interest rates on the outstanding government debt, all payed on a monthly basis. Unemployed benefits are set to a percentage of the last salary of the unemployed worker. The government debt is made by infinitely-lived government bonds that pay a fixed monthly coupon, determined by the nominal bond interest rate and by the bond face value. The nominal bond interest rate is anchored with a mark-up to the central bank base interest rate. Government bonds are owned by households and traded in the financial market. Government deficit is financed by issuing and selling in the market new infinitely-lived bonds. Government liquidity M g is deposited at the Central bank. Table 4 presents the sketch of assets, i.e. liquidity, and liabilities, i.e., bonds of the Government in Eurace.

The Central Bank
The Central Bank plays several important roles in the Eurace economy. It provides a standing facility to grant liquidity in infinite supply to commercial banks, when they are in short supply, and sets the base interest rate (or policy rate), which is the the cost of liquidity provided to banks and the lowest reference value considered by banks when setting interest rates of loans to firms. Furthermore, the Central Bank may purse an unconventional monetary policy, named quantity easing, consisting in buying Government bonds directly in the market, easing the funding conditions for the budgetary authorities. Table 5 shows the typical balance sheet of a Centra Bank.  In this paper, the central bank does not follow a specific monetary policy but simply updates, with monthly frequency, the base interest rate r cb in order to fill the gap with inflation. If π m is the monthly inflation rate,

Assets
This rule connects the policy rate with the inflation rate, avoiding economic distortions that can rise when the gap between interest rates and inflation is too big (r cb min is the minimum value for policy rate). The logic is that inflation erodes the value of money over the term of a loan, so the central bank increases the interest rate to compensate for that loss (see section 4 to have a complete picture on loan rates).
The choice has been to keep the central bank "passive" in order to understand, ceteris paribus, the effects of debt on our artificial economy. How the central bank could handle economies' debt is another story, that we are not telling in this paper.

Analysis of results
Computational experiments have been performed in a simulation setting characterized by 2,000 households, 20 consumption goods producers, 3 banks, 1 investment goods producer, 1 government, and 1 central bank. The experiments consist in running several simulations of the Eurace model, varying the values of banks' leverage and observing the macroeconomic implications in the artificial economy. Values of leverage α have been set in the range from 5 to 9, where α = 5 corresponds to the case of the tightest capital requirement and α = 9 to the most permissive case. The duration of each simulation is set to 240 months (20 years).
In the following sections results are presented from a qualitative and quantitative point of view, with the effort to examine and disclose the economic mechanisms that can explain the obtained results.

Reasoned assessment of simulation outcomes
Figures from 1 to 6 show the time series of several relevant variables of the Eurace economic system. Figure 1 clearly shows that the central bank interest rate, as stated in eq. 20, targets the inflation rate. It is important to stress that our aim here is not to test any monetary policy but to understand the effect of debt on the Eurace artificial economy. In this perspective, the central bank interest rate rule is a sort of minimal adjustment that avoids major distortions as having high inflation and low interest rates, that would represent a free lunch for indebted firms. We remind that banks loan rates are set adding a mark-up on central bank rates, that varies according to firm's riskiness, as shown in section 4. From figure 1 it emerges that cycles on inflation drive real investments through the channel of interest rates. As stated in section 2.2, investments decisions depend on the cost of capital, and thus investments are anti-cyclical with respect to interest rates.
Production (see figure 2) is characterized by three stylized behaviors. A long term growth due to capital accumulation, alternative periods of growth and recession (business cycles), and sudden falls that are usually, but not always, followed by correspondent recoveries. Looking at the same time to figures 1, 2, and 6, allows one to understand the nature of business cycles. In a period of full employment there is a stronger pressure on wages, that tend to rise firms costs and therefore prices, that are set according to a mark-up rule. A higher inflation drives an increase of interest rates and investments costs, inducing a spiral that raises prices again.
This mechanism goes on until the interest rate is sufficiently high to disincentive investments. Here we have the peak of the business cycle, followed by a period of lower investments that can lead to recession due to capital depreciation (look to section 2 to find model details). It is interesting to notice that inflation peaks are characterized by a lag with respect to production peaks. In fact, full employment usually persists for a while after the production peak, inducing a further growth of wages and prices. The reason is, again, that production decline after the peak is caused by a contraction of investments but the level of employment remains high. In the last part of the cycle, the decrease of inflation affects interest rates and firms start again to invest more, raising production and labor demand, thus affecting wages and prices, and closing the cycle. Figure 2 clearly shows that output is affected also by sudden falls that can be very dangerous for the economic system. The case of high leverage (α = 9) is an example of a critical collapse of production. A quantitative analysis of this falls will be presented later in the paper, using tables with average values of different simulation seeds for statistical robustness. Here we want to stress the qualitative mechanism that emerges from the model, trying to explain the rationale behind the presented results. In order to do that, we focus on what happens in the credit market, and in particular on the effects of firms debt load. Let us comment, first, the case of high leverage (α = 9).
Total loans, represented in figure 3, show a cyclical trend which is very similar to business cycles in production. This is due to the fact that firms finance their production plan mainly by asking loans to banks (they can issue new shares if rationed in the credit market), and therefore an increase of total credit is generally associated with economic growth. Figure 4 shows the median value of two indicators of firms financial stability, i.e, debt over equity and interest expenses over revenues. When total credit and production are growing, interest over revenues is decreasing, firstly because revenues are obviously growing, and secondly because the higher debt burden affects firms in the next 24 months, when they will have to pay interests for the borrowed loans. The more critical period for the productive sector is after a production peak, when a recession starts and interest expenses are still very high. In these periods interest over revenues is very high and firms are financially fragile. Some firm with low revenues can go into bankruptcy and, if the economic system is also structurally fragile, the result can be a bankruptcies chain with disastrous consequences.
Let us explain what happens in the case of high leverage (α = 9). From month 130, that corresponds to a production peak, it starts a moderate recession. Firms debt over equity is already high, while interest expenses raise quickly over revenues. Before month 168 we still are in recession and the financial fragility indicators of figure 4 are very high. The risk is that some firm is no more able to fulfill its production plans and to pay back its debt. Figure 5 shows that during the recession starting at month 130, some firms go into insolvency bankruptcy much earlier than month 168. It is worth reminding here that insolvency bankruptcy (where firms have negative equity) implies a partial write-off of debt that clearly affects banks equity. See section 2 for more details on bankruptcies in the model. These first bankruptcies do not affect seriously banks equity, as shown in figure 3, because of the small size of firms involved. However, the chain of bankruptcies happening around month 168 determines a strong reduction in banks equity. This equity fall seriously cuts the lending capacity of the banking system. Capital requirement is no more fulfilled, banks have to reduce new loans issuing, and  firms are inevitably rationed in the credit market. The immediate outcome is a chain of illiquidity bankruptcies, affecting firms that still have a positive equity but that are unable to roll-over debt. As described in section 4, banks react stopping dividends payment and limiting new loans (because constrained by low equity). These measures allow banks equity to raise for a while. The production sector manages to recover from the output crash, but it is only a matter of time. A second round of insolvency bankruptcies, at month 190, triggers a new crisis with a fall of banks equity that totally cuts credit supply, with devastating consequences for the real economy (see figure 2). The shortage of credit starts a quick downward deleveraging path, represented in figure 4, that clearly signals the inability of firms to finance production.

Banks leverage impact
Section 7.1 presented an interpretation of the economic dynamics of the model, trying to underline the mechanism triggering the crisis. Aim of the current section is to analyze the impact of bank leverage ruling on the economic system performance.
In order to do that, we compare five different level of banks leverage, or capital requirement, from α = 5 to α = 9. In section 4, model details about the banking system are available. From figure 3 it emerges that in the first part of the simulation, let's say in the first 4 years (48 months), the amount of total loans is higher for higher leverage. Figure 2 shows that a larger amount of credit corresponds to higher production and lower unemployment in the first 4 years. It is also worth noting that, in the first part of the simulation, there is a significative difference in firms leverage (see figure 4), i.e., firms debt over equity is much higher in the case of higher allowed banks leverage. A more robust version of these findings can be observed in table 6, where average results of 15 simulation batteries are presented. Table results clearly confirm that the short term effect of an higher amount of credit money conomics Discussion Paper injection into the artificial economy is an improvement of real economic indicators, accompanied by a significant increase in firms' leverage. Figures 1 and 6 bring out that inflation increases with credit money and that, consequently, interest rates also raise.
Some small signals of the higher financial fragility of firms exist also in the first 4 years of simulation. Figure 5 shows that some illiquidity bankruptcies are present in the case of α = 9. There is also a downturn of production, but the recover is quick and the output is overall much higher for high αs, as clearly stated by table 6.
As emerged from the simulation paths analyzed in section 7.1, the picture changes when considering the long run, i.e., 20 years of simulation. Tables from 7 to 9 show the main economic variables of the model in the usual range for α. Each value is averaged over 15 different random seed. To begin with, it can be useful to have a look at table 9, where the financial variables are reported. It comes to light the stronger financial pressure and instability when banks' capital requirement is loose (high α). High interest rates and high firms' debt provoke chains of insolvency and illiquidity bankruptcies, as explained in section 7.1, triggering economic crisis. It is worth noting that the total outstanding credit (table 8) is no more increasing monotonically with α, as in the first 4 years, because of the reduced banks' equity that prevents loans supply.
The presented tables show quite clearly that there is a proper banks leverage level around the value α = 7. For lower values firms are not able to accede to a sufficient amount of credit, while for higher values firms debt load is too big and triggers bankruptcies that destabilize the economy. This is visible looking at table 7 where all the real indicators have an optimum value for α = 7. In particular, one can notice that for low values of α, the difference in GDP (that is the sum of production and investments) are mainly given by investment gaps. This feature can be observed also in table 11, representing the crosscorrelation between credit variations and investment variations, and table 10, representing the crosscorrelation between credit variations and production variations. Correlation is positive and statistically significative in both cases, but much stronger in the case of investments. This explains why the rising amount of loans in the economy (from α = 5 to α = 7) affects investments more than production. We can analyzed this fact in the light of the financing mechanism described in section 2. If firms can finance with their revenues the wage bill, interest on debt, and capital depreciation, they do not need any extra credit to carry on production. However, in order to raise their capital level, through new investments, they need more loans from banks. This can be verified looking at the relation between loans and investments in figures 2, 1 and 3.
The last detail concerns the causal relation between credit, consumption and investments. Observing the lag structure of tables 11 and 10 it emerges that production drives loans and loans drive investments. This is probably given by   the fact that firms determine their production plans according to recent sales, and therefore loans demand increases when sales and production are high. On the other hand, investments are possible only when there is a rise of loans, and new credit credit money available. This causal relation are obviously less evident in the case of high leverage (α = 9) because economic instability weakens, and sometimes breaks, this kind of dynamics.    Table 11: Crosscorrelation between monthly percentage variations of total credit and investment goods production. The lag represents 1 month.

Concluding remarks
The paper presented the agent-based macroeconomic model and simulator Eurace, along with a set of computational experiments focused on endogenous boom-bust credit cycles and their interplay with the business cycle. Different boom-bust credit dynamics have been simulated by exogenously setting the regulatory capital requirements for banks, mimicking the Basel II capital adequacy rules. Results show that the debt accumulation by the corporate sector is able to foster economic growth in the short run, but excessive leverage of the private sector may cause waves of bankruptcies, credit rationing and significant GDP drops in the long run.
Credit-fueled economic booms put pressure on wages and labor costs. This, in conjunction with the speed of growth of credit-money, causes a rise of inflation, that in turn determines higher of interest rates. Excessively indebted firms may soon be unable to fulfill their financial commitments with the cash proceedings of their revenues, and may be obliged to take new loans to pay interest on their debt, therefore entering in a Ponzi scheme. However, the deterioration of firms creditworthiness causes a further rise of interest rates due to the widening of the risk spread on policy rates. This further deteriorates the balance sheet of highly indebted firms, which may become soon insolvent. Debt write-offs reduce banks's equity and their lending capacity, thus causing a widespread credit rationing and a forced deleveraging of the corporate sector that may trigger a possible wave of bankruptcies of even good but illiquid firms. A credit-fueled economic boom may turn out in a depression.
The relevance of the computational results reside in their resemblance with the recent developments of advanced economies, which have been characterized first a by period of easy credit and high growth, then by a nearly collapse of the financial system and a severe economic recession that ended in a slow recovery, characterized by a prolonged period of deleveraging. Two major conclusions can therefore be drawn form our results. First, debt and private sector leverage play a crucial role in the business cycles dynamics and can not be neglected anymore in any complete macroeconomic model. Second, it can be argued that the Eurace model and simulator can be considered as a reliable scientific environment and an useful computational facility where to investigate some of the most important economic problems of present days. In this respect, future research efforts will focus on the calibration of the Eurace simulation environment on examples of real economies as case studies, and on the investigation of proper monetary and fiscal policies able to prevent or at least mitigate the effects of a boom-bust credit cycle.