# Cooperation in a non-Ergodic World on a Network - Insurance and Beyond

Tobias Wand  Corresponding author’s e-mail address:
<EMAIL_ADDRESS>Institute of Theoretical Physics, University of
Münster  Center for Nonlinear Science Münster, University of Münster  Oliver
Kamps  Center for Nonlinear Science Münster, University of Münster  Benjamin
Skjold  London Mathematical Laboratory  Danish Research Centre for Magnetic
Resonance

###### Abstract

Cooperation between individuals is emergent in all parts of society, yet
mechanistic reasons for this emergence is ill understood in the literature. A
specific example of this is insurance. Recent work has, though, shown that
assuming the risk individuals face is proportional to their wealth and
optimising the time average growth rate rather than the ensemble average
results in a non-zero-sum game, where both parties benefit from cooperation
through insurance contracts. In a recent paper, Peters and Skjold present a
simple agent-based model and show how, over time, agents that enter into such
cooperatives outperform agents that do not. Here, we extend this work by
restricting the possible connections between agents via a lattice network.
Under these restrictions, we still find that all agents profit from
cooperating through insurance. We, though, further find that clusters of poor
and rich agents emerge endogenously on the two-dimensional map and that wealth
inequalities persist for a long duration, consistent with the phenomenon known
as the poverty trap. By tuning the parameters which control the risk levels,
we simulate both highly advantageous and extremely risky gambles and show that
despite the qualitative shift in the type of risk, the findings are
consistent.

Econophysics; Network; Ergodicity Economics; Ergodicity Breaking; Agent-Based
Model

††preprint: APS/123-QED

##  I Introduction

Self-organisation of individuals is observed in many systems and is a
cornerstone of complexity sciences [1, 2, 3, 4]. Mutual cooperation between
agents exists in many forms, one such being insurance. The insurance industry
is one of the largest industries in the modern economy and has existed for
centuries. Yet, we find that mainstream economics, which is rooted in expected
value theory, does not provide a satisfactory reason for its emergence. As an
alternative approach, Peters and Adamou argue in [5] that the system in which
insurance takes place is more reminiscent of a multiplicative system (i.e.
that the risk is proportional to the wealth) and note that the increments in
such a system are not ergodic. Using time averages rather than ensemble
averages, they show that there exist regimes in which insurance contracts are
favourable for both buyer and seller, which calls for such contracts to be
made. In a recent paper, Peters and Skjold [6, 7] explore this idea using a
simple agent-based model, which shows that agents who cooperate via insurance
contracts over time systematically outperform agents who do not.
Inspired by the 2d Ising model on a lattice and its many applications to
socio-economic phenomena [8, 9, 10, 11, 12, 13], we expand the model proposed
in [6, 7] to large ensembles on a lattice network. Now, each agent is placed
in a neighbourhood of other agents and can only cooperate with nearby agents,
giving rise to the formation of spatial patterns in our model similar to [14,
10].

In this paper, we first present a brief background of non-ergodicity in
economics and illustrate the implication of broken ergodicity with a simple
coin toss example before detailing the insurance paradox and its treatment in
the context of ergodicity economics in section II. Next, we describe the setup
of our implementation of the agent-based insurance model on a network and the
mathematical techniques used to analyse its results in section III. Results
for a specific parametric setting are presented in section IV before we
perform a parameter scan by varying the parameters $c$ and $r$ representing
the relative costs or rewards of the risk in section V, which reveals
different clustering regimes in our model. Finally, we conclude with a summary
and discussion of our work in section VI.

##  II Introduction to Ergodicity Economics

In an ergodic system, an individual trajectory at different time steps
$x_{i}(t_{1}),\dots,x_{i}(t_{n})$ has the same statistical properties as an
ensemble observed at a single point in time $x_{1}(t),\dots,x_{n}(t)$. This
property makes many calculations easier, and thus the ergodic hypothesis is
often explicitly or implicitly assumed for many statistical methods. The core
of ergodicity economics is a careful analysis of whether the ergodic
hypothesis is true and thus makes an explicit distinction between ensemble
averages $\langle x\rangle=\frac{1}{N}\sum_{i}x_{i}(t)$ and time averages
$\bar{x}=\frac{1}{T}\sum_{t}x_{i}(t)$ for e.g. financial time series [15].
Assuming ergodicity implies that $\langle x\rangle=\bar{x}$ in the limit of
large $T$ and $N$. However, it is the exception rather than the norm that this
is justified in real-world systems. A simple example of a non-ergodic system
is the reinvesting coin toss gamble taken from [16].

###  II.1 Reinvesting Coin Tosses

Consider some initial wealth $x(0)$. You are now offered a gamble on which a
fair coin is tossed, i.e. with probability $1/2$, you win and with probability
$1/2$, you lose. If you win, your wealth is multiplied by a factor of
$\alpha_{w}=1.5$, and if you lose, your wealth is multiplied by a factor
$\alpha_{l}=0.6$. We will repeatedly toss the coin and sequentially update
your wealth according to the outcome of the toss. Is this a favourable bet?
The expected value computed via the ensemble average of identical agents with
initial wealth $x$ shows that

$\langle
x(t+1)|x(t)=x\rangle=\frac{\left(\alpha_{w}x+\alpha_{l}x\right)}{2}=1.05x>x(t),$
(1)

and therefore implies that the gamble is favourable. However, considering that
for a single agent with initial wealth $x(0)$ and enough repetitions $T$, the
law of large numbers guarantees that both coin toss outcomes will appear
equally often, and we can compute the time average

$\bar{x}(T)=\alpha_{w}^{(T/2)}\alpha_{l}^{(T/2)}x=0.9^{(T/2)}x\overset{T\rightarrow\infty}{\longrightarrow}0.$
(2)

