Crisis propagation in a heterogeneous self-reflexive DSGE model

We study a self-reflexive DSGE model with heterogeneous households, aimed at characterising the impact of economic recessions on the different strata of the society. Our framework allows to analyse the combined effect of income inequalities and confidence feedback mediated by heterogeneous social networks. By varying the parameters of the model, we find different crisis typologies: loss of confidence may propagate mostly within high income households, or mostly within low income households, with a rather sharp transition between the two. We find that crises are more severe for segregated networks (where confidence feedback is essentially mediated between agents of the same social class), for which cascading contagion effects are stronger. For the same reason, larger income inequalities tend to reduce, in our model, the probability of global crises. Finally, we are able to reproduce a perhaps counter-intuitive empirical finding: in countries with higher Gini coefficients, the consumption of the lowest income households tends to drop less than that of the highest incomes in crisis times.


I. INTRODUCTION
Dynamic Stochastic General Equilibrium (DSGE) models [1,2] still constitute the workhorse for monetary policy around the world [3,4].Yet, their poor performance during the 2008 global financial crisis (GFC) [5][6][7][8] have raised a number of questions about their predictive power [9].In recent years, efforts have been made to include in these models ingredients that were sorely missing from the benchmark model [10], like financial markets.Attempts have been made to move away from the "Representative Agent" paradigm, by including different categories of households -hand-to-mouth vs. well-off in TANK (Two-Agent New Keynesian) models [11][12][13][14] -or heterogeneous households with a continuum of possible accumulated wealth, as in HANK (Heterogeneous Agent New Keynesian) models [15][16][17][18][19][20]; see also [21] for a different approach leading to emergent heterogeneities.
Parallel to these developments, macroeconomic Agent Based Models (ABM) are slowly gaining traction [22][23][24][25].The versatility of ABM allows one to investigate the role of interactions and heterogeneities that often lead to interesting (and sometimes surprising) effects at the aggregate level, as a consequence of non-linearities and feedback loops that are absent from classical economic models (see e.g.[24]).Still, ABM are regarded with suspicion by many macroeconomic luminaries, who prefer to stick with "microfounded" models where agents solve an inter-temporal optimisation problem with a budget constraint [26].
A natural question is whether it is possible to extend * michael.benzaquen@polytechnique.edu DSGE models in a direction that would bridge the gap with ABM, in particular by including social interactions and heterogeneities that are the strong selling points of ABM.Our starting point is our recent work [27] where we investigated a multi-household DSGE model in which past aggregate consumption impacts the confidence, and therefore consumption propensity, of individual households.We found that our minimal setup was already extremely rich, leading to a variety of realistic output dynamics, in particular the appearance of crises where consumption drops as a result of an initial exogenous shock, amplified by a collapse of confidence.But while we modelled interactions and feedback loops in [27], we did not account for possible income heterogeneities and network effects.
Here we build upon such ideas and introduce agents that can be assigned different characteristics, such as skill and social environment.At each time step, the consumption level of each household is partially determined by the past realised consumption of its neighbouring agents in a network of social interactions.As we shall see, we find that the phenomenon that we discussed in our previous paper [27], namely the appearance of endogenous demand driven crises, is now more complex, with much more structured consumption crashes that are either restricted to some stratum of the population, or affect the whole population, depending on the distribution of wages and the structure of the social network.
Although we stick with the basic tenets of standard macroeconomic models, our approach departs in several ways from the recent heterogeneous extensions of the DSGE models mentioned above (e.g.TANK or HANK models).First, our heterogeneities affect both income and the structure of the interaction network, the latter being absent (and irrelevant) in TANK/HANK ap-arXiv:2101.05588v1[cond-mat.stat-mech]14 Jan 2021 proaches.Second, our heterogeneities are static (low skill workers do not become high skill workers, and the social network is "frozen"), whereas in HANK models earnings are dynamical variables as agents self-insure against possible loss of wages in the future.In reality, a mixture of the two should be expected: both static and dynamically generated heterogeneities are likely to be present in the population.Third, social interactions lead to selfamplified confidence collapse, absent in TANK/HANK models whereas it is the main feature of our model.
Our model allows one to explore a variety of different possible scenarios.In particular we highlight the presence of two transitions between different regimes of the dynamical evolution of the economy.Varying the parameters that describe how the confidence threshold and the sensitivity to economic fluctuations scale with wages, we find a rather sharp crossover between a regime in which crises affect mostly the wealthier part of the population to a regime in which the recessions involve mostly the agents with a low income level.
We also show that increasing the amplitude of exogenous shocks and/or increasing the global confidence threshold, the model exhibits a transition from a regime in which global crises are extremely rare to a phase in which strong recessions involving the whole population occur with high frequency.We investigate the effect of the parameters that control the strength of the heterogeneities and the social (income-based) segregation, providing intuitive and transparent explanations of their impact on the economy.Our model is extremely versatile and is able to describe a variety of realistic scenarios for crisis formation and its propagation across different social classes.
The paper is organised as follows.Section II is devoted to finding the analytical solution of our heterogeneous DSGE model, starting from the benchmark DSGE model as presented by Gali in [1].In Sec.III section we discuss the role and form of the feedback function, and we introduce wage heterogeneities.We define the network that encodes interactions among agents.In Sec.IV we discuss the choice of parameters, using our previous work [27] as a reference.The qualitative discussion of the results is addressed in Sec.V; we conduct an analysis of economic crises by studying both their distribution across the population and the frequency of the occurrence of global events.Finally, in Sec.VI we compare the numerical simulations of our model with real data, discussing potentials and limitations of our approach.

