Informal Risk-Sharing Cooperatives : The Effect of Learning and Other-Regarding Preferences

We study the dynamics of risk-sharing cooperatives among heterogeneous agents. Based of their knowledge on their risk exposure and the performance of the cooperatives, agents choose whether or not to remain in the risk-sharing agreement. We highlight the key role of other-regarding preferences, both altruism and inequality aversion, in stabilizing less segregated (and smaller) cooperatives. Limited knowledge and learning of own risk exposure also contributes to reducing segregation. Our finding shed light on the mechanisms behind risk-sharing agreements between agents heterogeneous in their risk exposure.


Introduction
The risk to which agricultural population in developing countries is exposed has been shown to be very important. The most striking fact is the lack of formal insurance, which pushes individual to articulate different risk-coping strategies relying on informal arrangements with other individuals of their network Morduch [1995]. Apart from agronomic choices that can aim at reducing risk, two dimensions can be principally used as risk-coping strategies: either smooth consumption in time (mostly through savings, lending, debts within the close network), or smooth consumption across a population, following a risk-sharing system in a group Alderman and Paxson [1992]. Access to money being limited in most agrarian villages in developing countries, and inflation being very high, this later strategy is very common, and risk-sharing can be observed very generally. We want to consider here repeated risk-sharing within informal cooperatives, among agents who are heterogeneous in their risk while performing the same activity. More precisely, we would like to study one observable feature of risk-sharing, which is that less risky agents would accept to share with more risky ones on a regular basis DeWeerdt and Fafchamps [2011].
In this paper, we are interested in testing some explanations to a risk-sharing dynamics that would enable the production of cooperatives mixing agents with different risk exposure. study here the evolution of informal risk-sharing cooperatives when transfers are driven both by risk-sharing perspectives and other regarding preferences.
The importance of other-regarding preferences -and more precisely of altruism -in the economy of gift giving and transfers goes back to Arrow [1981] and has been surveyed by Mercier-Ythier [2006]. Moreover, altruism has been shown to be empirically relevant in explaining risk-sharing (see DeWeerdt and Fafchamps [2011]). The theoretical impact of altruism on risk-sharing has been recently studied by Alger and Weibull [2008] and Alger and Weibull [2010] in the case of pairs and by Bourlès et al. [2017] in the case of arbitrary networks. Alger and Weibull [2008] highlights the importance of altruism as a social norm that allows to enforce transfers, whereas Bourlès et al. [2017] show that bilateral altruism can lead to a long chain of transfers, in case of income shocks. We complete this analysis by considering agents heterogeneous in terms of risk exposure. We also study an alternative modeling of other-regarding preferences, by analyzing how inequality aversion (a la Fehr and Schmidt [1999]) changes our results.
Few papers have tackled yet the effect of heterogeneity in risk exposure. From a theoretical point of view, Bourlès and Henriet [2012] analyze the incentive compatible contract between two-agents who can be heterogeneous in their probability distribution of wealth. They notably show that an equal-sharing of risk is then optimal if risk aversion is high enough and heterogeneity is low enough. Empirically, DeWeerdt and Fafchamps [2011] confirm that transfers can occur between agents heterogeneous in terms of risk exposure, as chronic illness does not deter informal agreements. Our paper contributes to explain this finding by other-regarding preferences but also by imperfect information and learning of ones own risk exposure.
In our model, agents' learning of their profile is central and is based on the observation of past realizations only. In general, learning is used when agents have limited ability to compute or limited information. In the first case, agents are not able to grasp the whole complexity of a problem and need several attempts to find out the best response. It is related to models in game theory, where learning models generally help to explain the gaps between theory and experimental results (Roth and Erev [1995], Camerer and Ho [1999]). It also fits in Agent-based Computational Economics (ACE), a more recent branch of economics (Kirman [2010], Rouchier [2013]. The use of this technic is justified mainly when agents have to learn about an evolving environment (be it social or physical) and when they are heterogeneous in type, which match our needs. For example, in Moulet and Rouchier [2008] agents learn through time, and thanks to their interactions, how to bargain with each other. Beyond these computational issues, learning is also used to model agents in environment with incomplete information. Thus, agents have to learn by themselves missing information through observation. A classical learning is reinforcement learning (Brenner [2006]). Another one is genetic algorithm (Vriend [2000]). The idea behind learning in this context is that agents are not optimizing their choices, either because they are limited in information or in computation ability (Simon [1955]), but that they choose and action on a very simple basis and evaluate ex-post the result of their actions, which they then classify so as to choose the "better" actions in the next steps. The process of learning generally converges to a dynamic equilibrium, which can be optimal (if this can be evaluated), but does not have to.
Our question about dynamic evolution of cooperation in a context of heterogeneous agents with limited knowledge about their own risk exposure (in which no analytical solution can be found) pushed us to produce an Agent-Based Model (programming in Netlogo). Very few papers in ABM actually deal with risk learning from an individual point of view. Agents playing one-arm bandit and choosing dynamically risk have already be studied but without no consideration of social interaction (Leloup). Dealing with risk has already been explored with an evolutionary setting, rather in a methodological approach, where the demonstration is made that in a context where agents can have different success, a micro-analysis gives deeper understanding of possible dynamics than a simple macro view working with averages of risk (Roos and Nau [2010]). However, to the best of our knowledge, risk-sharing attitudes have not been modeled and studied with ABM.
The paper is built in four parts. The first part presents our model and its basic assumptions in terms of preferences, risk-sharing and information acquisition. In a second part, we describe our simulations and observation protocol for running the model. In a third part we present the effect of learning and other-regarding preferences on the stability and segregation of risksharing cooperatives. We eventually discuss our results and conclude in the last part.