Hence, the agent’s wealth approaches $0$ almost surely, implying that the
gamble is not favourable. As proven via numerical simulations in, for example,
[15], this seemingly paradoxical situation can be explained by noting that the
increasing ensemble average of the wealth trajectory is dominated by the
asymmetry of the final wealth. While almost all agents have negligible wealth,
few have exponentially increasing wealth, which dominates the ensemble
average.

###  II.2 Insurance Paradox

Consider a very fundamental and simple type of insurance, namely an agent,
$A$, faces a risk and another agent, $B$, offers to take over that risk in
exchange for receiving a fee, $F$, typically known as the insurance premium.
The classical economic analysis of the insurance problem is based on the
expected value model, which posits that agent $A$ should accept to pay a fee
lower than the expected value of the risk, whereas $B$ should demand a fee
higher than the expected value of the risk. This anti-symmetry results in no
fee where both agents simultaneously are satisfied, and thus, no contracts
should be agreed upon. The orthodox solution is usually either that the agents
must have an information asymmetry or that “risk aversion” makes the agents
deviate from the supposedly optimal decision [17, 18]. We find this
unsatisfactory as the former is unjustified ad hoc reasoning and the latter
simply raises a new question as to why such risk aversion exits.
Assuming that the risk an agent faces is proportional to their wealth and
optimising time averages, however, Peters and Adamou [5] show that there exist
many situations in which agent $A$ is willing to pay a higher fee than agent
$B$ demands. This framework provides a mechanistic reasoning for the existence
of insurance contracts and shows that insurance is theoretically advantageous
in the long run. These arguments are discussed in more detail in [5, 6], and a
broader scope of cooperation in non-ergodic systems can be found in [19]. We
highlight that behavioural experiments show evidence that humans are capable
of heuristically optimising the time average growth rate when faced with risky
decisions in laboratory settings [20, 21, 22], which gives credibility to the
time solution of the insurance puzzle.

##  III Methods and Models

###  III.1 Insurance among Agents

As we expand on the model in [6, 23, 7], it is prudent to review its results
alongside its model specifications. This model consists of $n$ agents
$i=1,\dots,n$, which are observed at time $t\in(0,T)$. Each agent’s wealth is
initialised at $1$, $w_{i}(0)=1$ $\forall i$, and in each time step, an agent
$A$ with wealth $w_{A}(t)$ is randomly chosen to face a risky gamble: with
probability $p$, $A$ either loses a relative amount of its wealth $c\cdot
w_{A}(t)$ or with probability $1-p$ wins a relative amount $r\cdot w_{A}(t)$.
Note that the simulations in [6, 7] use $c=0.95$, $r=0$ and $p=0.05$ as
parameters, but that the qualitative results do not depend on the exact
parameter choice, as exemplified in [23].
When faced with a risky gamble, agent $A$ approaches another agent ($B$) for
an insurance contract. Agent $B$ will have a minimum fee, $F_{\min}$, where
they will accept to take over $A$’s risk and agent $A$ will have a maximum
fee, $F_{\max}$, they will accept to pay. If $F_{\min}<F_{\max}$, there exist
a range of fees in which signing the contract is mutually beneficial for the
agents, such that the risk and the fee is transferred from agent $A$ to agent
$B$.111For stability reasons we restrict contracts to be formed by enforcing
$w_{B}(t)\geq cw_{A}(t)$ to explicitly ensure agent $B$ can pay for the cost
$cw_{A}(t)$ without defaulting. However, we note that this is not strictly
necessary but has no qualitative effect on the results. To ensure the results
are not an conflated by the number of agents used, we distinguish between a
time step, $t$, and a time unit, $t_{u}$, with a time unit being $N^{2}$ time
steps, i.e. each agent is on average chosen to face a risk ones per time unit.
The ergodicity economics solution to the insurance problem is to focus on time
average growth rates. Recognising that the underlying process of the system is
mainly multiplicative222We recognise that the multiplicative structure of the
simulations is not entirely realistic, and even within the simulation, the
wealth increments are not fully multiplicative. However, these subtle
distinctions are outside the scope of this analysis and part of ongoing
research., it follows that additive wealth increments are not ergodic, but
logarithmic wealth increments are and, therefore, better indicate what happens
over time and allow us to assume an underlying growth rate model $g(\cdot)$
[16, 5]. Comparing agents’ growth rates with $g_{A,B}^{with}$ and without
$g_{A,B}^{without}$ signing an insurance contract at some fee $F$, we can
calculate the maximum fee $F_{\max}$ the agent facing the risk (agent $A$) is
willing to pay, as well as the minimum fee $F_{\min}$ another agent (agent
$B$) is willing to accept. We therefore get that

$\displaystyle\underbrace{\frac{1}{\Delta
t}\ln\left(\frac{w_{A}-F}{w_{A}}\right)}_{g_{A}^{\text{with}}}=\underbrace{\frac{1}{\Delta
t}\left(p\ln\left(\frac{w_{A}-cw_{A}}{w_{A}}\right)+(1-p)\ln\left(\frac{w_{A}+rw_{A}}{w_{A}}\right)\right)}_{g_{A}^{\text{without}}}$
(3) $\displaystyle\Leftrightarrow\quad$ $\displaystyle
F_{\text{max}}=w_{A}\left[1-\exp(g_{A}^{\text{without}})\right]$

for agent $A$ and

$\displaystyle\underbrace{(1-p)\frac{1}{\Delta
t}\ln\left(\frac{w_{B}+F+rw_{A}}{w_{B}}\right)+p\frac{1}{\Delta
t}\ln\left(\frac{w_{B}+F-cw_{A}}{w_{B}}\right)}_{g_{B}^{\text{with}}}=\underbrace{0}_{g_{B}^{\text{without}}}$
(4)