II. SKILL & WAGE HETEROGENEITIES
As mentioned above, our starting point is our recent work [27] where we presented a homogeneous version of a self-reflexive multi-agent DSGE model.The different ingredients of the model are summarized as follows.

A. Households
We consider N households i = 1, • • • , N who maximise the discounted sum of their present and future utility: where c i t , n i t are the level of consumption and the amount of working hours of household i at time t, f i t the (possibly time dependent, see below) utility of consumption and γ i the disutility of work.Utility maximisation is subject to the classic budget constraint: where p t the price level of goods, w i t the wage of agent i and B i t the amount of bonds paying 1 at time t + 1, the value of which being (1 + r t ) −1 at time t, where r t is the interest rate.
The maximisation is performed using Lagrange multipliers with respect to the quantities c i t , n i t , B i t .This gives the household state equation: where we introduced the real wages ω i t = w i t /p t .One also obtains the Euler equation governing inter-temporal substitution of consumption: where π t+1 = p t+1 /p t − 1 is the inflation rate.This equation will not be used in the rest of the paper, as we will not be concerned with inflation at this stage (for a short inroad into inflation within the homogeneous version of the model, see [27]).

B. Firms
The production sector is made of a representative firm which uses different skills, corresponding to different productivity levels z i among agents.We posit that the firm level of production Y t is given by a Cobb-Douglas function with i z i n i t as the effective number of working hours: where z t is an overall productivity factor, subject to exogenous shocks, and α < 1 is a parameter henceforth set to the standard value 1/3.The pre-factor N α in (5) ensures that both the aggregate consumption and the production are proportional to the size of the population N .The firm's profit P t is then given by: The firm maximises P t with respect to the individual labour supply n i t , under the assumption that the market will clear, i.e.
Such maximisation provides the following relation between real wage ω i t and productivity z i of each agent: Using Eqs. ( 3) and ( 8), the market clearing condition (7) becomes: Given the set of {γ i } and {f i t }, Eq. ( 9) describes an N − 1 dimensional manifold where the solutions n i t must lie.Now, plugging Eq. ( 8) into the profit function (6), one finds that Thus, among the set of possible solutions described by (9) we retain the one maximising the sum Z t .Introducing again Lagrange multipliers, one can show that the optimal solution is given by i.e. each term of the sum in Eq. ( 9) is zero.Combining Eqs. ( 8) and (3) finally yields: Eqs. (8) and (11) are our central theoretical results.Eq. ( 11), which appears to be new, gives the general solution of a generalised DSGE model with many heterogeneous agents, while keeping most of the original DSGE fully rational agent paradigm intact up to now.
To move forward, we need to specify the distribution of skills z i over the population, as well as the dynamics of the overall productivity factor z t .
Since in our model real wages are proportional to skills (see Eq. ( 8)) we take inspiration from empirical data, which shows that wages follow an exponential distribution, except in the extreme tails where it becomes fatter (possibly Pareto-like), in part due to returns on investment, see e.g.[28].In order to keep the model as parsimonious as possible, we therefore assume that the distribution of z i in the population is given by: This exponential distribution has a mean given by E[z] = z min + µ, which can be considered as a proxy for the GDP per household of the corresponding economy.The distribution of wages is also characterised by a Gini coefficient G, which is a measure of the inequalities in our economy: Hence, G → 0 when µ z min (egalitarian society) and G → 50% when µ z min .Stronger inequalities (i.e.50% < G ≤ 1) would require a different functional form, with, for example, extra power-law tails, or a Dirac mass at z = z min .The quasi-totality of European countries have a Gini index ranging between 24% and 35% while more unequal societies, such as the US, have Gini's > 40% [29].
Exogenous shocks are encoded into the idiosyncratic noise z t that we write as z t = e ξt , where ξ t follows an AR(1) process: where we fix η = 0.2 (the parameter η only affect the time-scale of the memory kernel of the stochastic process).This corresponds to assuming that all individual productiveness z i are subject to the same exogenous shock.One could consider a richer model where different skills are affected by different shocks, but we leave such an extension for future investigations.Note that the most probable value of z t is unity (i.e.ξ t = 0), which corresponds to what we will call "normal" or "baseline" conditions.

