The financial transmission of shocks in a simple hybrid macroeconomic agent based model
 92 Downloads
 1 Citations
Abstract
Tracking the chain of events generated by an aggregate shock in an Agent Based Model (ABM) is apparently an impossible mission. Employing the methodology described in Assenza and Delli Gatti (J Econ Dyn Control 37(8):1659–1682 2013) (AD2013 hereafter), in the present paper we show that such a task can be carried out in a straightforward way by using a hybrid macro ABM consisting of a IS curve, an Aggregate Supply (AS) curve and a Taylor Rule (TR) in that aggregate investment is a function of the moments of the distribution of firms’ net worth. For each shock (fiscal expansion, monetary tightening, financial shock) we can decompose the change of the aggregate scale of activity (measured by the employment rate) in a first round effect – i.e., the change generated by the shock keeping the moments of the distribution of net worth at the preshock level – and a second round effect, i.e., the change brought about by the variation in the moments induced by the aggregate shock. In turn, the second round effect can be decomposed in a term that would show up also in a pure Representative Agent setting (RA component) and a term that is specific to the model with Heterogeneous Agents (HA component). In all the cases considered, the first round effect explains most of the actual change of the output gap. The second round effect is unambiguously negative. The HA component has the same sign of the RA component and explains a sizable fraction of the second round effect.
Keywords
Heterogeneity Financial fragility Aggregation Business cyclesJEL Classification
C63 E12 E03 E32 E44 E521 Introduction
In a macroeconomic AgentBased Model (ABM), an aggregate variable such as GDP is determined “from the bottom up” i.e., summing the output of a large number of heterogeneous firms. In other words, GDP is a function of the entire distribution of agents’ characteristics. The dynamic pattern of a macroeconomic variable such as GDP is an emergent property of the model that is determined by the complex microeconomic interactions of myriads of heterogeneous agents. Over the last decade, a fairly large literature has explored the emergent properties of aggregate variables in macro ABMs; see, for instance, Cincotti et al. (2010, 2012); Dawid et al, (2011, 2012); Delli Gatti et al. (2008, 2011); Dosi et al. (2006, 2010, 2013); and Gaffeo et al. (2008). For example, in Delli Gatti et al. (2005) and Assenza et al. (2015), in the presence of a financial friction, investment and output at the firm level are affected by individual net worth. Hence, at the aggregate level, GDP is a function of the distribution of the firms’ net worth.
In an agentbased setting, thinking in macroeconomic terms – i.e., in terms of interrelated changes of aggregate variables – is prima facie impossible. When an aggregate shock occurs, it is extremely difficult to trace the transmission mechanism in a clear and uncontroversial way. In order to understand how a shock trickles down through the web of micro interactions and affects macro variables, it is necessary to rely on “narratives” that may or may not be convincing.
In a previous paper, we have proposed a methodology to deal with this issue (Assenza and Delli Gatti 2013; AD2013 hereafter) that consists in building what we call a Hybrid Macroeconomic Agent Based Model. In our 2013 paper, the Hybrid Macroeconomic ABM is embedded in an optimizing ISLM framework. In the present paper we follow the same methodology to build a model of an economy populated by households, firms and banks closer in spirit to the contemporary New Keynesian literature. The model consists of a IS curve, an Aggregate Supply (AS) curve (i.e., a Phillips curve) and a Taylor Rule (TR).
In principle, different types and degrees of heterogeneity could be taken into account. For the sake of simplicity, in the following we assume that there is a representative household and introduce heterogeneity only at the firm level. In particular, we assume that the corporate sector consists of a myriad of firms characterized by heterogeneous financial conditions (captured by net worth). In the spirit of Greenwald and Stiglitz (1993), each firm faces an idiosyncratic shock to revenues and decides investment in order to maximize expected profits. We assume that the cost of credit for the borrowing firm decreases with financial robustness. Hence the firm’s optimal expenditure on capital goods is affected by its net worth.
Adopting an appropriate aggregation procedure – that we labeled the ModifiedRepresentative Agent in AD2013 – we approximate the distribution of agents’ net worth by means of the first and second moments of the distribution.^{1} Therefore, aggregate investment turns out to be a function of an average External Finance Premium (EFP), that in turn is affected by the moments of the distribution of firms’ net worth.^{2} The moments of the distribution play the role of macroeconomic variables and therefore can be incorporated in a macroeconomic model.^{3} We thus use this investment equation in the macroeconomic framework described by the ISASTR model.^{4}
In each period, say t, given the moments of the distribution in period t − 1, we determine the macroeconomic equilibrium, i.e., the triple consisting of the equilibrium levels of the employment rate, the inflation rate and the interest rate. Since the moments of the distribution change over time, the average EFP and therefore the macroeconomic equilibrium change as well. The role of heterogeneity (in the corporate sector) in influencing macroeconomic outcomes is captured by the fraction of change in the macroeconomic equilibrium, that can traced back to the change in the crosssectional variance of the distribution.
In order to assess the quantitative impact of changes in the moments of the distribution on macroeconomic outcomes we develop a simple ABM of the corporate sector. For each firm, we define the law of motion of net worth, that is affected – among other variables – by the interest rate: the higher the interest rate, the lower realized profits and the lower individual net worth. The ABM boils down to a system of nonlinear difference equations (one for each firm). From the artificial data obtained through simulations we trace the evolution over time of each and every element of the distribution of net worth. Hence we can retrieve the evolution over time of the crosssectional mean and variance, that will impact future endogenous macrovariables.
In a nutshell, there is a twoway feed back between the macroeconomic and the agent based submodels: the equilibrium interest rate in t, that is affected by the moments of the distribution in t − 1, will impact on the moments of the distribution in t, that will reverberate on the equilibrium interest rate in t + 1, and so on. Changes over time of the moments drive the evolution of the equilibrium interest rate, the employment rate and inflation.
We use the Hybrid Macroeconomic Agent Based Model to provide an answer to the following question: that is the role of heterogeneity in the transmission mechanism of (fiscal, monetary and financial) shocks to the macroeconomy?
The expression Δx_{1st} is the direct or first round effect i.e., the change in x generated by the shock assuming that the distribution of net worth does not change.
In our setting, however, the distribution does change. There is also an indirect or second round effect represented by Δx_{2nd} that captures the change of the employment rate due to the change in the distribution of net worth, that in turn is generated by the shock.^{5} The indirect effect captures a financial transmission mechanism, because it is entirely due to the change of net worth, our measure of financial robustness. It can be broken down, in turn, into two components: a Representative Agent (RA) component Δx_{2nd, RA} and a Heterogeneous Agents (HA) component Δx_{2nd, HA}. The former is the indirect change in the employment rate that would occur if the individual EFP coincided with the average EFP (focusing therefore only on the first moment of the distribution) while the latter incorporates also the effect of changes in the variance of the distribution.
Given the chosen parameterization, we are able to quantify these effects. We consider three (permanent) shocks: (i) an expansionary fiscal shock (increase of Government expenditure); (ii) a monetary shock (increase of the exogenous component of the interest rate); (iii) a financial shock (increase of the exogenous component of the individual EFP).