for agent B, where $g_{B}^{\text{without}}=0$ because without the insurance,
only agent $A$ experiences any change during the observed time step. Eq. 4
does not have a general closed-form solution but does have for $p=1/2$. We,
therefore, use this parameter value for our simulation.333This is especially
useful because numerical optimisation of eq. 4 breaks down for sufficiently
small wealth levels.

For $p=1/2$, we get that $F_{\max}$ and $F_{\min}$ are given by

$\displaystyle F_{\max}$
$\displaystyle=w_{A}-(w_{A}+rw_{A})^{0.5}(w_{A}-cw_{A})^{0.5}$ (5)
$\displaystyle F_{\min}$
$\displaystyle=-w_{B}+\frac{1}{2}\sqrt{4w_{B}^{2}+(c+r)^{2}w_{A}^{2}}+\frac{(c-r)w_{A}}{2}.$

For suitable $w_{A}$ and $w_{B}$, $F_{\min}<F_{\max}$ is fulfilled and
therefore, an interval of fees $F$ in $[F_{\min},F_{\max}]$ exist for which
insurance contracts are mutually beneficial for both agents. For simplicity,
choose then the midpoint fee $F=\frac{1}{2}(F_{\min}+F_{\max})$ to sign the
contract. As shown in Fig. 3 of [6], the agents who sign contracts based on
this criterion outperform agents who do not (for example, expected value
optimisers). Interestingly, the simulations show how “large” agents, who act
as the insurance company for all other agents, emerge. However, if such an
agent becomes “too large,” they lose the ability for other agents to insure
its large risk and thus, its growth rate declines until it is no longer larger
than the other agents.

###  III.2 Simulation on a Network

The model in [6] is deliberately simple but showcases two very interesting
findings: First, all agents participating in the insurance contracts profit
compared to the uninsured agents. Second, even though the cooperation reduces
the overall wealth inequality compared to a model without insurance, it still
endogenously creates large wealth differences, leading to the emergence of a
large insurance-company-like agent.
However, the well-mixed setup in which all agents can approach each other is
only realistic for small systems. Therefore, we propose to perform the
simulation on a lattice and allow each agent to approach only its nearest
neighbours to negotiate an insurance contract. The lattice simulation allows
us to investigate the spatial clustering of agents based on relative wealth
levels. We use a lattice coordination number of four and periodic boundary
conditions such that the first and last agents of each row and column are
treated as neighbours. Throughout the simulations, we use a square lattice
with length $N=64$, i.e. $N\times N=2^{12}$ agents [24].

###  III.3 Clustering Evaluation Methods

The main difference between our model and the one presented in [6] is the
spatial constraints, which give rise to the analysis of spatial clustering.
We, however, first investigate the temporal clustering and compare that to the
temporal clustering from the model in [6].

####  III.3.1 Temporal Clustering

To evaluate the temporal clustering of agents, i.e.whether the rich stay rich
and the poor stay poor, we use Spearman’s rank correlation. All agents are
ordered in an enumeration $i=1,\dots,N^{2}$, and we record their ranks
$\rho_{i}(t_{u})$ as the $\text{k}^{\text{th}}$ richest agent for each time
unit $t_{u}$. Spearman’s rank correlation is now the regular Pearson’s
correlation between $\rho(t_{u})$ and $\rho(t_{u}^{\prime})$. For each time
lag $\Delta t_{u}$, multiple pairs $t_{u}-t_{u}^{\prime}=\Delta t_{u}$ exist,
and therefore, we calculate Spearman’s correlation for all pairs with a given
time lag and compute the mean and standard deviations for all of them.

####  III.3.2 Spatial Clustering

A naive approach to evaluate the neighbourhood formation of the richest or
poorest quantile is formulated by defining a clustering coefficient
$\kappa_{clust}$ for each group as the relative amount of agents in this group
which have at least one neighbour from their own group. For the definition of
the groups via deciles and for a sufficiently large ensemble $N\gg 1$,444With
sufficiently large, we mean that when checking whether any of the four sites
is occupied by another member of the same decile, it can be modelled as
sampling without replacement from a group with a relative size of
$\frac{1}{10}$. This holds if $\frac{0.1\cdot
N^{2}-1}{N^{2}}\approx\frac{1}{10}$. the expected clustering coefficient for a
purely random ensemble can be calculated as

$\kappa_{clust}^{random}=1-(1-0.1)^{4}\approx 0.34,$ (6)

and is the chance that none of the i.i.d. four neighbourhood sites is occupied
by another member from the in-group. Approximate confidence intervals of this
quantity can be calculated empirically by simulating a large number of random
matrices and evaluating their $\kappa_{clust}$.

An alternative way to evaluate the spatial clustering closer to the framework
of Ising-like models is to compute the spatial autocorrelation. To this end,
the ensemble matrix is transformed into a binary matrix B with $B_{ij}=1$ if a
member of the group under consideration (i.e. the richest or poorest decile)
is in the $\text{i}^{\text{th}}$ row of the $\text{j}^{\text{th}}$ column and
$0$ otherwise. The autocorrelation matrix is then computed via the function
scipy.signal.correlate2d [25] by correlating B with itself and using the
settings mode =”full”, boundary = ”wrap”, fillvalue=0. This method computes
the full discrete linear cross-correlation of B with itself as a 2-dimensional
array.

##  IV Results: Typical Observations

In an initial run, we set $T_{u}=200$, $c=0.6$ and $r=1.4$. These parameters
are deliberately chosen, such that for an agent without any insurance, this
yields the interesting regime of