III. SOCIAL NETWORK AND SELF-REFLEXIVITY
We now discuss the specific form of the consumption propensity f i t or, equivalently, its (re-scaled) square-root F i t defined in Eq. (10).Following Ref. [27], we assume that the consumption propensity of agent i at time t depends on the realised consumption at time t−1 of some of the other agents of the economy (self-reflexivity), which are coupled to i via an interaction network J ij : where F is a certain function the argument of which is the local average of the consumption at time t − 1 of "neighbours" on the network, i.e. the agents j for which The specific choice of this interaction network will be discussed in details below.
Here we start by focusing on the properties of the feedback function F i .In our recent work [27] we have shown that a generic S-shaped function suffices to induce multiple equilibria, with stochastic switches (corresponding to economic crises and recoveries) between them.As in [27] we choose a logistic function of the form: The parameters ν i min > 0 and ν i max > ν i min represent the minimum and maximum levels of labour that household i can possibly provide (Eq.( 10)); c i 0 is a "confidence threshold" where the concavity of F(c) changes.Intuitively, c i > c i 0 tends to induce a high confidence state, while c i < c i 0 a low confidence state.θ i > 0 is the steepness of the function F i close to the threshold level, setting the width over which the transition from low confidence to high confidence takes place, and is related to the agents' sensitivity to consumption's changes.
In order to fully specify the model, we still need to define the interaction network i.e. the link variables J ij .We base our choice on a number of studies indicating that households sharing the same level of wealth tend to cluster together (see for example [30,31]).For example, in large cities, the real estate market is such that people sharing a comparable level of income populate the same neighbourhoods, and therefore attend the same schools, facilities and many other public infrastructures.Following this reasoning, we set J ij = 1 with probability p ij and J ij = 0 with probability 1 − p ij , where p ij is given by This implies that agents with similar wages (i.e.|z i − z j |/(z i + z j ) small) are more likely to be in contact (i.e.J ij = 1) than agents in different social classes (i.e. The stratification and the level of segregation of the society is tuned by the parameter λ: when λ 1, wage differences become irrelevant whereas when λ 1 interactions are almost exclusively within the same social group.The factor C/N in Eq. ( 17) ensures that each household interacts with a small average number C of other households.In fact, to be more precise, in the following we will consider "random-regular graphs" of fixed connectivity C [32], which are defined as a graph chosen uniformly at random among all possible graphs of N nodes such that each node has exactly C edges connecting it to its neighbours.
The procedure that we implement to build the network goes as follows: 1. We first assign a wage level z i to each of the N nodes of the network, which are iid variables extracted from the distribution (12).
2. We build a random-regular graph of fixed connectivity C.
3. The links are then rewired through a Monte Carlo algorithm.In order to keep the connectivity fixed we proceed as follows: We assign to any configuration an energy equal to H = i,j |z i − z j |/(z i + z j ), where i, j designates pairs of neighbouring agents.From the randomly generated graph, we pick at random two links, say i → j and k → and we swap the connections to i → k and j → .We compare the energies of the old configuration, H old with that of the rewired configuration, H new .The new configuration is kept with probability min(1, e (H old −H new )/λ ).This process is repeated until a stationary state is reached.It is possible to show rigorously that the probability distribution at equilibrium is given by Eq. ( 17).
While one could have made a number of alternative choices to model heterogeneities in both income and social interactions, we believe the setting introduced above is general and simple enough, and contains the essential features that we want to account for.
It is worth adding that in this paper we only focus on symmetric interactions matrices (i.e. if j influences i then i equally influences j) and leave the generalisation to directed networks to a future investigation.

IV. PARAMETER SPECIFICATIONS
In this section we propose reasonable and parsimonious specifications for the different parameters defined in the previous section.

A. Wage distribution
The exponential distribution of wages, Eq.( 12) has two parameters, governing the average wage and the Gini coefficient.In order to disentangle the two effects, we first investigate the model with a fixed value of E[z], arbitrarily set to 2, and vary µ in the interval [0.2, 1.8], corresponding to Gini coefficients (given in this case by G = µ/4) between 5% and 45%.As discussed above, the average productivity level E[z] represents the average income and is essentially proportional to the GDP per capita of one country.When comparing the predictions of our model to real world data, we will relax the constant salary mass hypothesis and impose it to be proportional to the GDP/capita.This extension is discussed in detail in the last section of this work.

B. Feedback function
The feedback function is specified, for each agent i, by four parameters: ν i max , ν i min , c i 0 and θ i .We assume that the minimum amount of labour provided by an agent i, ν i min , is the same for each agent and equal to zero.(For practical convenience we fix it to a very small value, ν i min = 10 −3 .)Similarly, the maximum amount of labour ν i max can be set to 1, independently of i.Using Eq. ( 11), this implies that consumption c i in booming times is proportional to income z i , as expected.
The most important parameters of the feedback functions are c i 0 and θ i .We assume that these parameters only depend on the income of each agent as detailed below.In this way we are able to reduce drastically the number of free parameters of the model.The c i 0 's play a key role as they correspond to the threshold below which the households' confidence collapses.In a recent article by D. Jacobe,2 it is reported that in the early stages of the 2008 GFC the wealthier part of the population was also the most pessimistic about the state of the economy.To account for this effect, we set the confidence threshold of each household c i 0 to be an increasing function of its income level, and hence of its productivity level z i , modulated by an exponent β 1 ≥ 0: where c0 is a global trust level that we assume to be determined by country specific economic policies, culture, etc.The larger the value of β 1 , the stronger the dependence of the confidence threshold on income.
In order to gain some intuition about the specification of the sensitivity parameters θ i , we use as a guide the phase diagram established in the homogeneous case in [27], recalled in Fig. 1.Depending on the values of θ and c 0 one can distinguish four zones in the phase diagram that encode different properties of the economy.Phase A delimits the area of the standard DSGE model, where we do not observe any economical crisis, zone B + allows for short-lived economical recessions, the C phase admits a second equilibrium and correspondingly allows for crisis and economical recoveries with comparable probability and duration.Finally zone B − represents the set of parameters for which the system is systematically in a state of crisis.Over such a phase diagram we draw two possible "trajectories" for θ(c 0 ): in blue a convex decreasing relation and in red an increasing one.Both curves cross different phase transition lines, but the blue one seems a more natural choice.Actually, we find that along the red curve it is almost impossible to find a set of parameters for which all the agents belong to the same phase and, moreover, the richest part of the population is systematically exposed to the economic crisis regardless of the choice of parameters.
For these reasons we discard the "red" option and parameterise θ i (c i 0 ) as: where θ represents the global sensitivity scale and the exponent β 2 > 0 enforces a monotonic decreasing dependence between θ i and incomes.When β 2 = β 1 , the width θ −1 of the transition region scales as the consumption threshold c 0 itself.When β 2 < β 1 on the other had (as we will find empirically), this width increases slower that c 0 , meaning that high incomes are (on a relative basis) more sensitive than low incomes to a drop of consumption of their neighbours.Visually, when θ increases the blue line is globally shifted upwards, while if c0 increases it is shifted to the right.When β 1 , β 2 → 0, c i 0 = c0 and θ i = θ, behavioural heterogeneities are switched off and the model leads to a phenomenology very similar to the one reported in [27].We are thus left at this stage with only four parameters: β 1 , β 2 , c0 , θ.Although seemingly restrictive, this setting gives rise a rich phenomenology that we are going to analyse in the next sections.

A. Numerical results
In our previous article [27] we showed how the introduction of the feedback function can destabilise the standard DSGE equilibrium.In the C phase the selfconsistent solution for the consumption has two fixed points allowing the system to switch from a high to a low consumption state.As shown in the phase diagram of Fig. 1, the confidence threshold c 0 modulates the probability of jumping from a high consumption state to a recession regime (this probability increases with c 0 ).In the present work this mechanism remains unchanged but the chain of events that bring the consumption of agent i to collapse is more intricate.Figure 2 gives some insights about the possible scenarios.
The three pairs of panels shown in Fig. 2 display the crisis propagation for three different choices of the parameters β 1 and β 2 , for fixed values of θ and c0 .We also compare segregated (top row) and non-segregated networks (bottom row).In the segregated case we observe that crises form suddenly and then slowly abate.
Changing the values of β 1 and β 2 , e.g.moving from the left to the right panels affects dramatically which social class undergoes consumption-driven crisis.In the left panels, for instance, crises spread almost exclusively from the poorest end of the population towards the middle class and only sporadically affect the whole system.In the central panels we observe a different scenario: the recessions originate with almost the same frequency from the richest or the poorest part of the population and affect both social classes with the same intensity.Finally in the right panels crises always start from the richest agents and propagate towards the middle class and only in very few cases affect the whole population.
In the bottom row of Fig. 2 (non-segregated networks) we observe that for the three choices of β 1 and β 2 , only the shape and duration of the recessions are affected compared to the segregated case.Recessions spread more uniformly and are shorter.
Below we explain how to rationalise these observations.

B. A path across the phase diagram
In the limit of strongly segregated networks (λ 1), the only connections are between agents that have very similar income and, therefore, very similar values of θ and c 0 .Their consumption obey a self-consistent equation very similar to the one studied in our previous paper [27], but with wage dependent parameters: where the time dependence of the consumption c is neglected in the absence of productivity shocks.As discussed in [27], depending on the choice of the parameters θ and c 0 , Eq. ( 20) can have 1, 2 or 3 solutions.In the homogeneous case, the representative agent occupies a single point in the phase diagram of Fig. 1.In the limit of strong segregation, each social class occupies a different spot of the phase diagram.The union of these spots form the lines drawn in Fig. 1.
The shape and the location of these lines strongly depends on the values of β 1 and β 2 , as shown on the rightmost panels of Fig. 2 (the colour of each of those panels are chosen match the one of the corresponding dynamics).The top graph shows that agents with lower income are living in the C phase (bi-stable economy) while the steep decrease of θ with z, allows the richer households to cross the C → B + phase line.This reflects the dynamics shown on the corresponding panels.
In the middle panel the whole population lies within the C phase, explaining why crises form from both sides of the income spectrum.Finally the bottom panel, although very similar to the previous case, reveals an important difference: households with a lower salary are closer to the line separating the phases C and A/B + .This affects the probability for the lower income class to suffer a drop of consumption, which is decreased compared to the middle panel case.

C. The myopic effect of segregation
The arguments given above are rigorous in the limit of segregated societies, but cannot explain the strong influence of λ on the typology of crises.As revealed by Fig. 2, changing the structure of the interactions leads to a drastic modification of the shape and duration of the recession spikes.In fact, by varying the segregation of the network, we affect the correlation between the average income of the households (on which agents' trust is based) and one's own income.
In a clustered society (λ 1), the aggregate consumption of a family's neighbours is similar to the consumption of the agent itself.This creates an effect of myopia as agents probe the health of the economy only to a local scale.In this case, contagion effects are maximised.As social segregation increases the fragility of the social class most exposed to an economical recession, as each agent is connected to others sharing a comparable wage and living in the same phase.Hence we expect a sort of avalanche effect, as one agent's drop in consumption induces, with higher probability, the trust collapse of its neighbours.
On the contrary, in a non-segregated society agents base their trust in the economy by picking few agents chosen at random.This allows, for instance, the consumption of a low-wage person to be boosted by that of a wealthier neighbour, improving his own trust in the economy, and vice versa.Diversification improves stability in this case: the domino effect is much weaker in the non-segregated network due to the fact that heterogeneous income level of the neighbours decreases the effects of the feedback function.Therefore the crises in the nonsegregated case are shorter and rarer, and can only be produced by a stronger exogenous shock.
The main message is thus that diversification of information sources increases resilience.In fact, comparing the top and bottom panels of Fig. 2 we see that several small spikes in a non-segregated society coalesce in a unique recession event when segregation is strong, due to the avalanche effect described above.

D. Exogenous shocks and global crises
After having investigated which households are the most affected by an economical recession, we now discuss how the size of the crises depends on those parameters, regardless of the social class.In order to do that, we introduce the quantity x <,t , defined as the fraction of households being in a low consumption state at time t, independently of the income level: where Θ is the Heaviside function: Θ(x > 0) = 1 and Θ(x ≤ 0) = 0.In the top panels of Fig. 3 we draw the (logarithm of the) probability p(x < ) of observing a crisis of "size" x < , for different values of the income inequalities, of the exponents β 1 and β 2 , and for segregated and non-segregated networks.
In the panels where β 1 = 0.1 (topmost panels) we observe a transition from a uni-modal to a bi-modal distribution as µ is decreased, i.e. as inequalities decrease.For low values of µ the probability distribution has two peaks: the first one in x < ≈ 0, describing a well functioning economy where most of the agents are in the highconsumption state, and the second one in x < ≈ 1, corresponding to global crisis where nearly all agents are in a recession state.In the uni-modal regime at larger µ, instead, the probability becomes roughly exponential in the crisis size x < .
In the uni-modal regime most crises only affect a limited fraction of the population, and only very rarely hit the whole population (as in the examples shown in Fig. 2).Conversely, in the bi-modal regime recessions are mostly global.This can be rationalised by recalling that in the limit µ → 0 all the agents have the same income, skills, and baseline consumption levels.We thus recover the results of the homogeneous model [27] in which only two states are possible (the whole population is in the good state or in the low-consumption one) and x < is either 0 or 1.
Introducing wage inequalities allows for the possibility of having intermediate crises, that only affect a finite portion of the agents, thereby reducing the probability of a global crunch.
Comparing the right and left panels, we notice that the level of segregation does not have a major influence on the shape of the distributions p(x < ) (even though the crisis dynamics itself is strongly affected by λ, as shown in Fig. 2).
At this point, the question that we still need to address is the following: what parameters affect, and how, the probability of having a global consumption crisis?
In order to answer this question we introduce the prob- ability P of observing a global crisis, which is defined as an event in which the consumption of more than 80% of the population drops below their own level c i 0 , i.e.
P plays the role of an order parameter for the unimodal/bi-modal transition described above, as it is very small in the uni-modal regime and takes appreciable values for bi-modal distributions.
In our previous work [27] we have shown that in the homogeneous case the crisis probability strongly depends on the amplitude of the external shocks σ and on the global confidence threshold c0 .In the lower panels of Fig. 3 we plot the dependence of P on σ for different choices of the other parameters.For the sake of clarity, in each panel we keep three of the four parameters c0 , θ, β 1 and β 2 fixed, and let one of them vary (as indicated in the legends).In each panel we also show different curves corresponding to several values of µ.
We find that the probability of having a global crisis becomes non zero beyond a certain critical amplitude of the noise, σ c .We further observe that σ c decreases with increasing c0 and/or θ.This result agrees with the simple intuition that for lower global confidence, or, similarly, stronger global sensitivity, global crises can be triggered by a smaller exogenous shock.In other words, referring again to the phase diagram shown in Fig. 1, an increase in c0 at constant θ shifts the the system to the right, whereas an increase of θ shifts the system upwards.Households are thus pushed deeper into the C phase and are more frequently exposed to global economic crises.The effect of β 1 and β 2 on P and σ c is rather weak, as is the influence of segregation -see Fig. 4. Hence β 1 and β 2 have an impact on the social class that is more frequently affected by the crises, but not on the probability of having a global recession.
Finally, the same figure shows that increasing inequal- We restrict the analysis to three values of µ : 0.2, 1.0 and 1.8.In each panels the intensity of the colour reflects the income inequality µ as in Fig. 3.In each graph the global colour represents the level of segregation: when blue λ = 0.01, when red λ = 100.We study the dependence of P on four parameters: in each couple of graphs (segregated and non segregated network) we let one parameter between c0, β1, θ and β2 vary and we keep the other three constants.When kept constants the parameters take the following values: c0 = 0.25, θ = 4 and β1 = β2 = 0.1.The varying parameter is represented with different line style, and the legend is shown within each panel.
ities (higher values of µ) generally lowers the probability P of having a global crisis, and increases the critical value σ c .This is consistent with the content of the upper panels: as discussed above, increasing µ favours (in our model) the formations of smaller crises, that only affect a certain fraction of the population and reduces the exposure to global crises of the whole population.
However the conclusion that more inequalities lead to a smaller probability of global crises is possibly misleading, as it neglects an important effect not accounted for in our model, namely the dependence of the global "panic" level c0 on the Gini coefficient G. Indeed, a recent report from the OECD pointed out that "societies with a strong middle class also experience higher levels of social trust (...).Today, however, middle-class households became increasingly anxious about their economic situation (...) given that middle incomes have not benefited from economic growth as much as upper incomes (...)" [33].In other words, higher income inequality should also raise the value of confidence threshold c0 , leading to a more unstable society.It is not obvious which one of the two effects (stabilizing vs. destabilizing) is dominating.We in fact suspect that the influence of inequalities on c0 is non-linear, and only mild when inequalities are moderate.

VI. EMPIRICAL DATA
The results of the previous sections show that the model can reproduce a broad spectrum of possible sce-narios for the formation and the propagation of economic crises across a society with stratified income levels.
In this final section we will exploit such versatility to compare the output of the model with real data, discussing differences and similarities when key parameters are modified.This exercise is not easy, as empirical data on the level of consumption for different income groups is not always available and/or complete for each country.On the other hand, data on income distribution exists.
Our aim here will be to exploit the available data to show that there is a region of the parameter space that is consistent with empirical observations on the relative drop of consumption of poorest compared to that of the richest during a crisis.
However, since income data also includes returns from financial investments, our assumption that income has an exponential distribution is not adapted to describe the high tail, for which a power-law is more adequate [28].It may in fact be that a substantial part of the effect reported below results from financial losses, and not from the contagion effect captured by our modelexcept perhaps in an effective way, see below.
The data set we have explored is available from the website "Our World in Data" [34].It provides information regarding the consumption of the richest and the poorest decile, called respectively c a 90,t and c a 10,t , for a large range of years t and countries a.Furthermore, we refer to levels of GDP per capita, which is available on the same platform.The main interest of our study is to understand how heterogeneities and income inequalities affect the response of the population in a crisis scenario.
The quantities c a 90,t and c a 10,t are typically provided for each year t, but in cases where they are omitted, we interpolate the missing data point of the two closest available data points. 3In order to track and compare the time evolution of the consumption of the highest and the lowest deciles, we compute, for each year t and country a, the relative difference: It is clear from the definition that when δc a ,t assumes negative values it means that the consumption of the -th decile of country a has dropped in the time lapse of one year.We define such an event as a recession that affected at least one extreme of the population, i.e. either δc a 90,t < 0 or δc a 10,t < 0. To monitor how unequally such crises affect the population, we introduce the indicator ∆ a t defined as: ∆ a t = δc a 90,t − δc a 10,t .
This quantity ∆ a t captures how economic crises spread in the society: 1.If ∆ a t < 0 the richest decile undergoes a greater relative drop in consumption during the crisis compared to the poorest decile.
2. If ∆ a t > 0 the poorest decile experiences the largest relative consumption drop.
The other key elements of our model are the segregation index λ (for which we have no direct data) and income inequalities, described by the Gini index G a t associated to country a at date t.We also cut our sample into rich countries, GDP/cap.larger than the median, and poor countries, with GDP/cap.less than the median.
The processed data is displayed in Fig. 5 where we show ∆ a t versus G a t , for all available years t and countries a (without distinctions).To better visualise the GDPs we set the size of the markers (x) proportional to its value and we choose to adapt the grey level accordingly: light grey corresponds to high GDPs, and dark grey to low GDPs.For the following discussion we will refer to ∆ as being the set given by ∆ a t , ∀a, t.We observe that ∆ exhibits a negative overall correlation with G: C(∆, G) ≈ −0.126.This is compatible with our assumption that β 1 > 0, i.e. that the confidence threshold of the high earners is higher than that of the low earners (meaning that transition to a low consumption state is more probable for higher wages).Indeed, it is difficult for low incomes to reduce what is already the bare minimum consumption.
In order to calibrate the model in a realistic way as to reproduce these observations, we drop the fixed average salary E[z] hypothesis (which has been used in the previous sections to explore the possible scenarios of the model) and we set E a [z] ∝ GDP a /capita. 5he GDP/cap. of the United States will be used as a reference for the other countries.Without loss of generality we fix the average wage in the US to some arbitrary  G, for different choices of parameters: β1, β2 and λ = 0.01 (segregated) or λ = 100 (non segregated).We fix as constants: c0 = 0.5, θ = 4, σ = 1.For each combination of parameters, several independent simulations are performed, during which the time evolution of ∆t is calculated and then averaged, conditioned to a crisis, i.e. either δc90 < 0 or δc10 < 0. We further distinguish between countries having a GDP/cap.higher and lower than the median value of the available data.The reference value of the regression for empirical data is displayed at the bottom row of the table.
value, say E[z] US = 10.Having thus fixed the value of E a [z] = 10 × GDP a /GDP US and the Gini coefficient G a , the value of µ a is uniquely determined by Eq. ( 13).
For definiteness, we set the global sensitivity θ = 4, the global confidence level c0 = 0.5 and the amplitude of the noise to σ = 1, independent of a. θ and c0 can be changed quite a bit without affecting the quality of the final result, provided β 1 and β 2 are slightly modified as well.The value of σ cannot be too low (otherwise crises almost never happen) nor too high (otherwise crises are too frequent), so σ = 1 is a reasonable compromise.The most relevant parameters turn out to be the segregation level λ, and the exponents β 1 and β 2 , which we scan but again uniformly across all countries.
We test our model for different combinations of the parameters running several simulations, each of which is based on the empirical data.Unlike the real data, FIG. 5.The panel shows the numerical simulation corresponding to the parameters that best fit real data, i.e. β1 = 0.5, β2 = 0.3, λ = 0.01.The brightness and the size of each point is proportional to the GDP per capita: the bigger (or brighter) the dot is the stronger is the economy it represents.In each panel the markers ('x') correspond to real data and are shown in shades of grey.The solid black line is the linear regression through real data, which is found to be very similar for rich countries and for poor countries.The horizontal dashed black line shows the reference line ∆ = 0.The two coloured lines represent the linear regressions (errors on the regressions are also displayed as coloured bands) for low GDP/cap.countries (dark blue) and high GDP/cap.countries (light blue), again very similar to one another and to real data.The upper panel shows a numerical realisation of the crisis dynamics, as in Fig. 2, for the same values of β1, β2, λ and with G = 0.411 and E[z] = 10, corresponding to the US economy in 2016 [35].In this example, low income households are more frequently in a low consumption state, although occasional crises also hit high earners (see left part of the time series).
where GDP/capita does not influence much ∆ (the linear regression has a coefficient of −1.8 × 10 −3 when GDP/capita < median and −1.7 × 10 −3 otherwise), our simulations give a linear regression that depends quite strongly on GDP/capita.
We thus split our analysis of the correlations between ∆ and G into countries having a GDP per capita greater and smaller than the median of the points considered.The results for the numerical values of the linear regressions of the outcome of our simulations are listed in Tab.I, together with the parameters explored.
We observe that the calibration of our model is very sensitive to the choice of β 1 and β 2 , as the results differ greatly from case to case.Only for some values of the pa-rameters do the simulations display a negative correlation between ∆ and G independent of the level of GDP/capita.All other combinations of parameters are unrealistic and therefore discarded.We observe in particular that in the non-segregated scenario (λ = 100) there is no choice of β 1 , β 2 that is compatible -even qualitatively -with empirical values.
On the other hand, when considering a segregated network (i.e.λ = 0.01), when β 1 = 0.3 and β 2 ∈ {0.1, 0.3}, or β 1 = 0.5 and β 2 ∈ {0.3, 0.5} (underlined and in italics in Tab.I) our results are consistent with empirical data, both in terms of sign and magnitude.The results corresponding to the best case scenario is superimposed to real data in Fig. 5. (We set the brightness of each point dependent to GDP/capita: the greater the brighter.) The role of segregation is quite an interesting outcome of our calibration exercise.It suggests, as is intuitively plausible, that contagion effects are mostly within social classes, and less across social classes.As we noted above, our model does not properly account for financial crises, which chiefly affects the high income class.However, a segregated network allows one to describe in an effective way the correlation in high income consumption shocks.
A better way to model these shocks would be to allow productivity shocks ξ t (defined in Eq. ( 14)) to be correlated between individuals belonging to the same social class, with a variance also depending on outcome (and therefore on countries as well, through GDP/capita).We leave this for further investigations, as one would need more micro data to calibrate such an extended model.

VII. SUMMARY, CONCLUSION
Let us summarise what we have achieved in this paper.First, we have extended the self-reflexive DSGE framework to heterogeneous households, which differ by their income level and by their social network.Consumption is therefore also heterogeneous and is given by Eq. ( 11), which appears to be new.Confidence feedback is mediated through the social network of each agent, which we assume to be either within social classes only (segregated network), or across social classes (non segregated network), with a parameter allowing one to smoothly interpolate between these two extremes.Depending on the specification of the confidence feedback function, we find a rich variety of possible crises types: propagating mostly within high income households, or mostly within low income households, or else, in a narrow parameter region, across the whole society.Interestingly, we find that crises are more severe for segregated networks, for which contagion effects are stronger.Inter social class interactions tend to blunt the propagation of pessimism, because agents belonging to different social classes have different sensitivities to economic shocks.We also find that more income inequalities lead to a small probability of global crises (all other parameters being kept fixed).However, this conclusion should be taken with a grain of salt, as other effect affecting confidence (such as insecurity, social violence, etc.) are not accounted for in the model -although there is room to extend the model in that direction as well.
Finally, we have compared the prediction of the model with real data, that quantify the relative drop of consumption of the lowest income decile vs. highest income decile during recessions.Perhaps counter-intuitively, we find in more unequal countries (with high Gini coefficients), the consumption of the lowest income households tend to drop less than that of the highest incomes.This trend is mostly driven by the Gini coefficient and not by the country GDP/capita.Our model can be calibrated to reproduce such an empirical finding -in fact only a small region of the parameters is compatible with the sign of the empirical effect.In particular, we find that the segregated network hypothesis is strongly favoured by the data, although other mechanisms, like financial market fluctuations, may lead to similar effects.
As with all models, many possibly relevant features are left out in our model.We however hope that the framework proposed here -which allows to mix together income inequalities and confidence feedback mediated by heterogeneous social networks -can be welded with other approaches, such as popular HANK models for example [16].This would improve our understanding of economic recessions and their impact on the different strata of the society.

FIG. 1 .
FIG.1.In the figure we show a sketch of the phase diagram as in the homogeneous case, with highlighted the different phases and their properties.In red and blue we draw two possibilities for the choice of the θ(c0).The arrows point in the same direction as the increase in wages' levels.This figure is meant to be a guide to help the reader to understand the model and the choice of parameters.

FIG. 2 .
FIG.2.The graphs show the crises dynamics for three choices of the parameters, together with the relative phase diagram, using the same colour code.In the main panels, the abscissa is time and the ordinate are households, sorted by increasing wage.Colour appears when one agent's consumption drops below its corresponding threshold.In the 3 right panels sketching the phase diagram, the dashed line indicate the boundaries of the C phase while the plain line represents the locus of c0 and θ for different households.The three dynamics differ only by the choice of the couple β1 and β2, while the global levels of θ = 4 and c0 = 0.5 are kept constant, together with the level of income inequalities µ = 1.5.For the upper set of graphs, the network is segregated, λ = 0.01, while the bottom ones are with λ = 100.Note that the typology of crises changes substantially between the two cases.

FIG. 3 .
FIG.3.The panels show the probability distribution of the crisis size, x<, for different choices of the parameters.The blue curves show the results for the segregated case, λ = 0.01, while the red ones represent the non-segregated scenario, λ = 100.Each panel is dedicated to a couple β1, β2 for five values of µ ranging from 0.2 to 1.8.θ = 4 and c0 are kept fixed.

FIG. 4 .
FIG. 4. The panels show the probability of a global crisis P as a function of the exogenous shock amplitude σ ∈ [0.1, 2.1].We restrict the analysis to three values of µ : 0.2, 1.0 and 1.8.In each panels the intensity of the colour reflects the income inequality µ as in Fig.3.In each graph the global colour represents the level of segregation: when blue λ = 0.01, when red λ = 100.We study the dependence of P on four parameters: in each couple of graphs (segregated and non segregated network) we let one parameter between c0, β1, θ and β2 vary and we keep the other three constants.When kept constants the parameters take the following values: c0 = 0.25, θ = 4 and β1 = β2 = 0.1.The varying parameter is represented with different line style, and the legend is shown within each panel.

TABLE I .
This table documents the coefficients of linear regressions of numerical ∆s as a function of the Gini coefficient