In all the cases considered, the first round effect explains most of the actual change of the output gap.

The second round effect is unambiguously negative both in the case of an expansionary fiscal policy and in the case of a contractionary monetary policy. In both cases, in fact, the average EFP goes up.

Both in the case of an expansionary fiscal policy and in the case of a contractionary monetary policy, after the shock the crosssectional mean and variance of the distribution of net worth go down: the first and second moments of the distribution are positively correlated. This is due to the consequences of the increase of the interest rate on the distribution. The reduction of the crosssectional mean pushes the average EFP up while the reduction of the variance pushes the average EFP down. The first effect prevails so that average EFP goes unambiguously up.

The second round effect is negative also in the case of a contractionary financial shock. In this case, the EFP goes up on impact because of the shock itself, and goes further up because of the second round effect. Also in this case, the crosssectional mean and variance of the distribution of net worth go down, and the first effect prevails so that average EFP goes unambiguously up.

The second round effect amplifies the effect of the monetary shock and the financial shock and mitigates the effect of the fiscal shock. In the latter case, in fact, the financial transmission mechanism contributes to crowding out.

In the case of the fiscal and monetary shock, the HA component has the same sign of the RA component and explains a sizable part of the second round effect.
Of course, the size of these effects is due to the particular configuration of parameters and to the modelling choices we adopted. Let’s remember that there is only one source of heterogeneity in this model, i.e., the heterogeneity of firms’ financial conditions.
The paper is organized as follows. Section 2 is devoted to the microfoundations of behavior of households, firms and banks. Section 3 presents the ISASTR model. In Section 4 we derive the macroeconomic equilibrium. Section 5 is devoted to the description of the ABM and the discussion of the output of simulations in the baseline scenario. Sections 6, 7 and 8 are devoted to the analysis of the effects of the fiscal shock, the monetary shock and the financial shock, respectively. Section 9 concludes.
2 Microfoundations
In the present section we will describe the main building blocks of the model. In particular, we will describe the microfoudations for the main actors of our simplified economy, i.e., households, firms, and the banking system.
2.1 Households
We examine an economy populated by n_{H} homogeneous households. Each household has m members, of that m_{a} are active (i.e. participating in the labor market). Therefore, total population is H := m × n_{H}, while total labor force is L := m_{a}n_{H} (both exogenous). Hence we can define the exogenous participation rate as the ratio between total labor force and total population, i.e. L/H = m_{a}/m.
Households’ income consists of the sum of individual income across active members. In particular, each households’ active member earns the wage w if employed and the unemployment subsidy σ if unemployed, with w > σ. We assume that active members are simple Keynesian consumers (i.e. agents who save a fraction of their income) and their propensity to consume out of income is c. By contrast, inactive members are pure “hand to mouth” consumers: they do not save. For instance, a retired member of the household spends her pension entirely in consumption goods. Each inactive member of the family consumes \(\bar c\). All these parameters are exogenous.
As we will show in the following, in our economy total employment (N_{t}) is endogenous and time varying^{6} and depends on firms’ production decisions. Hence, the employment rate\(x_{t}=\frac {N_{t}}{L}\) is endogenous and time varying as well. Notice that, since we will assume that technology is linear (see Section 2.2), x_{t} is also the ratio of current output Y_{t} = λN_{t} to fullemployment output \(\bar Y=\lambda L\). Of course, un_{t} = 1 − x_{t} is the unemployment rate.
2.2 Firms
The supply side of the economy is populated by n_{F} firms. Each firm, indexed by i = 1, 2, .., n_{F}, produces a homogeneous final good by means of capital and labor in a competitive setting. Firms are heterogeneous with respect to their financial robustness captured by the time varying individual net worthA_{it}. We will denote the mean and variance of the distribution of firms’ net worth in each period t with A_{t} := < A_{it} > and V_{t} := < (A_{it} − A_{t})^{2} >, respectively. We will refer to these variables as the crosssectional mean and variance.^{8} Since the net worth of each firm is endogenously determined (see Section 5 for details), the crosssectional mean and variance are also timevarying. We will show that both A_{t} and V_{t} fluctuate around their respective “long run” values, i.e., the average over a long time span of the crosssectional mean and variance.
The crosssectional mean in t is obtained by averaging individual net worth across firms in the same period. The long run mean is obtained by averaging the crosssectional mean across T time periods, with T “large” enough to characterize the long run. We will denote with A^{L} and V^{L} the long run mean and variance of the distribution of net worth.
In symbols, the crosssectional mean in period t is \(A_{t}={\sum }^{n_{F}}_{i = 1} A_{it}/n_{F}\), while the long run mean (over a time span of T periods) is \(A^{L}={\sum }^{T}_{t = 0} A_{t}/T\). Analogously, the crosssectional variance in t is \(V_{t}={\sum }^{n_{F}}_{i = 1} (A_{it}A_{t})^{2}/{n_{F}}\) while the long run variance is \(V^{L}={\sum }^{T}_{t = 0} V_{t}/T\).
We assume that in the case in that firms’ net worth is not sufficient to finance investment then they will rely on bank loans. Therefore, they run the risk of bankruptcy. Banks extend credit to firms at an individual interest rate (r_{it}) that takes this risk into account. They charge to each firm a specific interest rate that includes an external finance premium (Bernanke and Gertler 1989, 1990) decreasing with individual net worth.
Each firm carries on production by means of a Leontief technology that uses labor and capital. The production function of the ith firm is Y_{it} = min(λN_{it}, νK_{it}) where Y_{it}, N_{it} and K_{it} represent output, employment and capital, respectively; ν and λ are parameters that measure the productivity of capital and labor, respectively. Hence the ratio ν/λ is employment per unit of capital.^{9}
The firm faces an idiosyncratic shock u_{it} to revenue due, for instance, to a sudden change in preferences. We assume that u_{it} is a random variable distributed as a uniform over the interval (0, 2) with expected value E(u_{it}) = 1.
Notice that, according to Eq. 2.5 optimal individual investment differs across firms due to the different cost of credit (r_{it}). We will explore the determinants of the individual cost of credit in the next section.
2.3 Banks
Whatever bank the firm utilises, the EFP will be determined as in Eq. 2.8. Therefore it is not necessary to specify the behavior of each and every bank. The banking system contributes to determining the cost of credit for each borrowing firm along with the central bank.
As far as the quantity of credit is concerned, we assume that the demand of credit is fully satisfied at the given cost of credit. The quantity of credit supplied therefore is demand driven. It is not necessary to be specific on the demand for credit. However, to fix ideas one can think of the demand for credit (for each and every firm) as equal to the financing gap, i.e., the difference between investment and internal finance (e.g., net worth).
The definition of the individual cost of credit in Eq. 2.7 sets the stage for the macrotomicro feedback: aggregate shocks (e.g. a change in monetary policy) reverberate on the individual cost of credit (and therefore on individual investment) through the risk free interest rate r_{t}.
Assumption (2.8) introduces a nonlinearity in the relationship between EFP and net worth at the individual level. This is key for the following analysis, as we will show momentarily.
Notice that the exit threshold is time varying since it is increasing with the risk free interest rate. Any aggregate shock that leads to an increase of the interest rate, therefore, will increase the exit threshold and lead to a higher fraction of exiting firms.
Since the individual EFP is a convex function of net worth, the individual investment is a concave function of net worth defined on \(A_{it1}>A^{min}_{t}\) . It is easy to see that there is an upper bound on individual investment, that is \(K^{max}_{t}=\frac {\gamma r_{t}}{\omega }\).
The average EFP is the sum of two terms. The first one would be the EFP in the Representative Agent case and depends only on the crosssectional mean (therefore we will refer to this component as the “RA term”) while the second one captures the role of heterogeneity in the average EFP. The second term (that we will refer to as the“HA term”) is affected both by the crosssectional mean and the crosssectional variance of the distribution of firm’s net worth.
3 The macroeconomic model
Given the microfoundations described in the previous section, in this section we will turn to the macroeconomic setup representing our economy.
3.1 The IS curve
Since λ > w by assumption (see Section 2.2 for details), then x_{0} and x_{1} are positive parameters. The relation in Eq. 3.1 represents the equation of the IS curve on the (x_{t}, r_{t}) plane. Notice that the (time varying) average EFP f_{t} is a shift parameter of the curve. In particular, given x_{1} > 0, as the average EFP increases the IS shifts downward on the plane (x_{t}, r_{t}). In words: as conditions to access credit for firms become more stringent on average, then, for each level of the risk free interest rate, they will be able to finance a smaller amount of investment and in turn they will cut production. This effect is captured by the reduction of the employment rate x_{t}.
3.2 The AS curve
3.3 The Taylor Rule (TR)
4 The macroeconomic equilibrium
Equations 4.2, 4.3, 4.4 – i.e., the reduced form of the model – determine the temporary equilibrium of the macroeconomy, i.e., the triple (\(x_{t}^{*}, r_{t}^{*}, \pi _{t}^{*}\)). Equilibrium is temporary becasue the equilibrium values of the endogenous variables are parameterized to the time varying average EFP.
While equilibrium output cannot be negative, both the real interest rate and inflation can be negative in equilibrium. Notice that the employment rate plays a leading role in determining the macroeconomic performance: the real interest rate and inflation in fact are increasing linear functions of the employment rate.
If average EFP is greater than the threshold (\(f_{t}>\hat f\)), then the economy experiences an episode of recession, with \(x_{t}^{*}<x_{n}\), \(r_{t}^{*}<r_{n}\), \(\pi _{t}^{*}<0\) and \(y_{t}^{*}<0\). If the average EFP is smaller than the threshold, an expansionary episode occurs characterized by \(x_{t}^{*}>x_{n}\), \(r_{t}^{*}>r_{n}\), \(\pi _{t}^{*}>0\) and \(y_{t}^{*}>0\). In Fig. 1, we represent the IS curve in t = 1 given the average external finance premium f_{1}, which in turn depends on the crosssectional mean A_{0} and variance V_{0} (not shown). By construction, the EFP in t = 1 is smaller than the threshold EFP (\(f_{1}<\hat f\)). Hence, the employment rate and the interest rate are greater than their natural counterparts, inflation and output gap are positive (point A in Fig. 1).^{18}
As mentioned above, equilibrium is temporary because the equilibrium values of the endogenous variables are pinned down to the average EFP, that is time varying. In fact, the average EFP is a non linear function of the moments of the distribution of net worth in t − 1, as shown by Eq. 2.12. In a sense, the triple (\(x_{t}^{*}, r_{t}^{*}, \pi _{t}^{*}\)) can be thought as a “frame” that allows one to visualize the macroeconomy in each period t. As time goes by, a frame in t + 1 follows the frame in t, and so on. The entire “movie” is shown. The distribution of the firms’ net worth changes and so does the average EFP and x and r and π (and y), which depend on the EFP.
Notice that long run equilibrium values are undated. This is due to the fact that, in the long run, the economy has settled in a sort of “statistical steady state”. In Fig. 1, the long run position is denoted by L. The graph is built on the assumption that, after period 1, the crosssectional mean and variance evolve in such a way as to determine a long run EFP, which is smaller than f_{1}.
5 The agent based model
In the previous sections, we have presented the main building blocks of our model and computed the macroeconomic equilibrium. We have also qualitatively analyzed the impact of changes of the average EFP on the macroeconomy. In particular, we know that, as the net worth distribution evolves over time, this in turn affects the average EFP and therefore the endogenous macro variables, i.e., the output gap, the interest rate and inflation. We have, therefore micro to macro externalities. At the same time as the risk free interest rate changes over time, it in turn affects the individual interest rate on loans charged by the banks to firms. Thus changing firms’ ability to access the credit market. We have indeed macro to micro externalities. In the following section, we go back to the microfoundations of the model and focus on firms in order to develop an agent based model that describes the evolution over time of the key variable in our model, namely, firms’ net worth, and to study the quantitative impact of the externalities described above.
5.1 The law of motion of individual net worth
In the end, therefore, the cost of credit for the firm depends both on the individual and on the average EFP. While an increase of the individual EFP pushes up the individual cost of credit, an increase of the average EFP affects negatively the individual cost of credit by depressing the equilibrium interest rate. This sounds strange but is perfectly understandable, given the context. Other things being equal, in fact, an increase of the average EFP pushes down both the output gap and inflation. Hence the equilibrium interest rate (governed by the Taylor rule) goes down and brings down the individual cost of credit.
Given the complexity of the system, it is not possible to compute a closed form solution, and so we need to build a simple Agent Based Model (ABM) and make use of computer simulations to assess the dynamic properties of the economy we are investigating. Notice that the dynamics of net worth is constrained by a lower bound: when A_{it} reaches \(A^{min}_{t}\) , in fact, the firm exits. The ABM will incorporate this condition. The bankrupt firm will be replaced by a new (entrant) firm with a prespecified endowment (initial net worth). In the following subsection, we will describe the baseline scenario of the ABM.
5.2 The baseline scenario
We consider an economy populated by H people (household members), of which L are active on the labor market, and n_{F} firms over a time span of T = 1500 periods (the time scale can be thought of as a quarter).
Parameters’ value in numerical simulations
Variable  Symbol  Numerical Value 