A model of endogenously evolving cooperatives
We consider a community of n ≥ 2 agents who live for a fixed number of period T and face at each period (t = 1, ..., T ) a risk of income loss (for example farmers who face a risk of bad harvest). At each period, their income either equals y + with probability (1 − p) or y − < y + with probability p. Agents are heterogeneous with respect to their risk exposure. They can be low-risk, that is have a low probability (denoted p = p) of bad harvest, or high risk (p = p > p). We denote by π the proportion of low-risk type in the community.

Agents utility and learning
Agents can share this risk through cooperatives. A cooperative is here modeled as a risksharing agreement between m ≤ n agents who, at any period, agree to share income equally. Therefore, in a cooperative C with m members, the after-sharing income -called here consumption -at period t is: where y j,t ∈ {y − , y + } represents the income of agent j at time t.
We are interested here in understanding why low-risk agents may be willing to share risk in cooperatives with high-risk ones. Our agents have private preferences represented by a increasing and strictly concave utility function u (with u > 0 and u < 0).
Above these private preferences we allow agents to have other-regarding preferences (ORP), that is to value the well-being of others. In this paper we investigate two forms of ORP, the inequality aversion (IA) and altruism.
For altruism, following Becker [1974], Arrow [1981] or Bourlès et al. [2017] we assume that the social preferences of agent i writes: where α denotes the coefficient of altruism and F i is the set of friends of agent i. F i defines the (exogenous) social network of agent i, and the sets {F i } n i=1 describe the entire network of our community. We focus here on undirected network meaning that if j ∈ F i , then i ∈ F j . The shape of the global network might be an important determinant of the working and the stability of cooperatives as discussed in the robustness check section. For the core of the paper, we assume that agents are embedded in a network exhibiting small-word characteristics. Following Watts and Strogat [1998], we build the network starting from a regular graph (a ring of n agents each connected to her k nearest neighbors) and rewire it by deleting each link with probability q and replacing it by a link at random (if q = 1 we end up with a random graph).
Beside altruism, we also want to analyze the effect of another type of other-regarding preferences: inequality aversion. Following Fehr and Schmidt [1999], we assume that an agents might suffer from creating inequality in utility when leaving a cooperative. In that case social preferences on agent i writes : A key assumption of our model is the information that each agent has her own risk exposure p i . We assume that before the first period (t = 1) agents don't have any information on their type (low-risk, high-risk). They however know the aggregate distribution of types in the community (that is π, the proportion of low-risk type) and the probability of loss of each type. They can therefore acquire information through time by observing the past realizations of their risk. We model here a Bayesian learning, that is a Bayesian updating of beliefs on risk-type. We denote by π i,t the belief that agent i has, at time t, about her probability of being low-risk. For all agents i, at time t = 0, π i,0 = π. At each following period, each agent computes a Bayesian update of her belief: if at time t, she has experienced k losses among the t first periods, her belief about her probability of being of low-risk type writes: This gives a relationship between π i,t and π i,t−1 depending on the realization of income (risk) at time t for agent i: y i,t .
This belief about their own risk exposure is a key component of agents' choices of staying or leaving their cooperative.

In cooperative : staying or leaving
If already involved in a cooperative, at each period (after income sharing 1 ), each agent has to choose if she prefers to remain in this cooperative or to leave it. On the one hand, through Bayesian learning it is pretty easy to compute the expected utility an agent would get when remaining alone: On the other hand, due to the potential changes in the composition of cooperatives, it is very difficult to form expectation on the well-being inside cooperatives. We therefore assume that when deciding whether or not to leave her cooperative, an agent: • uses her past experience to infer the value of staying, and values more the most recent experience (to take into account the dynamic of the cooperative) • doesn't take into account the possibility of joining another cooperative after leaving.
Formally, in the absence of other-regarding preferences, an agent would leave her cooper- u(c t ) therefore represents a weighted average of the utilities the agent has had inside the cooperative, putting more weight to the near past (this allows to take into account the dynamic of the cooperative). According to equation (8), based on her belief and on the history of the cooperative, an agent would leave the cooperative if she is better off outside than inside the cooperative. When incorporating other-regarding preferences into the model, agents consider the impact of their choice on others well-being, and compute the utility the other members of the cooperative would have without her. Following previous reasoning, an agent considers that, without her the cooperative would provide as utility: Note here that the computation of all the parameters needed for an agent to make her choice only requires her to keep tracking over time her own income and consumption inside the cooperative.
Then, an altruistic agent i leaves her cooperative if: where r represents the number of friends agent i has in her cooperative. Indeed, agent's i choice of leaving a cooperative, will only impact the well-being of those of her friend involved in the same cooperative. Similarly, a inequality averse agent i leaves her cooperative if: Once again, we assume here that the agent only considers the impact of her own choice on the system. The component of the inequality aversion which accounts for the dis-utility of an agent who is disadvantaged compared to others (−γ. max u(c −i,t ) − E πt (u(y)), 0 ) is always 0 because a necessary condition for i to leave is that E πt (u(y)) ≥ u(c −i,t ).