$\displaystyle\langle w(t+1)\rangle=1.4w(t)>w(t)$ (7)
$\displaystyle\bar{w}(t+1)=\sqrt{0.96}w(t)<w(t),$ (8)

i.e. from the ensemble perspective, it is advantageous to keep the risk, but
from the time perspective, it is not. This also ensures that the trajectories
do not decay too quickly to zero because $\sqrt{0.96}\lesssim 1$, thereby
guaranteeing numerical stability of the simulation.

###  IV.1 Temporal Clustering

In fig. 1, we show Spearman’s rank correlation, which reveals that even for
large time differences, there is a great ranking correlation showcasing that
there is a large memory in the agents’ wealth ranking. This means that the
general wealth ranking is preserved for extended periods of time, i.e. that,
for example, “large” agents stay as the “large” agents for long. This is
similar to what is observed in [6] and can be related to the well-documented
poverty trap observed in real societies [26, 27].

Figure 1: Spearman’s rank correlation shows a highly significant correlation
in the ranking order of the agents’ wealth levels even after long time lags
for both our network model and the mixed model in [6]. The parameters used for
this simulation are $T_{u}=200$, $N=64$, $c=0.6$ and $r=1.4$. Figure 2: On the
$N\times N$ lattice grid, we highlight the richest 10% of agents (left panel)
and the poorest 10% of agents (middle panel) in our model. As a comparison, we
also show a purely random ensemble of agents (right panel) and highlight its
10% richest agents. Our model shows a marked pattern of clustering into
neighbourhoods when compared to the random matrix. The parameters used for
this simulation were $T_{u}=200$, $N=64$, $c=0.6$ and $r=1.4$.  Figure 3:
Left: Clustering coefficients of the richest and poorest deciles are far above
the expectation for random ensembles. While the clustering emerges faster for
the poorest than for the wealthiest decile, both seem to converge to similar
levels. The confidence interval for the null hypothesis that the geographical
distribution is purely random is calculated via eq. (6) and sampling random
matrices. Right: Autocorrelation function (ACF) for the wealthiest and poorest
deciles in x and y direction. All show essentially the same behaviour and a
notably higher value at the first nontrivial distance than for the random
matrix. The parameters used for this simulation are $T_{u}=200$, $N=64$,
$c=0.6$ and $r=1.4$ for both graphs.

###  IV.2 Spatial Clustering

Figure 4: For $T_{u}=200$ and $N=64$, $c$ and $r$ are varied and the
clustering coefficients for the top and bottom decile are recorded after the
last iteration. Note that $c=r=0.0$ means the absence of gambling dynamics
and, therefore, shows no dynamical behaviour at all. The regime for high
clustering of the bottom decile has contours given by the black lines. These
lines correspond to the onset of degenerate regimes for $F_{\min/\max}$ and
are derived analytically as equations (9) and (10) in section V.1.

After $T_{u}=200$ time units, we observe a notable pattern when plotting the
spatial distribution of the richest or poorest 10% of the agents (fig. 2).
Both deciles form small clusters of neighbourhoods where they have mostly
neighbours from within their own group. Using the clustering coefficient
defined in section III, we find that in the given parameter setting, both
quantiles converge to the same level of clustering and far exceed the
expectation for random matrices, indicating that a significant level of
clustering emerges from the system’s dynamics (fig. 3 left panel).
We further find that (after normalising the autocorrelation matrix with its
maximum) there are no noteworthy differences between the row-wise and column-
wise autocorrelation (corresponding to the x and y directions). Both
directions for both the top and bottom decile show a notably higher
autocorrelation for the first nontrivial lag than the random matrix, thereby
confirming the analysis of the clustering coefficients that rich and poor
neighbourhoods emerge in the system (fig. 3 right panel).

##  V Parameter scan

To check if the clustering observed in the previous section is a general
feature of the model or an artefact of the specific parameter configuration,
we perform a parameter scan across the space of $(r,c)$. For constant $N=64$
and $T_{u}=200$, we vary $c$ across $0,0.05,\dots,0.95$ and $r$ across
$0,0.05,\dots,2$ and calculate the clustering coefficients for each pairing.
We show the results in the $(r,c)$ phase space in fig. 4. By repeating the
analysis with different values for $T_{u}$, we show that the qualitative
behaviour is robust, though with the clustering in both regimes slowly
increasing with larger $T_{u}$.
For both the top and bottom decile, we find a gradual increase in clustering
with $c$ and $r$ (fig. 4). However, for the bottom decile, we find a much more
pronounced behaviour with a well-defined region of high clustering in the
centre of the phase space. We explore this further in section V.1, where we
show that its borders (black lines on right panel of fig. 4) can be derived
analytically and reflect the onset of degenerate values for the fees
$F_{\min/\max}$.

Figure 5: For constant $r=0.5$, $c$ is varied and the autocorrelation of the
poorest decile is plotted. The displayed ACFs are the mean values across the
slices in the x and y directions shown in the right part of fig. 3. The inset
depicts the strength of the first nontrivial autocorrelation value $AC_{1}$
normalised by the maximum autocorrelation $AC_{0}$ which reaches a well-
defined maximum at $c=0.4$.

To visualise how sudden the clustering emerges, we scan through a slice of the
phase space at $r=0.5$ by varying $c$ and plot the autocorrelation function
for the top and bottom decile. Normalising the first nontrivial value of the
ACF by its maximum $AC_{1}/AC_{0}$ reveals a well-defined maximum for the
clustering of the bottom decile as shown in fig. 5. On the contrary, the top
decile (cf. fig. 7 in the appendix) only has a linear increase of
$AC_{1}/AC_{0}$ with $c$ without any indications of a discontinuity. An
exploration of the highly volatile regime in the top right corner of the phase
space is also given in the appendix.