Population  H  2000 
Labor force  L  1000 
Number of firms  n _{ F}  200 
Technology: productivity of capital  ν  0.3 
Technology: productivity of labor  λ  2 
Capital adjustment cost coefficient  ω  0.05 
Wage rate  w  1 
Unemployment subsidy  σ  0.7 
Propensity to consume  c  0.8 
Percapita consumption inactive population  \(\bar c\)  0.3 
Natural interest rate  r _{ n}  0.0025 
Taylor rule: output gap coefficient  α _{ x}  0.5 
Taylor rule: inflation coefficient  π _{ x}  0.5 
Phillips Curve: slope  θ  0.04 
Natural employment rate  x _{ n}  0.96 
External finance premium coefficient  α  0.04 
Dividend yeld  δ  0.1 
Government expenditure  G  400 
The first three exogenous variables are calibrated in order to obtain a participation rate (L/H) of 50% and a ratio of firms to active population of 1/5. These figures are roughly in line with the Italian case.
Since technology is linear, by definition the productivity of capital is the reciprocal of the capital/output ratio, that we calibrate – following a well known Kaldorian stylized fact – approximately equal to 3. Hence ν = 0.3.
We normalize the real wage to unity w = 1. The calibration of the productivity of labor (λ = 2) coupled with the normalized real wage, implies a unit labor cost in real terms equal to 1/2. In our setting this is also the fraction of GDP that goes to wages. Therefore gross profits represents 50% of GDP and cover the aggregate cost of credit and adjustment costs. As to capital adjustment costs, we don’t have priors on the parameter ω, that we therefore calibrate in order to obtain a “plausible” level of aggregate investment, more on this later.
We assume a relatively generous unemployment subsidy (70% of the real wage). The value of the propensity to consume out of income for the active population is standard (c = 0.8). Exogenous aggregate consumption is the sum of the consumption of active but unemployed people and of consumption of the inactive population. Consumption of the unemployed is cσL = 560. From the definition and our parametrization, the consumption of the inactive population is \(\bar c (HL)= 300\). Hence total exogenous consumption is \(\bar C=c\sigma L+\bar c (HL)= 860\). Government expenditure is also exogenous. In the baseline calibration, it is set at G = 400.
The natural interest rate r_{n}, that is usually associated with the rate of time preference, is set at 0.25% per quarter, i.e., slightly more than 1% per year. The coefficients of the output gap and of the inflation gap in the Taylor rule are the same as in Taylor’s pathbreaking paper.^{21}
In our calibration, the Phillips curve is relatively “flat” (θ = 0.04) to replicate recent estimates. The natural unemployment rate is implicitly set at 4% so that x_{n} = 0.96.
The coefficient α, which shows up in the definition of the external finance premium, is relatively low (α = 0.04), in order to keep the latter within acceptable bounds.
We run simulations of the ABM in order to generate, in each time period, a distribution of firms’ net worth. Therefore, in period t we can compute the crosssectional mean A_{t} and variance V_{t}. This determines also the average EFP in t + 1: f_{t+ 1}. Plugging these numbers into the reduced form of the model (Eqs. 4.2, 4.3, 4.4), we get the employment rate, inflation and the interest rate in t + 1. Using \(r^{*}_{t + 1}\) and A_{it}, from Eq. 5.2 we get A_{it+ 1} for each firm. We are now able to compute the crosssectional mean A_{t+ 1} and variance V_{t+ 1}. The iterative procedure is replicated in each period of the horizon of the simulation. We, therefore, can retrieve the time series of the crosssectional mean and variance of the net worth over 1500 periods, and the associated values for the employment rate, inflation and the interest rate.
Notice that a certain fraction of the population of firms will go out of business every period and will be replaced. Exits and replacements, of course, will impact on the shape of the distribution of net worth, and thus on the moments and the average EFP.
Each time series fluctuates irregularly around a long run mean or statistical equilibrium (represented in Fig. 2 by a horizontal dashed line).
Comparing panels (a)(c)(e), notice that inflation and the interest rate are perfectly correlated with the employment rate. This is not suprising because, by construction, inflation and the interest rate are increasing linear functions of the employment rate, (see Eqs. 3.2 and 3.4, respectively). Moreover, comparing panels (a) and (f) we see that the employment rate is negatively correlated whit the average EFP. This is also not surprising because, in equilibrium, the employment rate is a decreasing linear function of the average EFP (see Eq. 4.2).
From panel (b), we can infer that the crosssectional mean and variance of the distribution of net worth are positively correlated. This conclusion can be reached only by means of the ABM, that, in our setting, is in charge of tracking the evolution of the distribution over time. Therefore when, on average, firms become more financially fragile, the dispersion of firms increases (and vice versa). The correlated dynamics of the crosssectional mean and variance have opposite effects on the average EFP: an increase of the crosssectional mean pushes the EFP down, while the associated increase in the variance pushes the EFP up. From panel (d), however, we conclude that the effect of the mean prevails: when the crosssectional mean increases, the average EFP generally decreases. The increase in variance has a positive effect on average EFP but this is offset by the negative effect of the increase of the crosssectional mean.
Finally, from panel (f) we infer that the number of bankruptcies is positively correlated with the average EFP (and therefore negatively correlated with the crosssectional mean).
Long run averages
A ^{ L}  V ^{ L}  f ^{ L}  x ^{ L}  r ^{ L}  π ^{ L}  cv ^{ L}  Av. bank. 