Creating cooperatives
We are interested in studying the stability of risk-sharing cooperatives. We therefore want isolated agents to be able to join new cooperatives. We however assume that an agent cannot "jump" from one cooperative to another and that a lonely agent cannot join an existing cooperative. Therefore, the only possibility for an isolated agent to share risk is to form a new cooperative with other isolated agents. We assume that only one (randomly selected) agent has the possibility to create a new cooperative, at each period. We more precisely give the choice to the selected agent to build a cooperative with all the isolated agents in her network at level 2 (i.e. all agents who do not belong to a cooperative and with whom she has a direct link and all their direct friends). For the model to remain tractable, we don't allow the selected agent to choose among these isolated agents, nor the other agents to choose to join or not the cooperative and consider that a cooperative is always created since the selected agent is able to find in its network at level 2 at least one other isolated agent. 2 Social network therefore plays two major roles in our setting. It defines toward whom an agent is altruistic (equation (2)) and with whom an agent can create a cooperative. Note here that the creation of a new cooperative does not involve the creation of new links in the network.

Observing the system : cooperative dynamics and segregation
Through this model, our aim is to study (i) how cooperatives work and evolve and (ii) which parameters drive low-risk agents to share risk with high-risk ones. As indicators for the first issue, we follow the size of cooperatives and the fraction of agents involved in a cooperative. For the second one, we build a segregation index inside cooperatives. We more precisely use an adaptation of the total segregation index based on the number of low-risk agents : n l j and high-risk agents: n h j in each cooperative j (an isolated agent will then be considered as a cooperative highly segregated). Denoting n l (respectively n h ) the total number of low-risk (resp. high-risk) agents in the community, the total segregation index writes: It equals 0 when the proportion of low and high risk agents is the same in each cooperative as in the whole society, and if no agent is isolated. It equals 1 when each cooperatives is completely segregated (no cohabitation in cooperatives) or if all agents are isolated. The 2 Relaxing this assumption or the fact that agents cannot jump from one cooperative to another would render the model extremely complicated. This would first call for additional assumptions on how agents offer and accept a creation or a change of cooperative, and on the identity of the agent in charge of the decision. Then, each decision would be conditional on others acceptance what would lead to possibly long computations to achieve convergence. For example if one agent is offered to create a cooperative, she chooses on the basis of the information of all other participants, and so do they. If one participant rejects the offer, the offer changes, and a new calculus should take place, conditional on who accepted. This then has to be repeated until convergence, if ever it happens. These issues have lead us to choose the most classical evolutionary logic: any proposed cooperative is created, and all agents evaluate their satisfaction and decide to leave after one step. This simple setting moreover has the advantage to hinder learning to have both a direct impact on cooperatives creation (through the mechanism of choice) and on cooperatives evolution (through πt in equations (8), (11) and (12)). The automatic creation allows us to disentangle these two effects of learning and to concentrate on cooperatives evolution alone. major bias of this index is that it includes isolated agents and do not give a direct indication on the composition of the cooperatives. To correct this bias we use a modified index based on the decomposition of the previous index in two parts. The first part is the computation of the index on isolated agents (SI). SI only depend on the fraction of agents alone and the composition of this fraction. Denoting I l (and respectively I h ) the isolated agents of low risk type (resp. high risk type) we have : SI is the part of D explained by the isolated agent. The second part of D comes from the composition of each cooperative and varies between 0 if there is no segregation in cooperatives and 1 − SI if cooperatives are completely segregated. Denoting C the set of cooperatives we have : By normalizing SC, we obtained a segregation index on cooperatives D C that equals 0 when the proportion of low and high risk agents are the same in each cooperative than in the whole society, and equals 1 when cooperatives are not mixing different risk type: 3 Simulation strategy