###  V.1 Degenerate Regimes

In [5, 6, 7], the risk agents experience is entirely negative ($c>0$, $r=0)$).
Here, we explore a more general setup, where both $c\geq 0$ and $r\geq 0$ are
varied. Hence, we also simulate regimes where the “risk” is favourable to
agent $A$ ($r\gg c\gtrsim 0$). Hence, the question arises; how does this
affect the fees?
The first degenerate regime is defined as $F_{\max}<0$, i.e. the risk is so
favourable for agent $A$ that they demand to receive money in exchange for
giving away the risk. The border of this regime can be derived from eq. 5 and
is given by

$c=1-\frac{1}{1+r}.$ (9)

Setting the time average growth rate $g_{A}^{\text{without}}\overset{!}{=}0$,
i.e. having no time average growth or decline for the individual, leads to the
same condition for $c$. This degeneracy line is shown as a solid black curve
in the right panel of fig. 4. Everything below this curve results in
$F_{\max}<0$.

Similarly, from agent $B$’s perspective, the question becomes, when is
$F_{\min}<0$, i.e. when is agent $B$ willing to pay the agent $A$ to take over
the risk? Because both agents’ wealth levels $w_{A}$ and $w_{B}$ are necessary
to calculate $F_{\min}$ in (5) and their relative difference $w_{A}/w_{B}$ can
vary wildly, there exists no analytical solution to this. However, in the case
of $w_{B}\gg w_{A}$ we can rewrite (5) as

$\displaystyle 0\overset{!}{=}F_{\min}$
$\displaystyle=-w_{B}+\frac{1}{2}\sqrt{4w_{B}^{2}+(c+r)^{2}w_{A}^{2}}+\frac{(c-r)w_{A}}{2}$
(10)
$\displaystyle=-w_{B}+\frac{1}{2}w_{B}\sqrt{4+\epsilon^{2}}+\frac{(c-r)w_{A}}{2}$
$\displaystyle=-w_{B}+\frac{1}{2}w_{B}\left(2+\mathcal{O}\left(\epsilon^{2}\right)\right)+\frac{(c-r)w_{A}}{2}$
$\displaystyle\approx\frac{(c-r)w_{A}}{2}$ $\displaystyle\Rightarrow c=r,$

by setting $\epsilon=\frac{(c+r)w_{A}}{w_{B}}\ll 1$ and using first-order
Taylor expansion.555Note that as discussed in [5], when
$w_{A}/w_{B}\rightarrow 0$, the time average of the risk approaches the
expected value from agent $B$’s perspective. This expression is, therefore,
identical to using the expected value operator. The condition $c=r$ is shown
as a dashed line in the right panel of fig. 4.
As seen in fig. 4 (left panel), there is no immediate connection between the
degeneracy regimes and the clustering in the top decile. However, for the
poorest decile (fig. 4, right panel), the degeneracy lines approximate the
contours of the regime of high clustering. Clustering into poor
neighbourhoods, thus, happens if $c\geq 1-\frac{1}{1+r}$ ((9)) and if $r>c$
((10) under the condition that $w_{B}\gg w_{A}$).

##  VI Discussion

Figure 6: Wealth trajectories of the agents and their median wealth for
$T=200$, $r=1.4$, $c=0.6$, $N=64$ and an interaction radius for nearest-
neighbours (blue), next-nearest-neighbours (red) and next-next-nearest-
neighbours (green). The median trajectories are almost the same and far
outperform the expectation for the time average of any individual agent
without insurance (Expected TA).

###  VI.1 Summary

The model presented in this paper is an extension of the agent-based model
presented in [6, 7]. We find that despite restricting the agents’ ability to
make contracts to their nearest neighbours on a spatially restricted grid, the
overall conclusion from [6], i.e. that insurance is advantageous in the long
run for all agents, still holds. However, we find that the general wealth
ranking is preserved for shorter periods of time, indicating that not having
spatial constraints leads to what can be thought of as monopoly-like
structures, consistent with tendencies in society with increasingly global
access through the internet. We, though, highlight that the memory in the
system with spatial constraints is still high, which is consistent with the
well-documented poverty trap observed in real societies [26, 27]. We further
find that this restriction leads to a rich phenomenology of spatial cluster
formations, again similar to what we see in the real world. While the
clustering of the wealthiest agents increases continuously for larger
parameters $r$ and $c$, we find that the poorest agents only exhibit high
clustering for particular combinations of $(r,c)$ and that this regime can
approximated by the degeneracy lines.

###  VI.2 Model Relevance

While including spatial constraints to the insurance model presented in [6] is
an attempt to explore a more realistic system, we recognise that the system is
still a very simplified representation of the world. A question we have been
faced with is why we do not include specific insurance companies rather than
having the insurer simply be another agent in the system. This admittedly is
closer to the real world. However, this is an unnecessary restriction to the
model: Even if a large insurance company exist, one still has to rely either
on the non-satisfactory solutions discussed earlier or on the time solution
provided here to solve the insurance paradox, and as the argument often is
that such an insurance company can offer contracts as expected value (either
through having such high wealth that the time average of the risk approaches
the expected value or through having access to the actual ensemble),
cooperation through insurance would only be stronger than what we present. We,
therefore, see our model as more general.

###  VI.3 Relation to Classical Cooperation