1.6545  0.7694  0.031  0.9701  0.0071  0.00036  0.5302  3.2% 
In the long run, the employment rate is x^{L} = 0.97, higher than the natural employment rate. Therefore, the current unemployment rate is lower than the natural unemployment rate and inflation is positive (albeit very close to zero). The real interest rate is greater than the natural interest rate, being set at 0.7% per quarter. The coefficient of variation is slightly higher than 50%. The number of bankruptcies is low (3.2%).
Given our parameterization and the long run employment rate, in the long run GDP is Y^{L} = λx^{L}L = 1940. Total consumption is \(C^{L}=c(w\sigma )x^{L} L+\bar C = 1093\). Hence consumption represents approximately 57% of GDP. Government expenditure in the baseline scenario is 21% of GDP. Hence investment is 19% of GDP. These features are not too far from reality (taking also into account that there is no net foreign demand).
In the next three sections, we will show the effects of a fiscal shock (namely, a permanent increase of Government expenditure), a monetary shock (a permanent increase of the natural interest rate) and a financial shock (a permanent increase of the α parameter in the definition of the EFP). We will focus on the effects on the employment rate (and, therefore, on the output gap). As we said, in fact, inflation and the interest rate are increasing linear transformations of the employment rate.
6 A fiscal shock
In this section, we explore the effects of an expansionary permanent fiscal policy shock captured by an increase of Government expenditure from G_{0} = 400 (as in the baseline scenario) in t_{0} = 599 to G_{1} = 450 from t_{0} + 1 = 600 on. The other parameters remain unchanged.
Long run averages
A ^{ L}  V ^{ L}  f ^{ L}  x ^{ L}  r ^{ L}  π ^{ L}  cv ^{ L}  Av. bank.  