Description
As explained above, we analyze our model and the impact of various parameters using agentbased simulations. A typical run works the following way. A t = 0, n artificial agents are created and the network is built. A proportion π of the agents are given probability of failure p, the other a probability p. At each following time-step: (i) incomes are realized, beliefs are updated, and agents in cooperatives shared equally their income, (ii) all agents choose if they prefer to stay in the cooperative they belong to or to leave it (according to equations (8), (11) or (12)) and (iii) one isolated agent is randomly picked up to create a cooperative with her isolated friends at level 1 and 2, if any. We run the model for T time steps. Note here that each step does not necessarily corresponds to a real-word time period but represents instead a theoretical framework for learning, which is one of the regular features of this type of modeling.

Parameters values
For all our simulations, we consider: n = 200, π = 0.5, p = 0.1, p = 0.3, y − = 50 and y + = 100. Under this setting, it takes about 50 steps for the agents to know their type with a probability of 95%. Regarding the discounting of past values of consumption, we assume δ = 0.5 that is a 6 steps memory. Further the past is discounted by more than 98%.
We assume that all agents are equally risk-averse 3 and have private (or material) preferences represented by a Constant Relative Risk Aversion (CRRA) utility function : The network is assumed to be a smallworld (see Watts and Strogat [1998]) in which each agent has on average k = 10 friends. We use in the paper a rewiring probability q = 0.10.
We are interested here in analyzing the impact of learning, risk aversion and other regarding preferences. To understand the effect of limited knowledge of risk exposure and learning, we study two polar cases. Either agents know perfectly their risk type from t = 0 or, they only know π = 0.5 at that time and learn their own exposure through time (see equations (4) to (6)). Regarding risk aversion we consider alternative value of ρ between 1 and 4 (see Kimball [1988], Chetty [2006] and Meyer and Meyer [2005]). For other-regarding preferences, we study values of 0, 0.2 and 0.4 for the coefficient of altruism α (according to Hamilton's rule, two siblings should have a coefficient of altruism of 0.5, see Hamilton [1964a], Hamilton [1964b]); and values of advantageous inequality aversion β equal to 0, 0.4 and 0.8 in line with assumptions and observations in Fehr and Schmidt [1999].

Statistical methodology
Let us first provide a stability analysis of our model to define the number of time periods through which we study the evolution. We look more precisely for values of T above which the model is stable, in terms of number of cooperatives and degree of segregation. This analysis moreover allow us to define a degree of relative risk aversion ρ not too low -for the agents to be willing to share risk -neither too high -for the other parameters to also influence the willingness of low-risk agents to group with high risk ones (for very high level of risk aversion, low-risk agents agree to share risk with high risk ones even in the absence of learning or other-regarding preferences).
Once the number of periods and the coefficient of relative risk aversion defined, we analyze the effect of our key parameters the following way. For each set of parameters, we run 1000 simulations and plot the resulting distribution of our indicators (mostly the mean size of cooperative, the fraction of agents in cooperatives and the degree of segregation in the existing cooperative). This allows us to analyze visually the effect of each parameters, using the notion of stochastic dominance.
To limit the path dependance that can drive some of the results, we complement this analysis using deterministic histories of income (good/bad harvest). We more precisely study the effect of each parameter by comparing our indicators for 100 pre-defined histories (a history being a n by T matrix of y − and y + ) and plot the difference using box plots. This notably allow to analyze to what extent the effect of a parameter is significant. Figure 1: Illustration of the different regimes on the number of cooperatives. The moving average is the mean of the indicator over the last 50 periods. We can see the sharp convergence during the learning regime, a smoother readjustment during the convergence regime and then oscillations around the "stabilized level". The vertical yellow and green lines indicate respectively the level reached at t = 50 and t = 100.

General Dynamic of the Model
Let us first analyze the dynamics and the stability of our model.
The first and simplest dynamic regards learning. As already stated, based on our choice of parameters, learning takes about 50 rounds (beyond, agents know their type with a probability above 95%).
The system is however not stable, once agents know their type. The learning regime is followed by a so-called "convergence" regime during which our indicators converge to the stabilized level (this is illustrated on Figure 1 using the dynamics of the number of cooperatives). The end of this convergence depends on the studied indicator, but generally occurs around t = 100. Then, indicators oscillate around their stabilized level, in what we call the "stabilized" regime.
Based on this dynamic, we focus on three main dates for our analysis: t = 50 the end of the learning regime, t = 100 the end of the convergence regime, and t = 250 when the stabilization is achieved. To smooth oscillations (in the last regime) and analyze the whole first two regimes, we look at the mean value on our indicators for the previous 50 rounds at this 3 points of time.

Calibrating the level of risk aversion
To highlight the effects of other regarding preferences and learning, we seek to set an intermediate level of risk aversion. As already pointed out, risk aversion intuitively stabilizes cooperatives, improves the fraction of agent involved in cooperatives and globally helps to reduce segregation (see e.g. Kimball [1988] and Bourlès and Henriet [2012]). This is illustrated in section A.1. Based on this analysis we set (as a benchmark) a level of relative risk aversion ρ = 2.5. Below (e.g. at 1.5), the stabilizing effect of risk aversion is too low, cooperatives disappear quickly, few agents stay in it, and segregation is very high. Above (e.g. at 3.5) its effect is too strong. Risk aversion can then stabilize a large range of scenarios, from one in which the population is completely segregated to one in which cohabitation between different risk profile is very easy; limiting our ability to analyze the effect of other parameters on segregation.

Results and mechanisms behind
Now turn to our main results, that are the effects of other-regarding preferences and learning on the evolution of cooperatives and segregation (we study the effect of network in appendix A.2).
Our findings are: • ORP decreases segregation and the size of cooperatives. In the case of altruism, cooperatives are less stable and the fraction of agents in cooperatives also decreases. This unexpected instability comes from the fact that altruism also makes some high-risk agents to leave their cooperatives because of the negative effect they have on other members. This effect indeed disappears when we restrict ourselves to cases in which agents cannot leave a cooperative when benefiting from it.
• Limited knowledge of risk exposure has a large impact during the learning regime that disappears gradually. It still reduces segregation during the convergence regime. For large coefficient of inequality aversion or altruism this effect mostly comes from lowrisk agents who stay in cooperatives (although they would have left if they knew their type) and are then "trapped" -even when they discover their type -because of their other-regarding preferences.
These effects are not only due to changes in individual behaviors but also rely on more macro mechanisms based on stocks and flows of agents, described in the next section.

The macro dynamic of the model
The macro dynamic of our model (an emerging phenomena in ABM) is summarized in figure 4.1. In ABM we define ex-ante the local rules of interactions and decisions of our agents and the scheduling of the model. The macro dynamic presented here is not directly implemented in our model but is the consequence at the macro level of the local behavior of our agents. We have made the choice ex-post of representing this macro dynamic as a stock and flow chart because we think it is the most suitable representation that helps to understand the results we observe. We can identify two relevant stocks: 1. The stock of isolated agents, characterized by its composition of low and high risk agents and the density of the network linking these agents in autarky.
2. The stock of agents in cooperatives, characterized by the number, the size, and the composition of cooperatives.
These two stocks are mathematically linked at every point in time by the following relation : Stock.Autarky = T otal.population − Stock.in.Coop. Still, this relationship alone is not sufficient to understand well the dynamic. We next explicit the flows between these two stocks.
There exist two flows linking these stocks: Flow A : One flow comes from the creation of cooperatives. It depletes the stock of isolated agents and increases the stock of agents in cooperatives. This flow is shaped by the number of agents alone. As there is at most one cooperative created per round, it equals to the size of this new cooperative. To create a cooperative, one agent is randomly picked, and she creates a cooperative with her friends and the friends of her friends. Thus, the larger the stock of isolated agents, the larger the probability for the chosen agents to find a lot of agents in her network to create her cooperative (arrow 1). This relationship between the size of the stock in autarky and flow A is very important for the general dynamic. A second factor influencing flow A is the density of the network connecting agents in autarky. For the same stock, a higher density leads the selected agent to gather more agents (arrow 7).
Flow B : Going the other way, the another flow corresponds to agents leaving cooperatives. For a given stock of agents in cooperatives a larger flow implies (logical link) and is the consequence (causal link) of a greater instability at the level of cooperatives. The less (resp. the more) stable the cooperatives, the larger (resp. the smaller) this flow for a given stock (arrow 2). Thus, flow B is only driven by the dynamic at the micro level whereas flow A is essentially driven by the level of the stock of agents in autarky, and its general characteristics (that is by macro components).
From this structure we can infer the following statements: • As the composition of the flow B influences the composition of the stock of agents in autarky (dashed arrow 3) which itself influences the composition of the new cooperative created (arrow 4), when the composition of flow B is stable, all these compositions become similar.
• When the stock of agents in cooperatives which remains stable (as in the stabilized regime for example), a smaller stock increases instability at the micro level of cooperatives. Indeed for the stock to be stable, flows A and B has to be equal. If there are few agents in cooperatives (and therefore a lot of agent in autarky), flow A is large leading to a large flow B and therefore unstable cooperatives.
This macro structure allows us to already provide some intuitions about the mechanisms behind our indicators: Size of cooperatives. The average size of the cooperatives is influenced by both the size of the new cooperative (dashed arrow 6) and the micro dynamic at the cooperative level. The fraction of agents in cooperatives. The fraction of agents in cooperatives only depends on the stock of agents in cooperatives as it is the ratio of this stock on the total number of agents. Therefore, a stable low fraction in cooperatives means a great instability in the cooperatives.

Stock of agents in cooperatives
Segregation in cooperatives. At the macro level the most important factor influencing segregation is the composition of the leaving flow as it impacts the composition of the new cooperatives. If all the new cooperatives created are already highly segregated, the segregation is likely to be large and only depends on internal mechanisms of the cooperatives (dashed arrow 5). Segregation thus depends a lot on who is leaving cooperatives if the composition of this flow is stable enough.
We now turn to the micro dynamics at the cooperatives level (for both creation and destruction). These micro dynamics will be discussed in relation with the above effects to explain the mechanism behind our results.

The baseline scenario
Let us first briefly describe the typical evolution of cooperatives without ORP nor learning. The effects of our various parameters can then be understood based on variations from this baseline scenario.
At the beginning, all agents are available for creation, and newly created cooperatives are quite big. Low risk type agents however quickly leave these initial cooperatives, whereas most high risk stay. Most of the isolated agents are thus of low-risk type. They end up creating stable cooperatives among themselves. At this point homogeneous cooperatives are very stable. As all agents of these cooperatives are of the same risk type, they have the same expected utility alone, and as soon as the expected utility of a cooperative is lower than this utility alone all the agents simultaneously leave the cooperative. Hence cooperatives survival is extremely path-dependent and so is the composition of the leaving flow. This leads to high levels of segregation.
The two models lead to different results due to the fact that high-risk altruistic agents internalize their negative effect on low-risk one. Ignoring this effect, both ORPs reduce segregation and the mean size of cooperatives.

Inequality aversion
Let us fist consider the effects of inequality aversion, see Figure 3.
On segregation (top right panel). IA reduces segregation. This effect lasts during the three regimes: learning (t = 50), convergence (t = 100) and stabilized (t = 250) and is non linear: a change from β = 0 to β = 0.4 has little impact while change from β = 0.4 to β = 0.8 has an important effect. On the fraction in cooperatives (bottom right panel). IA has almost no effect on the fraction of agents involved in cooperatives in all three regimes. The only exception is for high level of inequality aversion (β = 0.8) during the learning regime, where fraction of agents in cooperatives slightly improves.
On the size of cooperatives (left panels). IA decreases durably the size of cooperatives. This effect appears since the learning regime and stabilize during the convergence one.
Inequality aversion thus decreases segregation durably (with a non linear effect) and engenders smaller cooperatives in the long term. The main mechanisms behind these results are the following: • IA has a greater impact on small cooperatives. This is driven by two effects. First, the impact of one's realization on everyone's consumption is more important in a small cooperative. Then the impact of one agent leaving a large cooperative is smaller than her impact of leaving a small cooperative. The stabilizing effect of IA is therefore higher in smaller cooperatives.
• Now, agents of the same risk type in a same cooperative can have different expected utilities depending on their individual past realizations (see equation 12). A very successful agent impacts more agents if she leaves and then her incentive to stay is higher. The most successful agents are then "trapped" in the cooperative. Then, contrarily to what happens in the baseline scenario all agents of a same type will not leave their cooperatives at the same moment.
We can now describe a typical scenario behind the results. As in the baseline scenario, at the beginning large cooperatives of mixed composition are created. The low risk agents leave them quite quickly, changing the composition of the stock of agents alone to almost 20% of high risk agents against 80% of low risk one. The new cooperatives then almost have this composition, and the bad effect on consumption induced by this small fraction of high risk agents is more easily bearable by the low risk agents who stay longer with them. They are still leaving but more slowly, and not all at the same time as explained above. This insures a mix which lasts longer and decreases segregation.
Referring to the macro dynamics, agents now leave the cooperative individually (not as large groups like in the basic scenario) and thus do not modify much the composition of the stock of agents in autarky. This stabilizes the composition of newly created cooperatives. This self-reinforcing process at macro level leads to lower segregation.
Still, this small leaving flow doesn't lead to a larger fraction of agents in cooperatives. This comes from a lower density of the network of isolated agents (see the section 4.1). As agents of a same type leave their cooperative at different times, they leave most of their friends behind and have less friends in autarky to create new cooperatives. Finally, as IA stabilizes small cooperatives, cooperatives are smaller on average.

Altruism
Now turn to the effect of altruism, see Figure 4.
On segregation (left panels). Altruism decreases segregation. This effect lasts during the three regimes, tends to intensify as time goes by and seems almost linear in α.

On the fraction in cooperatives (top right panel). Altruism decreases durably the fraction of agents in cooperatives.
On the size of cooperatives (bottom right panel) Altruism decreases durably the size of cooperatives.
Altruism thus decreases durably segregation at the price of fewer people in cooperatives and smaller cooperatives.
The two mechanisms at work with IA also hold for altruism. The effect of altruism is stronger in small cooperatives and the decision of an agent to leave also depends on its own realizations (not only on the cooperative performances). In addition, a third mechanism appears. Altruism can lead agents who performed badly to leave their cooperatives to preserve their friends. With altruism utility has two parts (see equation 2): a material utility agents derived from their consumptions (which only depend on the result of their cooperatives), and a social utility derived from the utility of their friend. Whatever the risk profile of an agent, consecutive bad results lead to large material utility gains from the cooperative, but decreases social utility, as it decreases the utility of other members of the cooperative. If gains in material utility are lower than losses in social utility, the agent leaves the cooperative. This mechanism makes the model with altruism less stable than the one with IA or the baseline. This also explains why altruism decreases the fraction of agents in cooperatives. The typical scenario behind these results is the same as the one for IA, except that the leaving and entering flows are larger. These flows are still quite stable in terms of composition (around 20% of high risk agents and 80% of low risk ones), self reinforcing this stability. Cooperatives created, if not only composed of low risk agent, are composed of few high risk agents. Low risk agents leave few by few in time, which again makes cooperatives more mixed, less segregated. As the cooperatives get smaller and the stabilizing effect of altruism gets stronger, remaining low risk agents are "trapped" in the cooperatives. The death of the small cooperatives comes from the high volatility of their consumption and from the departure of agents who perform badly, as explained previously.

Modified Altruism
We illustrate that the effect of altruism on the faction of agents in cooperatives is mostly driven by agents who leave the cooperative when their realizations hurt their friends by studying a modified version of altruism. We now consider that agents account for the effect on their friends (i.e. for social utility) only when it is positive. Equation (11) becomes : . Figure 5 illustrate that this modified version of altruism produces more stable cooperatives but also greater segregation.
This modified version repeals the instability observed with altruism: the fraction of agents in cooperatives is similar to the level observed without ORP or with IA; and cooperatives are slightly larger than with usual altruism. Still, they remain smaller than without ORP (as for IA) (see right panels of Figure 5).
The effect on segregation is almost the same as for classical altruism during the learning regime (top left panel) but is lower at the stabilized regime (bottom left panel). The modified altruism implies a less stable composition of the leaving flow and of the stock of agents alone. The dynamic is then closer to the one observed without ORP explaining this increase in the segregation index.
These results and the mechanisms behind are more developed in appendix B.1.

Information of risk-types; Learning
We now analyze the effect of limited knowledge on risk type and Bayesian learning on segregation.
We correct for path dependance by considering the same histories, that is the same realizations with and without learning. For each set of parameters we run 10 simulations for each of the 100 histories, that is 1000 simulations. Let I s h,j be the value of indicator I for the j th simulation of the history h (with j ∈ {1, .., 10} and h ∈ {1, .., 100}) under the set of parameters s. Call s and s two identical sets except that there is learning in s and no learning in s. We now can compute the effect of learning by computing for each h and j the difference I s h,j − I s h,j . By looking at the statistical characteristics of these 1000 differences we can infer the impact of learning. We also use We represent these results using box and whiskers plots (see Figures 6 and 7). Each box shows the median, the 25% and the 75% quantile. The inter-quantile range (IQR) is the height of the box, and the whiskers are the smallest (resp. the greatest) observation greater (resp. smaller) than or equal to the 25% quantile -1.5 * IQR (resp. 75% quantile + 1.5 * IQR). Points are observations outside these limits.
Our main result is then that learning improves risk sharing among heterogeneous agents during the learning and convergence regime. This effect however disappears during the stabilized regime.
The mechanism behind these results is the following. During the learning regime, agents not knowing their type make mistakes. Their expected utility alone are then computed based on their beliefs (see equation 7), making low risk (resp. high risk) agents compute a lower (resp. higher) expected utility than the real one. Low-risk agents will then stay longer in cooperatives with high risk ones. This decreases segregation and increases in size of cooperatives, as least during learning regime.
In absolute terms (Figure 6), the effect of learning doesn't depend on the level of ORP. This may suggest the absence of interaction between ORP and learning. An analysis of the relative effects (see Figure 7) however reveals (some) complementarity between ORP and learning. It shows that large coefficients of ORP strengthen the negative effect of learning on segregation during the learning regime (left panels). The effect is mostly present for inequality aversion (top panel). This complementary effect comes from the large role of inequality aversion in small cooperatives. Indeed, due to bad realizations, some low risk agents will learn more slowly than others and stay longer in their cooperatives. When learning their type, they will realize that the cooperative results highly depend on them, and will be reluctant to leave because of inequality aversion. Learning on risk-type then decreases segregation, all the more that inequality aversion is high.

Conclusion
We study in this paper the motives pushing heterogeneous agents to share risk. On top of the obvious role of risk-aversion, we highlight the respective roles of other-regarding preferences and of limited knowledge of risk exposure. To study the simultaneous learning of own risk exposure and cooperative performances, we build an agent-based model. Based on their beliefs and the risk-sharing offered in their cooperative, agents choose whether or not to leave it. This create an evolving composition of risk-sharing cooperatives. We show in this context that other-regarding preferences (inequality aversion and altruism) durably decrease segregation in cooperatives, i.e. increase the willingness of low-risk agents to share risk to high-risk ones. Interestingly, this holds true even when agents are fully informed of their type. These other-regarding preferences however tend to produce smaller cooperatives as the effect one has on others is larger in smaller cooperatives.
This effect is reinforced by learning, that also contributes to create more mixed cooperatives. By making low-risk agents less sure about their advantage, it makes them stayi longer in their cooperative. The two effects are moreover complement: other-regarding preferences force the last low-risk agents remaining to continue sharing with high-risk ones.
Interestingly, we also identify a destabilizing effect of altruism. Because high-risk agents internalize their negative effect on their friends they share with, some tend to leave cooperatives they benefit from. This changes the composition of the flow of agents leaving the cooperatives and lead to less stable situations, as can be understood through the emerging macro-model we created.
These results call for more research notably regarding the interaction between risk-aversion, other-regarding preferences and learning. One way to enrich our model would be through the sophistication of the creation process. We assume here that at each step one new cooperative is created, without any choice by the agents. Modeling another process would however call for more assumptions, in particular on the identity of the agent(s) who choose(s) to create the new cooperative or not, and the information she (they) use. Another interesting avenue of research consists in studying sharing rules different from equal sharing.

A.1 The effect of the risk aversion
The effect of the risk aversion is summarized in Figure 8.
On segregation (left panel). During the learning regime, RA decreases segregation. At the stabilized regime, the effects is reversed but very small.
On the fraction in cooperatives (top right panel). RA increases the fraction of agents in cooperatives at the stabilized regime.
On the size of cooperatives (bottom right panel). RA decreases the size of cooperatives at the stabilized regime. The opposite holds during the learning regime.
RA improves a lot the stability of cooperatives. This translates differently depending on the regime we study. Results are very path dependent for large RA coefficient, stabilizing a large variety of scenario from low segregation to complete segregation. The expected effect of RA: helping mixing risk profile is only true during learning regime. Then the effect changes, because the dynamics of the model.
• When the coefficient of relative risk aversion equals 1.5, cooperatives are unstable. Low risk agents quickly leave and the performance of remaining homogeneous cooperatives are highly path dependent (explaining high segregation and the small fraction of agents in cooperatives). Cooperatives become larger during the stabilized regime. The size and the homogeneity of the stock of isolated agents tend to create large and stable cooperatives.
• With a higher coefficient (2.5), initial cooperative are more stable. Low risk agents leave less quickly, decreasing segregation index during the learning regime. Nevertheless high coefficients of RA also stabilizes homogeneous cooperatives, explaining that in the long run (at the stabilized regime) the segregation index is higher for coefficient of RA of 2.5. • A coefficient of 3.5 is a special case, the stabilized regime is highly path dependent. RA can stabilize both situations in which every cooperative is completely segregated and others in which cooperatives are mixed.
A.2 The shape of the social network In this subsection, we are interested in analyzing the impact of the social network. We study three shapes of networks: smallworld with a mean number of friends of 10 (as in the core of the paper), random (with the same mean number of friends) and complete where everybody is linked to everybody. We focus on cases without ORP and with modified altruism. The shape of the network indeed impacts both with whom an agent can create a new cooperative and toward whom she is altruistic. We abstract from learning, assuming that agents perfectly know their type from t = 0. Results are displayed in Figure 9.
On segregation (left panel). Segregation is maximal for the complete network. Absent altruism, smallworld and random network are equivalent. With altruism, smallworld leads to less segregated cooperatives.
On the size of cooperatives (right panel). Without altruism, complete network generates two completely segregated cooperatives. With altruism, complete network generates smaller cooperatives still a bit larger than with random graphs. In both cases, the smallest cooperatives are generated by smallworld.
Results on the size of cooperatives are essentially driven by the size of the created cooperatives. With complete network every agents are linked. Every isolated agent therefore creates the largest possible cooperative at each round. With smallworld, friends of friends have more chances to be friends, and the selected agent will reach less agents than with random graph case, ending with smaller cooperatives.
The results on segregation with modified altruism is driven by the stronger effect of altruism in smaller cooperatives. In the case of complete network, everybody is altruistic towards everybody else, but cooperatives are too large for altruism to have a effect. Low risk agents thus leave quickly and create large and completely segregated cooperatives. In smallworld, friends of friends have more chances to be friends and cooperatives are small. The effect of altruism on segregation is then the strongest.

B.1 Modified Altruism
The following subsection develops results with modified altruism and describes the mechanisms behind, see figure 5.
On segregation (left panel). Modified altruism decreases segregation. The effect is however lower than with classical altruism after the learning regime.
On the fraction in cooperatives (top right panel). Modified altruism has no effect on the fraction of agents in cooperatives (contrary to classical altruism). On the size of cooperatives (bottom right panel). Modified altruism decreases the size of cooperatives, a bit more than classical altruism.
Modified altruism creates more stable cooperatives but higher segregation than classical altruism.
The results on the fraction of agent in cooperatives come from the fact that high-risk agents no more leave a beneficial cooperative because of the negative effect they have on their friends.
This however increases segregation after the learning regime as it reduces the proportion of high-risk agents in the flow of agents leaving cooperatives. The stock of isolated agents in then more segregated, leading tho more segregated new cooperatives.