This form of insurance can be considered a restricted form of cooperation.
Although the setup on the lattice network restricts the agents in our model,
the cooperation is still beneficial for them, which is in line with previous
findings. Studies on evolutionary game theory have shown that cooperative
strategies can become dominant over the defectors’ strategy purely due to the
effect of fluctuations on the reward [28, 29]. This has also been studied
within the time average framework, where cooperation is similarly found to be
stable, i.e. defecting is not advantageous [30], which has been backed by
empirical studies [31, 32, 33]. An important note, however, on this pure form
of cooperation is that trust does play a role. Despite the fact that full
cooperation is mathematically stable and defecting can be shown not to be
advantageous, this is only in the long run; if you give a large part of your
wealth to someone in an attempt to cooperate and they decide to defect, it is,
of course, not advantageous for you. This is not a consideration in our model,
as both agents improve their growth rate in every time step when they sign a
contract and therefore need not worry about what the other agent does in the
future: taking the deal is good regardless. Whether there is a path from non-
cooperation through insurance-like cooperation to full cooperation is the
subject of ongoing research. Expanding the neighbourhood of potential
insurance partners in an exploratory analysis indicates only minor effects on
the median wealth fig. 6.

###  VI.4 Spatial Clustering

The main feature of this model compared to [6] is the study of spatial cluster
formations. Whenever the volatility is high enough, the top decile of agents
tends to cluster into neighbourhoods while the bottom decile displays a
similar behaviour in a specific parameter regime. The emergence of rich and
poor neighbourhoods might superficially resemble kin selection [34]. However,
such a mechanism is not present in our model’s algorithm. Instead, the
clustering emerges endogenously: Rich agents do not choose to connect with
other rich agents but rather become and stay rich because there are other rich
agents in their neighbourhoods. Indeed, the original model already shows that
a rich agent eventually collapses if no other agent is rich enough to insure
their risk [6, 7, 35]. Hence, with our spatial constraint, only agents with
other rich neighbours have a chance to stay rich in the long run. This
phenomenon might be interpreted as a special case of network reciprocity
described by Nowak [34].

###  VI.5 Persistent Inequality

As shown in fig. 1, the Spearman correlation with the spatial constraints is
lower than the Spearman correlation found using the well-mixed model presented
in [6]. This is an interesting finding when we compare it to, for example, the
two theories for the emergence of poverty traps discussed in [26]: Scarcity-
driven and friction-driven. The scarcity-driven poverty traps describe a
different behaviour of agents under the pressure of extreme scarcity, whereas
the friction-driven poverty traps describe situations in which market
inefficiencies or different initial conditions lead agents with identical
decision criteria to different wealth trajectories. We note that the
inequality/memory in the system can be thought of as scarcity-driven: As some
agents have much less wealth, the specific risk is much greater to them than a
richer agent, and they are thus willing to pay a greater fee. However, this is
identical whether including spatial constraints or not. Interestingly, we find
the opposite to friction-driven inequality: Including spatial constraints
clearly a market inefficiency, but we find that the memory of the system is
greater without it. We suspect that this can be explained by monopoly-like
structures which emerge in the well-mixed system but are not possible with the
spatial constraint. We, though, highlight that in both our and the well-mixed
system, there are no inefficiencies in forming contracts (such as
administration costs), nor any agents acting in bad faith (such as agents
demanding higher prices than based on their own assessment), which might
change these results.

###  VI.6 Generalisation of the Original Model Gives Rise to Negative Fees

Another extension of [6] is to include a positive outcome of the gamble with
reward $r>0$ in addition to the harmful cost $c$. We show that this can lead
to regimes where it might be mutually beneficial to have $F\leq 0$, i.e. the
“insurer” pays an amount to take over the risk. The phase space spanned by the
two parameters $(r,c)$ in fig. 4 shows that the bottom quantile’s clustering
corresponds to the two degeneracy lines (eq. 9 and eq. 10) derived in section
V.1. Eq. 9 marks the regime at which $F_{\max}<0$ and the time average growth
rate of the gamble becomes neutral, while eq. 10 indicates the regime where
the ensemble average becomes neutral and, under the condition $w_{A}\ll
w_{B}$, $F_{\min}$ can become negative. It might be tempting to dismiss the
regimes with negative fees as beyond the scope of an insurance model. However,
this analysis shows that there are no qualitative differences or
irregularities in the model behaviour in the different regimes:

First, the condition $F_{\min}<F_{\max}$ is still a meaningful model of
reality. Consider $F_{\min}<0<F_{\max}$ as discussed above. The negative
$F_{\min}<0$ of agent $B$ means that they want to acquire the risk, while the
positive $F_{\max}>0$ of agent $A$ means that they want to get rid of it. In
this scenario, a transfer at e.g. $F=0$ (fulfilling $F_{\min}<F=0<F_{\max}$)
is beneficial for both of them. Alternatively, if both $F_{\min}<F_{\max}<0$,
then one can more easily understand the setup by reversing the signs and
considering the price $P_{B}=-F_{\min}$ that agent $B$ is willing to pay and
$P_{A}=-F_{\max}$ that agent $A$ demands. Now, $0<P_{A}<P_{B}$ and agent $B$
is willing to match agent $A$’s demanded price. The interested reader can play
around with the parameters for $F_{\min}<0<F_{\max}$ and $F_{\min}<F_{\max}<0$
to verify that the condition $F_{\min}<F_{\max}$ still yields sensible
results.

Second, the regime of high clustering is characterised by $F_{\max}>0$ and the
possibility that $F_{\min}<0$ if $w_{A}\ll w_{B}$, i.e. if $B$ is much
wealthier than $A$, it will consider the gamble (whose reward and cost are
relative to $A$’s wealth) so advantageous that $B$ offers $A$ money
($F_{\min}<0$) to reap the potential rewards. At the same time, the risk $c$
is so large relative to $A$’s wealth that $A$ is willing to pay money in order
to get rid of the risk. This is just a more extreme version of the risk
assessment $0<F_{\min}<F_{\max}$ in the non-degenerate regime and illustrates
that purely by considering time averages, the agents can come to mutually
beneficial deals without assuming the existence of any subjective utility
functions or subjective risk assessment [5]. Both agents operate under the
same rules, but the time average considerations lead them to different risk
assessments based on their individual wealth $w_{A/B}$.