G_{0} = 400  1.6545  0.7694  0.031  0.9701  0.0071  0.00036  0.5302  3.2% 
G_{1} = 450  1.5372 ↓  0.6605 ↓  0.033 ↑  0.9804 ↑  0.0127 ↑  0.00079 ↑  0.5287 ↓  3.6% ↑ 
A change in regime occurs in t_{0} + 1 = 600. The employment rate, that fluctuated around 97% before the shock, jumps up and starts fluctuating around 98%. Therefore GDP increases by 1% approximately as a consequence of an increase of Government expenditure of 12.5%. The inflation rate and the interest rate move in the same direction. The increase of the interest rate is sizable: from 0.7% to 1.3%. It affects negatively the accumulation of individual net worth, and so the distribution changes also. Both the long run crosssectional mean and variance of net worth go down. The net effect of this change in the moments of the distribution is an increase of the EFP, from 3.1% to 3.3%. The tendency of the EFP to increase due to the reduction of the average net worth is mitigated by the reduction of the crosssectional variance. Finally, as the EFP increases, bankruptcies increase as well.
With our parameterization, it is easy to see that m_{G} = 2.549 × 10^{− 4} so that Δx_{1st} = 2.549 × 10^{− 4} × 50 = 0, 0127. Following the shock, if the distribution of net worth remained unchanged, the employment rate would increase approximately by 1.3 percentage points and the increase of GDP would be ΔY_{1st} = 25.
The second term in Eq. 6.1 is the second round or indirect effect, that depends on the response of the EFP to changes in the crosssectional mean and variance. This response will be provided by the emergent properties of the ABM. In fact we can infer from the simulations that the crosssectional mean and variance go down. The first effect prevails so that the average EFP goes up: the indirect effect is negative.
We can quantify these effects using the long run averages of simulated data before and after the fiscal policy shock shown in Table 3.
As a consequence of the fiscal policy shock (ΔG = 50), the increase of the long run employment rate is Δx ≈ 0.01. Therefore, overall GDP increases by ΔY = 0.01 × 2000 = 20.

