# Circularity of trade
This is categorised as an [account metric](/xnUSdbbaQS-wn0KmIYRh-Q).
Circularity is a concept which seems to have a clear intuitive sense, and is related to other concepts such as 'sustainability,' 'viability' and 'resilience.'
This note attempts a rigorous definition of circularity as something that can be quantified by examining the flow of credit between individual accounts and the network structure of a club comprised of these accounts. It is therefore a [property of a club](/0Pyj0CjtSP65hYzq0AdTQQ) (although it should be clear how the activities of [individual accounts](/xnUSdbbaQS-wn0KmIYRh-Q) contribute to the overall circularity).
Desired properties of a circularity metric:
* Captures the essential features of what corresponds to an intuitive sense of 'circularity,' with an unambiguous relationship between a good score and good real-world club functioning.
* Derived in a straightforward manner from the activities of individual accounts, making it easy to identify interventions at the member level that will address the underlying cause of a bad score.
* Straightforward to calculate with the necessary data easily obtainable.
* Dimensionlessness: there is no 'unit of circularity,' so the metric should be a dimensionless quantity.
* Scale-free: it should be applicable and give consistent results regardless of the size of the club, account turnovers and balance limits.
* Variety-agnostic: it should be applicable to clubs made up of businesses from diverse sectors as well as industry verticals.
* Easy to interpret: if formulated as a coefficient, it should take positive values only ('negative circularity' doesn't seem like a useful concept) and it should be normalised such that values are intuitive (zero corresponding to no circularity, one to perfect circularity).
* If composed of multiple elements (e.g. topological features of the network combined with account balance metrics) these should be independent/non-correlated.
* In addition to non-correlation with other circularity measures, optimising each element should not adversely affect any other desirable attributes of a club unrelated to circularity.
The strict definition of circularity given here should make it easier to think about how it may be related to other concepts such as viability or resilience, each of which should also be carefully formulated on the basis of measurable variables such that clear, consistent and evidence-based decisions can be made by network convenors or administrators. Such decisions may include:
* Initial viability checking: is it worth starting a club with a given set of members? (As an example of why it is useful to clearly define concepts such as circularity and viability, a club may be judged 'viable' if the putative members already have some degree of circular intertrade in fiat currency, AND there are a sufficient number and variety of them - as per the above properties, circularity is by design a scale-free quantity and does not take into account how diverse the participating businesses are).
* Applicant suitability checking: will the new member increase the potential for circularity?
* From the other direction, what would be necessary to bring additional circularity to the club?
## A proposed circularity metric
The desired properties listed above can be achieved by combining three separate elements:
- Retention of credit $R$: the probability with which members spend credit with other members of the same club (as opposed to other clubs via the intertrade account).
- Zero crossing frequency $\overline{f}$: the average probability that each member's account balance will change from positive to negative or vice versa for any given transaction.
- Saturation of trade relationships $S$: the degree to which the potential number of bilateral trading relationships within the club is realised.
Each of these is formulated as a dimensionless coefficient ranging from zero to one. Circularity is defined as:
$$C = R\times \overline{f}\times S.
$$
Each of these components are explained with examples below.
### Retention of credit
The fraction of club member $M_i$’s trade value that is not spent with other members (i.e. leaves via the [intertrade account](https://matslats.net/credit-commons-accounting)) of its club is given by:
$$g_{M_{i}}=\frac{Q_{M_{i_{out}}}}{Q_{M_{i_{out}}}+Q_{M_{i_{in}}}}$$
$g_{M_i}$ can be interpreted as the probability that a unit of credit spent or issued by $M_i$ in the [analysis period](/conspoQ5TNmH5pfZqp-LfQ) under consideration will directly leave the club over the same period. Some properties:
* If $Q_{M_{i_{out}}}=$ 0, $g_{M_{i}} =$ 0;
* If $Q_{M_{i_{in}}}=$ 0, $g_{M_{i}} =$ 1.
For the club $C_j$ as a whole the average of this fraction across all $\tilde{N}$ active members is:
$$\overline{g_{C_j}}=\frac{1}{\tilde{N}}\sum_{i=1}^{\tilde{N}}\frac{Q_{M_{i_{out}}}}{Q_{M_{i_{out}}}+Q_{M_{i_{in}}}}$$
NB: if $Q_{M_{i_{out}}}=Q_{M_{i_{in}}}=$ 0 then the member has not been active (has had zero [trading relationships](/XjdV4nYTTu-qjqJJibLXEA)) and is not counted in $\tilde{N}$.
From the properties of $g_{M_i}$ noted above it is immediately obvious that $\overline{g_{C_j}} =$ 0 corresponds to perfect containment of credit within the club, whilst $\overline{g_{C_j}} =$ 1 means credit only ever flows directly out. Note however that $\overline{g_{C_j}}$ is not the probability that any given unit of credit spent or issued will leave the club, which is given by:
$$P_{C_j}=\frac{\sum_{i=1}^{\tilde{N}}Q_{M_{i_{out}}}}{\sum_{i=1}^{\tilde{N}}(Q_{M_{i_{out}}}+Q_{M_{i_{in}}})} $$
This gives a slightly different value to $\overline{g_{C_j}}$ but shares the properties noted above. The 'retention' can be defined as $R=1-P$. Note that so long as any credit spent outside of the club is balanced by credit coming in (i.e. the [balance of trade](/e0Z2fSQdSYmzIlsVzNknNg) is zero), then $R<$ 1 is sustainable. Even $R=$ 0 can be sustained indefinitely, but the club acts purely as a source of credit. If the club(s) it is sending credit to also have $R=$ 0, they act as components in a linear chain.
Although retention is therefore a clear requirement for circularity, it is not sufficient; if all credit spent by members of a club is flowing to a single member then $P=\overline{g}=$ 0 and $R=$ 1. Similarly, a club with $\tilde{N}/2$ pairs engaging only in one-way trade would show perfect retention, but clearly neither of these cases could be described as circular or sustainable as any given member only ever either gains or loses credit. This leads on to the next component of circularity.
### Zero crossing frequency
See also [balance inequality](/LVypX41ZTJCDQrcnbZ3aKw) and [balance vector](/RK0pk9ncTfOugxtb22ZiyA).
The tendency of an account to remain close to zero can be easily quantified by the number of times $w_{M_i}$ it passes through or attains zero relative to number of transactions $n_{M_i}$ with other club members it has engaged in (from [notation for trades](/2iRH2t-QRLOYL3cHkbCgTw) $n$ denotes the number of times a member spends credit internally). This defines the 'zero crossing frequency:'
$$f_{M_i} = \frac{w_{M_{i}}}{n_{M_i}}
$$
The average across the entire club is simply:
$$ \overline{f_{C_j}} = \frac{\sum_{i=1}^{\tilde{N}} f_{M_i}}{\tilde{N}}
$$
In the two examples given at the end of the last section to illustrate why retention is necessary but not sufficient for circularity, for all accounts $w_{M_i}=$ 0 and so $\overline{f_{C_j}}=$ 0. The starting balance of zero should not be counted as an instance of $w_{M_i}$; if it was, then $\overline{f_{C_j}}$ will always be non-zero even in such cases.
Some example sequences are given in the tables below.
In the first case $M_1$ and $M_2$ conduct an alternating series of transactions of equal value, starting with $M_1$ spending $q$ credits with $M_2$:
| $n_{M_1}$ | $n_{M_2}$ | $b_{M_1}$ | $b_{M_2}$ | $w_{M_1}$ | $w_{M_2}$ | $f_{M_1}$ | $f_{M_2}$ | $\overline{f_{C_j}}$ |
| - | - | - | - | - | - | - | - | - |
| 1 | 0 | $-q$ | $q$ | 0 | 0 | 0 | 0 | 0 |
| 1 | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 1 |
| 2 | 1 | $-q$ | $q$ | 1 | 1 | 0.50 | 1 | 0.75 |
| 2 | 2 | 0 | 0 | 2 | 2 | 1 | 1 | 1 |
| 3 | 2 | $-q$ | $q$ | 2 | 2 | 0.67 | 1 | 0.83 |
| 3 | 3 | 0 | 0 | 3 | 3 | 1 | 1 | 1 |
| 4 | 3 | $-q$ | $q$ | 3 | 3 | 0.75 | 1 | 0.88 |
| 4 | 4 | 0 | 0 | 4 | 4 | 1 | 1 | 1 |
When both parties have carried out an equal number of transactions $\overline{f_{C_j}}=$ 1, reflecting the perfect symmetry of exchange in both transaction number and value. Where $n_{M_1} \neq n_{M_2}$, as the number of trades increases the value of $f$ for the party that first spent credit (and hence $\overline{f_{C_j}}$) tends towards one. This can be interpreted as an instantaneous asymmetry in balances being given progressively less 'weight' in the calculation of $\overline{f_{C_j}}$ as a history of equal exchange is built up over the analysis period.
In the second case, $M_1$ spends $n_{M_1} \times q$ credits over the course of $n_{M_1}$ successive transactions, followed by a single repayment from $M_2$ that restores both balances to zero. For example:
| $n_{M_1}$ | $n_{M_2}$ | $b_{M_1}$ | $b_{M_2}$ | $w_{M_1}$ | $w_{M_2}$ | $f_{M_1}$ | $f_{M_2}$ | $\overline{f_{C_j}}$ |
| - | - | - | - | - | - | - | - | - |
| 1 | 0 | $-q$ | $q$ | 0 | 0 | 0 | 0 | 0 |
| 2 | 0 | $-2q$ | $2q$ | 0 | 0 | 0 | 0 | 0 |
| 3 | 0 | $-3q$ | $3q$ | 0 | 0 | 0 | 0 | 0 |
| 4 | 0 | $-4q$ | $4q$ | 0 | 0 | 0 | 0 | 0 |
| 5 | 0 | $-5q$ | $5q$ | 0 | 0 | 0 | 0 | 0 |
| 5 | 1 | 0 | 0 | 1 | 1 | 0.2 | 1 | 0.6 |
In this class of scenarios $\overline{f_{C_j}}$ is inversely proportional to $n_{M_1}$, as shown in the table:
| $n_{M_1}$ | $n_{M_2}$ | $b_{M_1}$ | $b_{M_2}$ | $w_{M_1}$ | $w_{M_2}$ | $f_{M_1}$ | $f_{M_2}$ | $\overline{f_{C_j}}$ |
| - | - | - | - | - | - | - | - | - |
| 2 | 1 | 0 | 0 | 1 | 1 | 0.5 | 1 | 0.75 |
| 5 | 1 | 0 | 0 | 1 | 1 | 0.2 | 1 | 0.60 |
| 10 | 1 | 0 | 0 | 1 | 1 | 0.1 | 1 | 0.55 |
As $n_{M_1}$ tends to infinity, $\overline{f_{C_j}}$ tends to 0.5. Again this can be interpreted as weighting by history; it implies that a situation where one party is reliant on a single large repayment to balance continuous expenditure is less desirable than one with a greater degree of exchange symmetry, even if the end result is the same.
If the repayment is broken down into chunks, $\overline{f_{C_j}}$ drops even further; if $n_{M_1}=$ 10 and $n_{M_2}=$ 2, $\overline{f_{C_j}}=$ 0.3 (when $n_{M_1}=n_{M_2}$, $\overline{f_{C_j}}=\frac{1}{n_{M_{1}}}$). If such a pattern is sustained, the result will be a regular oscillation in balances with the 'wavelength' proportional to the number of chunks that (re)payments are broken down into (assuming equal transaction intervals). A large wavelength corresponds to long periods during which balances are far from zero, reflected in a low value of $\overline{f_{C_j}}$.
These results illustrate that a high zero crossing frequency is desirable in bilateral exchange; the first example is the 'ideal' scenario and invariably results in a high and increasing value of $\overline{f_{C_j}}$ as the pattern is sustained, whilst in the second an essentially opposite situation is constructed and shown to result in low and decreasing values of $\overline{f_{C_j}}$ as imbalances persist. It seems plausible to assume that cases corresponding to an intuitive sense of intermediate 'desirability' will result in values of $\overline{f_{C_j}}$ between these two extremes, but unless this can be proved rigorously counter-examples should be sought.
These findings generalise in a straightforward manner to more complex sets of trading relationships among multiple parties; any member that does not see its balance return to zero on a regular basis (relative to the number of transactions it engages in) will likely either soon reach one of its balance limits or is overly reliant on payments from a single partner (or possibly a set of partners that it transacts with in sync) to counteract its other relationships.
These examples have assumed that the sum (and hence the mean) of all account balances in a club is zero, which corresponds directly to a [balance of trade](/e0Z2fSQdSYmzIlsVzNknNg) $b_{C_j}$ of zero. If $b_{C_j}\neq$ 0, there will be an offset in some account balances that will distort the zero crossing frequency. All other things being equal, the effect of a running net surplus is the same as a deficit, both acting to reduce $\overline{f}$.
Additionally, this means that $\overline{f}$ is correlated with the retention $R$, since this latter is in turn correlated with the balance of trade. Since the elements of circularity should ideally be independent this is undesirable, and indeed there is no reason to couple a non-zero balance of trade (corresponding to inequality between clubs) to trading patterns within clubs.
Assuming any cumulative surplus or deficit has become evenly distributed among all members of the club that have ever been active, $b_{C_j}/N$ should be subtracted from each account balance $b_{M_i}$ before finding $w_{M_i}$; this correction should largely remove both the zero crossing distortion and the $R$-correlation. Note that since the balance of trade should be kept close to zero in the interests of club sustainability and $N$ should be of order 100, $b_{C_j}/N$ should in all cases be small. The bias introduced by assuming that any surplus or deficit becomes evenly distributed will be even smaller, and if digital labelling and tracking of every unit of credit is implemented then correction on an account-by-account basis becomes possible.
### Saturation of trading relationships
[Complete graphs](https://en.wikipedia.org/wiki/Complete_graph)
Returning to the two example clubs introduced at the end of the first section, even though sets of exchanges within these network structures that result in high retention and high zero crossing frequency might be sustainable, neither are circular in any meaningful sense; the first represents an extreme degree of [centralisation](https://hackmd.io/lEM9FfewRfqzPpoJWV-MKQ) and in the second there are no sets of trading relationships in which more than two members are connected (the only [path](https://en.wikipedia.org/wiki/Path_(graph_theory)) length present is 1). A metric that reflects network topology is therefore necessary.
One approach could be to construct a composite measure for the whole network based on average centralility and average path length, but it is not immediately obvious how to normalise these quantities. One option could be to define an equivalent of the Gini coefficient, as is done to quantify [balance inequality](/LVypX41ZTJCDQrcnbZ3aKw) (with the difference that because neither centrality or path length can be negative, the mean can be used in both cases, as with the original Gini coefficient). However, this would mean introducing a further variable that depends on inequality into the circularity metric; persistent inequality is already reflected in a low zero crossing frequency, although by design $\overline{f}$ does not explicitly consider the actual distribution of balances (it is a proxy of inequality). There are also well-known difficulties in interpreting the Gini coefficient. Finally, keeping circularity and inequality as separate as possible will make it easier to specify interventions in the network according to which metric they are targeting.
A further normalisation option would be to compare the actual values to the 'ideal' situation. This could be defined as uniform centrality and all members sitting along at least one path that is the maximum possible given the size of the club. However, since this corresponds to a situation where all members are connected directly to each other, it is only necessary to consider the number of actual [trading relationships](/XjdV4nYTTu-qjqJJibLXEA) $Z$ as a fraction of the possible number; both average centrality and average path length will increase in proportion to this quantity. In short, a fully 'saturated' network in which all possible connections have been made will include by necessity the maximum possible path length and uniform degree, closeness and betweeness centrality. This approach is simple and avoids introducing anything directly related to balance inequality. The saturation is therefore defined as:
$$S= \frac{Z}{\tilde{N}(\tilde{N}-1)}
$$
The denominator is given by a modified version of [Metcalfe's law](https://en.wikipedia.org/wiki/Metcalfe's_law); since a club is a directed network where credit can flow both ways between a pair, the factor of two is removed. As with $R$ and $\overline{f}$, $S$ ranges between zero and one with an obvious interpretation.
### Further work
Aside from testing whether this metric of circularity (and the individual elements $R$, $\overline{f}$ and $S$) corresponds to good real-world club performance, it would be interesting to investigate it for sub-populations within and across clubs; for example, might clubs of food businesses show greater retention of credit than clubs of hardware suppliers? Are there any general properties across sub-populations that share similar values of circularity, e.g. might they all trade in perishable goods with universal demand, such as food?
Higher moments (spread, skewness etc.) of the observed distributions may also be interesting, especially if the characteristics/practices of above-average performers can be identified. Naturally, how these parameters change as a function of time will also be worth investigating and may provide further insights into how to manage a club.
To what extent establishing circular mutual credit flows results in the development of a circular economy in [material terms](/cDUb3gPOTJmm7RH1HNCDsA) is also essential.