Third, if $F_{\min}<F_{\max}<0$, one can rethink this setup as modelling
employment rather than insurance contracts. While insurances are used to
replace $A$’s overall detrimental risk with a fixed payment from $A$ to $B$,
one can think about employment in similar terms. Now, $A$ can work as a self-
sustained freelancer and, while being mostly profitable, has varying success.
Alternatively, $A$ can be hired by another agent $B$ and give $B$ the
(varying) rewards of its work while, in return, getting a fixed income (a
negative fee $F<0$ corresponds to $A$ getting $-F$ from $B$). This regime is
considered in more detail in [36] but arises naturally from our model’s
parameter scan as another regime of cooperation in the face of uncertainty.

###  VI.7 Further Work

We consider this a first attempt to generalise the model presented in [6].
Firstly, we find qualitatively similar results on the benefits in the long run
of evaluating the risk using time average growth rates, which leaves the
question of whether any non-trivial network structures lead to qualitatively
different results open. Secondly, our spatial constraint reveals a decreased
memory in wealth ranking. The question now is: How much does the temporal
autocorrelation change if the neighbourhood of the agents is expanded or if
the network structure is changed? And are there any configurations that lead
to qualitatively different results? Lastly, we recognise that consumption is
an important feature in real systems [37]. This leads to the possibility of
bankruptcy, which in this model is equal to being erased from the system. We
are aware of no solutions for dealing with such a problem on a non-ad-hoc
basis, but we would be interested in discussing possible solutions. In
general, we hope this paper will inspire researchers to explore the insurance
problem further through the lens of time average considerations.

###### Acknowledgements.

The authors thank the organisers and participants of the Ergodicity Economics
2024 conference for their valuable feedback and discussions. Tobias Wand is
supported by the Studienstiftung des deutschen Volkes (German Academic
Scholarship Foundation). Benjamin Skjold is supported by a Novo Nordisk
Exploratory Interdisciplinary Synergy grant (ref NNF20OC0064869).