The first round effect is positive and sizable: Δx_{1st} = 0.0127;

The RA component of the second round effect is negative, since the steady state crosssectional mean decreases: Δx_{2nd, RA} = − 0.0019;

The HA component of the second round effect is also negative: Δx_{2nd, HA} = − 4.8748 × 10^{− 4}.
The last result may sound strange. After all, the variance has gone down, contributing to depress the EFP. Hence one would expect the HA component of the change in EFP to be negative and the HA component of the change in x to be positive. Notice, however, that a reduction of the long term variance (i.e. V_{1} < V_{0}) that parallels a reduction of the long term crosssectional mean (A_{1} < A_{0}), makes the HA component of the change in EFP negative only if \(\frac {V_{1}}{V_{0}}<\frac {{A^{3}_{1}}}{{A^{3}_{0}}}\). This condition is not satisfied in our case.
The first round effect explains most of the change in the employment rate, being one order of magnitude bigger than the indirect effect. The direct effect is driven by the size of the shock: a 20% increase of government expenditure. The HA component of the second round effect represents about 20% of the entire second round effect.
The novelty of the present model is the indirect effect of the fiscal shock that is due to the impact of the increase of the interest rate on the distribution of net worth. The increase of the interest rate, in fact, hits the accumulation of net worth for each and every surviving firm. Moreover, the number of bankruptcies increases (as shown in panel (f) of Fig. 3) because some firms that were already on the verge of bankruptcy end up with a net worth below the exit threshold. These effects make the cross sectional mean of net worth A to decrease, pushing up the average EFP f. At the same time, however, the variance decreases because the probability mass of the distribution moves towards the exit threshold.^{24} The reduction of the long run variance tends to reduce f. All in all, however, the external finance premium goes up (from \({f_{0}^{L}}\) to \({f_{1}^{L}}\)) because the impact of the reduction of A on f is greater than the effect of the reduction of V. The increase of the average EFP makes the IS curve shift down. We can conclude that the positive impact on the employment rate of an increase in Government expenditure is mitigated by the “second round crowding out effect” following the increase of the EFP.^{25} In the graphical representation of the model, the second round effect is captured by comparing L_{1} to M.
7 A monetary shock
Long run averages
A ^{ L}  V ^{ L}  f ^{ L}  x ^{ L}  r ^{ L}  π ^{ L}  cv ^{ L}  Av. ban.  

\({r^{0}_{n}}= 0.0025\)  1.6545  0.7694  0.031  0.9701  0.0071  0.00036  0.5302  3.2% 
\({r^{1}_{n}}= 0.0050\)  1.6353 ↓  0.7537 ↓  0.0314 ↑  0.9672 ↓  0.008 ↑  0.00023 ↓  0.5309 ↑  3.3% ↑ 
The second term in Eq. 7.1 is the second round or indirect effect, that depends on the response of the EFP to changes in the crosssectional mean and variance. We can infer from the simulations that the crosssectional mean and variance go down and the average EFP goes up.
In order to quantify these effects, we proceed as in the previous section using the long run averages from simulated data before and after the monetary policy shock shown in Table 4.

A negative direct effect (Δx_{1st} = − 0.0026);

A negative indirect RA effect (Δx_{2nd, RA} = − 2.8941 × 10^{− 4}) due to the decrease of the crosssectional mean;

A negative indirect HA effect (Δx_{2nd, HA} = − 1.0050 × 10^{− 4}).
The first round effect explains most of the change in the employment rate. The second round effect is one order of magnitude smaller than the first round effect. The HA component of the second round effect is of the same order of magnitude of the RA effect and represents about 26% of the entire second round effect.
The increase of the interest rate, however, has a second round effect. The long run cross sectional mean A decreases inducing an increase of the average EFP f. This effect is mitigated (but not offset) by the reduction of V. The increase of average EFP has an additional adverse effect on investment and the employment rate. Graphically, the IS curve shifts down along the new TR curve. The final equilibrium position is L_{1}. All in all, we can conclude that the negative impact on the employment rate (and output gap) of a contractionary monetary policy is exacerbated by the increase of the EFP f. In the graphical representation of the model, the second round effect is captured comparing M to L_{1}.
8 A financial shock
In this section we explore the effects of a contractionary permanent financial shock captured by an increase of the exogenous component of the EFP from α_{0} = 0.04 until t_{0} = 599 to α_{1} = 0.05 from t_{0} + 1 = 600 on.
Steady state values
A ^{ L}  V ^{ L}  f ^{ L}  x ^{ L}  r ^{ L}  π ^{ L}  cv ^{ L}  Av. bank.  

α = 0.04  1.6545  0.7694  0.031  0.9701  0.0071  0.00036  0.5302  3.2% 
α = 0.05  1.6411 ↓  0.7626 ↓  0.0391 ↑  0.9618 ↓  0.0027 ↓  0.000001 ↓  0.5321 ↑  3.7% ↑ 
The long run employment rate goes down from approximately 97% (with α_{0} = 0.04) to 96% (with α_{1} = 0.05): Δx = − 0.008.

a negative direct effect (Δx_{1st} = − 0.0072);

a negative indirect RA effect (Δx_{2nd, RA} = − 2.5159 × 10^{− 4})

a negative indirect HA effect (Δx_{2nd, HA} = − 1.3545 × 10^{− 4})
As in the case of previous shocks, the first round effect has a predominant role in determining the overall change in the employment rate. The second round effect is one order of magnitude smaller than the first round effect. Both the RA and the HA effect are negative, but the latter is smaller than the former. The HA effect accounts for approximately 35% of the second round effect.
In M, it is clear that the interest rate has been steered down by the central bank. There are two opposite effects on the individual cost of credit: f_{i} goes up on impact and the interest rate (r) goes down as a consequence of the reaction of the central bank. Notice that we are keeping the distribution unchanged. However, the former effect offsets the latter. In fact we observe that the crosssectional mean of the cost of credit (represented by the sum r + f) goes up. Moreover, in the period in that α rises, the number of bankruptcies increases (as shown in panel (f) of Fig. 7).
The increase of α leads to a reduction of A, which pushes up f. This tendency is mitigated (but not offset) by the slight reduction in V. The increase in f leads to a further decrease in the employment rate. The second round effect is captured graphically by a further downward shift of the IS curve. The final equilibrium will be point L_{1}. We can conclude that the negative impact on the output gap of an increase in the individual EFP is amplified by the further increase in the average EFP.
9 Conclusion

In all the scenarios considered (fiscal shock, monetary shock, financial shock), the first round effect explains most of the actual change of the output gap.

The second round effect amplifies the effect of a contractionary monetary shock and of the financial shock and mitigates the effect of the expansionary fiscal shock. In the latter case, in fact, the financial transmission mechanism contributes to crowding out.

In the case of the fiscal and monetary shock, heterogeneity explains about 30% of the second round effect.

In the case of the financial shock, the entire second round effect is due to heterogeneity.
The benchmark model lends itself to a wide range of possible extensions, such as the explicit consideration of income and wealth inequality among households.
Footnotes
 1.
 2.
In the following we show, in fact, that the aggregate EFP is decreasing with the crosssectional mean of the net worth distribution and increasing with the crosssectional variance.
 3.
A similar procedure, within a different setup, is adopted by Krusell and Smith (1998).
 4.
The moments of the distribution of firms’ net worth, therefore, enter as (predetermined) state variables in the reduced form of the ISASTR model.
 5.
More precisely, the second round effect is determined by the repercussion of the shock on the average EFP, that in turn is determined by the change of the moments.
 6.
The time indicator is t = 0, ... T (with T = 1500 in our simulations).
 7.
Where c[wx_{t} + σ(1 − x_{t})]m_{a} represents consumption of active members of the household, respectively employed and unemployed. While \(\bar c (mm_{a})\) represents consumption of unemployed members of the household.
 8.
Notice that the net worth of the representative firm coincides with the crosssectional mean when the variance is zero. In other words, the representative firm is the zerovariance average firm.
 9.
All the parameters must be intended as positive unless otherwise specified.
 10.
We assume that λ > w so that γ > 0.
 11.
Equation 2.6 guarantees that individual expected profits are positive; realized profits maybe positive or negative depending on the realization of the idiosyncratic shock u_{it}.
 12.
 13.
 14.First, we approximate (2.8) around the crosssectional mean of net worth A_{t− 1} by means of a second order Taylor expansion:where \(\left .\frac {\partial f_{it}}{\partial A_{it1}}\right \vert _{A_{t1}}=\frac {\alpha }{A_{t1}^{2}}\) and \(\left .\frac {\partial ^{2} f_{it}}{\partial A_{it1}^{2}}\right \vert _{A_{t1}}=\frac {2\alpha }{A_{t1}^{3}}\). Substituting these derivatives in the expression above, taking the expected value of the RHS and recalling that < A_{it− 1} − A_{t− 1} >= 0 and < (A_{it− 1} − A_{t− 1})^{2} >= V_{t− 1}, we obtain (2.12).$$\begin{array}{@{}rcl@{}} f_{it}&\approx& \frac{\alpha}{A_{t1}}+\left.\frac{\partial f_{it}}{\partial A_{it1}}\right\vert_{A_{t1}}(A_{it1}A_{t1})+\left.\frac{1}{2}\frac{\partial^{2} f_{it}}{\partial A_{it1}^{2}}\right\vert_{A_{t1}}(A_{it1}A_{t1})^{2} \end{array} $$
 15.
Notice that the output gap, as shown in subsection 3.2, is y_{t} = ηx_{t} − 1.
 16.
The nominal interest rate will be determined residually from Eq. 3.3.
 17.
These restrictions imply an upper bound on the average EFP, that must be enforced across simulations.
 18.
From Eq. 4.3 we infer that the interest rate goes down when the EFP goes up. Hence an increase of the EFP has opposite effects on the crosssectional mean of the individual interest rates: < r_{it} >= r_{t} + f_{t}, which is the sum of the risk free interest rate and of the average EFP. On impact, by construction, the crosssectional mean of the individual interest rates increases one to one with an increase of the average EFP but the equilibrium risk free rate decreases. that effect prevails? Using the definition of the equilibrium interest rate, we get: < r_{it} >= r_{n} − β_{x}(ηx_{2} − 1) + (1 − β_{x}ηx_{3})f_{t}. Notice that, from the definition of x_{3} it follows that 1 − β_{x}ηx_{3} > 0. Hence we can conclude that the direct effect prevails: an increase of the EFP unambiguously increases the average cost of credit. Since investment in the aggregate is \(K_{t}=\frac {\gamma  (r_{t}+f_{t})}{\omega }\) (see Eq. 2.11), investment unambiguously declines when the EFP goes up.
 19.
In the simulations, the crosssectional mean and variance of the distribution of net worth tend to fluctuate around a lsong run value. Therefore, there is a long run mean and a long run variance of the distribution of net worth. We infer from this that the process is ergodic, meaning that there is a tendency for the distribution to achieve a long run shape captured, in our simple framework, by the long run crosssectional mean and variance.
 20.
The assumption on dividend distribution is technical. By assuming that a fraction δ of net worth goes wasted in dividend distribution, we slow down the process of net worth accumulation.
 21.