## References

  * Zhang [1991] W.-B. Zhang,  _Synergetic Economics_ (Springer Berlin Heidelberg, 1991).
  * Allen [2007] P. Allen, Self-organization in economic systems (Edward Elgar Publishing, 2007) pp. 1111–1148.
  * Strogatz [2000] S. Strogatz,  _Nonlinear Dynamics and Chaos: With Applications to Physics, Biology, Chemistry and Engineering_ , Studies in nonlinearity (Westview, 2000).
  * Foster [1993] J. Foster, Economics and the Self-Organisation Approach: Alfred Marshall Revisited?, The Economic Journal 103, 975 (1993), https://academic.oup.com/ej/article-pdf/103/419/975/27042593/ej0975.pdf .
  * Peters and Adamou [2017] O. Peters and A. Adamou, Insurance makes wealth grow faster (2017), arXiv:1507.04655 [q-fin.RM] .
  * Peters [2023] O. Peters, Insurance as an ergodicity problem, Annals of Actuarial Science 17, 215–218 (2023).
  * Peters and Skjold [2023] O. Peters and B. Skjold, LMLhub/AAS_editorial_figures_July2023: v1.0.0 initial release (2023), code published on zenodo.
  * Ising [1925] E. Ising, Beitrag zur theorie des ferromagnetismus, Zeitschrift für Physik 31, 253–258 (1925).
  * Onsager [1944] L. Onsager, Crystal statistics. i. a two-dimensional model with an order-disorder transition, Phys. Rev. 65, 117 (1944).
  * Nowak and May [1992] M. A. Nowak and R. M. May, Evolutionary games and spatial chaos, Nature 359, 826–829 (1992).
  * Sznajd-Weron and Sznajd [2000] K. Sznajd-Weron and J. Sznajd, Opinion evolution in closed community, International Journal of Modern Physics C 11, 1157 (2000).
  * Stauffer [2008] D. Stauffer, Social applications of two-dimensional ising models, American Journal of Physics 76, 470–473 (2008).
  * Sornette [2014] D. Sornette, Physics and financial economics (1776–2014): puzzles, ising and agent-based models, Reports on Progress in Physics 77, 062001 (2014).
  * Schelling [1971] T. C. Schelling, Dynamic models of segregation, The Journal of Mathematical Sociology 1, 143 (1971).
  * Peters and Adamou [2018] O. Peters and A. Adamou, Ergodicity economics lecture notes (2018).
  * Peters and Gell-Mann [2016] O. Peters and M. Gell-Mann, Evaluating gambles using dynamics, Chaos: An Interdisciplinary Journal of Nonlinear Science 26, 023103 (2016).
  * Chiappori  _et al._ [2006] P.-A. Chiappori, B. Jullien, B. Salanié, and F. Salanié, Asymmetric information in insurance: General testable implications, The RAND Journal of Economics 37, 783 (2006).
  * Arrow [1971] K. J. Arrow, The theory of risk aversion, Essays in the theory of risk-bearing , 90 (1971).
  * Peters and Adamou [2022] O. Peters and A. Adamou, The ergodicity solution of the cooperation puzzle, Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences 380, 10.1098/rsta.2020.0425 (2022).
  * Meder  _et al._ [2021] D. Meder, F. Rabe, T. Morville, K. H. Madsen, M. T. Koudahl, R. J. Dolan, H. R. Siebner, and O. J. Hulme, Ergodicity-breaking reveals time optimal decision making in humans, PLOS Computational Biology 17, 1 (2021).
  * Vanhoyweghen and Ginis [2023] A. Vanhoyweghen and V. Ginis, Human decision-making in a non-ergodic additive environment, Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences 479, 10.1098/rspa.2023.0544 (2023).
  * Skjold  _et al._ [2023] B. Skjold, S. R. Steinkamp, C. Connaughton, O. J. Hulme, and O. Peters, Are risk preferences optimal?, Preprint available at 10.31219/osf.io/ew2sx (2023).
  * Skjold and Peters [2023a] B. Skjold and O. Peters, Insurance as an ergodicity problem , https://ergodicityeconomics.com/2023/08/08/insurance-as-an-ergodicity-problem/ (2023a), [Online; accessed 11-August-2023].
  * [24] Upon acceptance of the article, our simulation code will be made available on zenodo.
  * Virtanen  _et al._ [2020] P. Virtanen, R. Gommers, T. E. Oliphant, M. Haberland, T. Reddy, D. Cournapeau, E. Burovski, P. Peterson, W. Weckesser, J. Bright, S. J. van der Walt, M. Brett, J. Wilson, K. J. Millman, N. Mayorov, A. R. J. Nelson, E. Jones, R. Kern, E. Larson, C. J. Carey, İ. Polat, Y. Feng, E. W. Moore, J. VanderPlas, D. Laxalde, J. Perktold, R. Cimrman, I. Henriksen, E. A. Quintero, C. R. Harris, A. M. Archibald, A. H. Ribeiro, F. Pedregosa, P. van Mulbregt, and SciPy 1.0 Contributors, SciPy 1.0: Fundamental Algorithms for Scientific Computing in Python, Nature Methods 17, 261 (2020).
  * Ghatak [2015] M. Ghatak, Theories of poverty traps and anti-poverty policies, The World Bank Economic Review 29, S77–S105 (2015).
  * Boix [2010] C. Boix, Origins and persistence of economic inequality, Annual Review of Political Science 13, 489 (2010).
  * Stollmeier and Nagler [2018] F. Stollmeier and J. Nagler, Unfair and anomalous evolutionary dynamics from fluctuating payoffs, Phys. Rev. Lett. 120, 058101 (2018).
  * Stollmeier [2018] F. Stollmeier,  _Evolutionary Dynamics in Changing Environments_ , Ph.D. thesis, Georg-August-Universität Göttingen (2018).
  * Fant  _et al._ [2023] L. Fant, O. Mazzarisi, E. Panizon, and J. Grilli, Stable cooperation emerges in stochastic multiplicative growth, Phys. Rev. E 108, L012401 (2023).
  * Aktipis  _et al._ [2016] A. Aktipis, R. de Aguiar, A. Flaherty, P. Iyer, D. Sonkoi, and L. Cronk, Cooperation in an uncertain world: For the maasai of east africa, need-based transfers outperform account-keeping in volatile environments, Human Ecology 44, 353 (2016).
  * Aktipis  _et al._ [2011] C. A. Aktipis, L. Cronk, and R. de Aguiar, Risk-pooling and herd survival: An agent-based model of a maasai gift-giving system, Human Ecology 39, 131 (2011).
  * Dahl and Hjort [1976] G. Dahl and A. Hjort,  _Having herds: Pastoral herd growth and household economy_ (Department of Social Anthropology, University of Stockholm, 1976).
  * Nowak [2006] M. A. Nowak, Five rules for the evolution of cooperation, Science 314, 1560–1563 (2006).
  * Skjold and Peters [2023b] B. Skjold and O. Peters, Personal communication (2023b).
  * Chvykov and Warren [2024] P. Chvykov and J. N. Warren, Is salary just a negative insurance premium? (2024), presentation given at Ergodicity Economics Conference.
  * Lucas [1978] R. E. Lucas, Asset prices in an exchange economy, Econometrica 46, 1429 (1978).

### Appendix: ACF for the Richest Decile

Figure 7: The same plot as fig. 5 but for the richest decile. The ACF seems to
continuously increase with rising $c$.

### Appendix: Highly Volatile Regime

The phase space in fig. 4 reveals that a particularly high clustering for both
the top and bottom quantile can be found in a region of high $c$ and high $r$,
i.e. where the volatility of the gamble is very large in both directions.
While the low-volatile regime transitions into the deterministic case, it is
not obvious how the model behaves in the high-volatile regime. To investigate
this, we explore a highly volatile system with $c=0.95$ and $r=2$.
In fig. 8 left panel, we show the richest (white), middle (grey) and poorest
(black) third of the agents and the ACF (right panel) of the richest and
poorest thirds. We see that the ACF for both have fat tails compared to the
ACF of a random ensemble, reflecting the high degree of clustering seen in the
left panel. The formation of large, macrocsopic neighbourhood areas for both
the richest and the poorest third is clearly visible in this plot, whereas the
middle third mostly forms a thin boundary layer between the two extremes
instead of manifesting into large-scale neighbourhoods. Hence, the
neighbourhood map shows a high polarization, reminiscent of the magnetic
domains in ferromagnets. This superficial similarity should not be taken too
seriously, though. The magnetic domains form because of energetic
considerations of the macroscopic magnetic field, whereas our model and the
Ising model are microscopic descriptions.

Figure 8: Results after $T=200$ time units for $N=64$ in the highly volatile
regime of $c=0.95$ and $r=2$. Left: The colour coding now shows the agents
divided into three categories as the richest (white), central (grey) and
poorest thirds (black). Right: The ACF of the richest and poorest decile now
shows much wider tails than in the previous parameter setting in fig. 3.