In fact we set α_{x} = α_{π} = 0.5. Moreover, the inflation target is set, for simplicity, at π^{T} = 0.
 22.
Notice that the long run averages are determined as the average of the time series shown in Fig. 2, that in turn are the time series derived from the Monte Carlo simulations.
 23.
The fiscal multiplier in the absence of monetary tightening would be \(\frac {dx_{0}}{dG}\).
 24.
The empirical distribution of net worth is endogenously determined (by means of the artificial data generated by the ABM) and evolving over time. It has support (\(A_{t}^{min}\), \(A_{t}^{max}\)) where \(A_{t}^{min}\) is the minimum level of net worth and coincides with the exit threshold (that is the same for all the firms) and \(A_{t}^{max}\) is the maximum level of net worth, i.e., the net worth of the wealthiest firm. The distribution is affected by the fiscal expansion through the effect of the latter on the interest rate r_{t}. Since the interest rate goes up, \(A_{t}^{min}\) will increase. Some firms that would survive if the shock did not occur will go bankrupt. Moreover, profit and net worth of the surviving firms will go down. Hence the first moment of the distribution (the crosssectional mean) goes down. The probability mass shifts towards the exit threshold. In this case it is perfectly possible that \(A_{t}^{max}\) will go down, i.e., even the wealthiest firm will be poorer. The variance therefore will go down.
 25.
The first round crowding out effect is due to the increase of the interest rate when we keep the distribution unchanged, as shown by comparing M to L_{0}.
 26.
Fiscal and monetary parameters are incorporated in x_{3}.
Notes
Acknowledgments
Earlier versions of this paper have been presented at conferences and seminars in Ancona, Roma, Guildford, New York, Castellon, Nice and Berlin. We would like to thank participants for useful comments and discussions. We are also grateful to two anonymous referees and the Editor for their detailed comments on an earlier draft, that have led to significant improvements. None of the above are responsible for errors in this paper.
Funding
The authors declare they have received no funding.
Compliance with Ethical Standards
Conflict of interests
The authors declare that they have no conflict of interest.
References
 Agliari A, Delli Gatti D, Gallegati M, Gardini L (2000) Global dynamics in a nonlinear model of the equity ratio. J Solitons Fractals 11:961–985CrossRefGoogle Scholar
 Assenza T, Delli Gatti D (2013) E Pluribus Unum: macroeconomic modelling for multiagent economies. J Econ Dyn Control 37(8):1659–1682CrossRefGoogle Scholar
 Assenza T, Delli Gatti D, Grazzini J (2015) Emergent dynamics of a macroeconomic agent based model with capital and credit. J Econ Dyn Control 50:5–28CrossRefGoogle Scholar
 Bernanke B, Gertler M (1989) Agency costs, net worth, and business fluctuations. Am Econ Rev 79(1):14–31Google Scholar
 Bernanke B, Gertler M (1990) Financial fragility and economic performance. Q J Econ 105(1):87–114CrossRefGoogle Scholar
 Cincotti S, Raberto M, Teglio A (2010) Credit, money and macroeconomic instability in the Agentbased Model and simulator Eurace. Econ: OpenAccess OpenAssess EJ 4:26Google Scholar
 Cincotti S, Raberto M, Teglio A (2012) Debt deleveraging and business cycles. n agentbased perspective. Econ OpenAccess OpenAssess EJ 4:26Google Scholar
 Dawid H, Neugart M (2011) Agentbased models for economic policy design. East Econ J 37(1):44–50CrossRefGoogle Scholar
 Dawid H, Gemkow S, Harting P, van der Hoog S, Neugarty M (2012) The Eurace @UnibiModel: an agentbased macroeconomic model for economic policy analysis. Bielefeld Working Papers in Economics and Management No. 05–2012Google Scholar
 Delli Gatti D, Diguilmi C, Gaffeo E, Gallegati M, Giulioni G, Palestrini A (2005) A new approach to business fluctuations: heterogeneous interacting agents, scaling laws and financial fragility. J Econ Behav Org 56(4):489–512CrossRefGoogle Scholar
 Delli Gatti D, Gaffeo E, Gallegati M, Giulioni G, Palestrini A (2008) Emergent macroeconomics: an agentbased approach to business fluctuations. Springer, BerlinGoogle Scholar
 Delli Gatti D, Desiderio S, Gaffeo E, Cirillo P, Gallegati M (2011) Macroeconomics from the bottomup. Springer, BerlinCrossRefGoogle Scholar
 Dosi G, Fagiolo G, Roventini A (2006) An evolutionary model of endogenous business cycles. Comput Econ 27(1):3–24CrossRefGoogle Scholar
 Dosi G, Fagiolo G, Roventini A (2010) Schumpeter meeting Keynes: a policy friendly model of endogenous growth and business cycles. J Econ Dyn Control 34(9):1748–1767CrossRefGoogle Scholar
 Dosi G, Fagiolo G, Napoletano M, Roventini A (2013) Income distribution, credit and fiscal policies in an agentbased Keynesian model. J Econ Dyn Control 37 (8):1598–1625CrossRefGoogle Scholar
 Gaffeo E, Delli Gatti D, Desiderio S, Gallegati M (2008) Adaptive microfoundations for emergent macroeconomics. East Econ J 34(4):441–463CrossRefGoogle Scholar
 Gallegati M, Palestrini A, Delli Gatti D, Scalas E (2006) Aggregation of heterogeneous interacting agents: the variant representative agent. J Econ Interac Coord 1:5–19CrossRefGoogle Scholar
 Greenwald BC, Stiglitz JE (1993) Financial market imperfections and business cycles. Q J Econ 108(1):77–114CrossRefGoogle Scholar
 Krusell P, Smith AA (1998) Income and wealth heterogeneity in the macroeconomy. J Polit Econ 106(5):867–896CrossRefGoogle Scholar