when customers develop a persistent loyalty to one group of competing suppliers , or when suppliers target a specific segment of their potential customer base , we regard this as an instance of segregation of traders . in each case
the interaction is between fixed ( or largely fixed ) groups of buyers and sellers and each group is segregated into subgroups : buyers have specific needs and these are met by specific products or suppliers .
such segregation can confer benefits , e.g. shorter exploration time when buying , but it may also add vulnerability to a system , for example by reducing market liquidity .    segregation - like phenomena have been observed in a number of studies ; examples we are aware of include emergent loyalty in a fish market  @xcite , segmentation in credit markets in the philippines  @xcite , persistence in customer visitation patterns  @xcite and specialization and herding in financial markets  @xcite
. some of the previous work has focused on the buyer side , and has studied how segmentation can be identified in the space of customers , and how suppliers may respond to it adequately once it is detected  @xcite .
this branch of work can be thought of as a continuation of adam smith s idea that specialization of production leads to better exploitation of the market  @xcite .
apparent paradoxes have also emerged , such as _ hotelling s law _
@xcite : contrary to popular belief rational trading strategies may lead to minimal differentiation . in hotelling s original example sellers that minimise their total distance from all potential customers , who are uniformly positioned along the beach ,
end up positioning themselves all in the same place  in the middle of the beach .
much less work has been done to explore the conditions under which segregation occurs in markets , and what factors promote or suppress it .
when the buyer and seller populations are heterogeneous due to external factors such as geographical location or individual wealth , this can be a natural trigger for segregation . here
, our aim is to investigate whether and when segregation can emerge _ spontaneously _ in initially homogeneous populations . in an _ in silico _ experiment based on cat market design tournaments  @xcite such segregated states were observed in the co - adaptation of markets and traders .
some markets ended up focusing on attracting specific traders , and some traders preferred to trade at a specific market although no such fixed propensities were imposed from the beginning .    outside the context of double auction markets , an effect similar to segregation was noticed in multi - asset minority games  @xcite .
specifically , in a system of agents who have the option of copying a winning ( minority ) strategy from their neighbourhood with some probability @xmath0 , a self - organized grouping of strategies arises when the probability @xmath0 is large enough .
grouping was however only found when the underlying interaction network is well connected , and when agents have perfect information about the success of their neighbours . in another study based on the minority game
@xcite it was noted that `` ... a population of competing agents with similar capabilities and knowledge will tend to self - segregate into opposing groups characterized by extreme behavior '' .
however , the variant of the minority game used in this study supposes that agents can choose to follow a global strategy based on collective memory ; this is the primary driver of segregation . our approach is simpler in that the agents learn entirely from their own market returns and the only interaction between agents is via the market .    while the cat tournament results referred to above provide a clear impetus to study spontaneous segregation , they are difficult to analyse theoretically due to the complexity of both the agents trading strategies and the market mechanisms of the competing markets .
we therefore devise and analyse a stylized individual - based model of a double auction .
we focus on agents using experience - weighted attraction learning ( ewa )  @xcite to learn from the payoffs received for past actions and thus optimise future trading .
this general framework is similar to the one employed by hanaki et al  @xcite , though in a rather different context .
hanaki et al show that when agents are repeatedly given a choice of parking spots , some _ learn to be lucky _ by focussing their search on to the spots very close to the city center , while the others end up with the opposite strategy .    by developing a stylized model we aim to obtain an intuitive and analytically tractable tool for understanding whether and when segregation can emerge spontaneously in a system of competing double auction markets . in the results section
we first describe the model and then provide numerical results , summarizing the main findings from our numerical simulations . in the following subsection
we develop an analytical description in the large market limit , using a fokker - planck approach to investigate the steady states of the system mathematically and in particular to develop insights into the properties of the segregated state . in the discussion section
we summarize our main findings , discuss their robustness to e.g.  variations in the model and set out possible directions for future research .
to the best of our knowledge , there is no other research that models spontaneous segregation in the context of double auction markets .
to address the question of spontaneous segregation , we study a stylized model of a population of adaptive traders and two double auction markets . we hypothesize that segregation can arise as a product of co - adaptation of traders , and construct on this basis a minimal model for both traders and markets .
we investigate this in detail by numerical simulation , and provide a full theoretical understanding and characterisation of the observed segregation effects .
a brief summary of the basic features of the model and initial simulation results can be found in  @xcite .      following the works of gode and sunder  @xcite and ladlay  @xcite
, we populate our system with agents without sophisticated trading strategies , essentially zero - intelligence traders .
this is done because our aim is to investigate whether market loyalty can arise as an intrinsic property of a system of interacting agents without reliance on complex trading strategies .
trading operates in discrete rounds , where at each turn the prices of buy and sell orders ( bids and asks ) that the traders submit to a market are independent identically distributed random variables ( thus zero - intelligence agents ) .
agents learn whether to buy or to sell from previous experience ( see below ) .
the numerical values of bids and asks ( i.e their magnitudes ) , however , are assumed to be unrelated to previous trading success or any other information .
we assume that bids , @xmath1 , and asks , @xmath2 , are normally distributed ( @xmath3 and @xmath4 ) , and that their means satisfy @xmath5 . in the spirit of the work of  @xcite , @xmath6 can be thought of as cost and redemption values for each trader .
these values are private to each trader but correspond to order prices if submitted bids and asks are truthful and reflect the actual valuation of goods by the agents .
traders will not accept any price from the market : sellers will trade only if the trading price @xmath7 is no less than their asking price ( @xmath8 ) , and buyers require that the trading price is no greater than what they bid ( @xmath9 ) .
( this is in line with gode and sunder  @xcite where the traders that turned out to be more similar to human traders were the zero - intelligence ones with budget constraint , i.e.  traders who were not allowed to trade at loss
higher than the redemption value for buyers and lower than the cost value for sellers . ) after each round of trading each agent receives a score , reflecting their payoff in the trade .
scores of agents who do trade are as follows : buyers value paying less than they offered ( @xmath1 ) , and so their score is @xmath10 .
sellers value trading for more than their ask ( @xmath2 ) , and so @xmath11 is a reasonable model for their payoff .
we note that these scores are based on a linear model and do not reflect effects such as diminishing returns .
traders who do not get to trade in a given round receive return @xmath12 .
the role of a market is to facilitate trades so we define markets in terms of their price - setting and order matching mechanisms ; for an in - depth review of possible double auction market mechanisms see @xcite .
we consider a single - unit discrete time double auction market where all orders arrive simultaneously and market clearing happens once every period after the orders are collected .
( note that each period consist of one round only , which is why we will talk only in terms of periods . )
we also assume that a uniform price is set by the market  once all orders have arrived , these are used to determine demand and supply ( see fig .  [ fig1:marketmech ] ) .
the price at which demand equals supply is the equilibrium price . to make the model more flexible
, we consider more generally uniform prices of the type @xmath13 where @xmath14 is the equilibrium trading price , from which the market price can deviate towards the average bid ( @xmath15 ) or the average ask ( @xmath16 ) ; the parameter @xmath17 thus represents the bias of the market towards buyers or sellers . in a setup like ours where the bids and asks are gaussian random variables , the equilibrium trading price is @xmath18 when the variances are equal as we assume here and below .
once the trading price has been set , all bids below this price , and all asks above it , are marked as invalid orders as they can not be executed at the current trading price .
the remaining orders are executed by randomly pairing buyers and sellers ; the execution price is @xmath7 .
note that we assume here that each order is for a single unit of the good traded .
an example of a discrete time double auction market is the opening auction of new york stock exchange which is used to determine the opening prices on the market . at the opening auction ,
once all the orders are submitted , the trade occurs at the single price set by the market that maximises the volume of trades . in the terminology of our model
, this price corresponds to @xmath19 as that setting is the one that maximises the number of possible trades .    ; the dashed line is the trading price for @xmath20 .
right : example distributions of returns from validated orders at @xmath20 .
in the situation shown , where buyers are in the minority after validation of orders , all buyers find a trading partner ( red ) .
if all sellers could trade they would achieve the `` desired '' return distribution ( light blue ) .
but only a randomly selected fraction finds a trading partner , leading to the `` realized '' return distribution ( dark blue ) ; the other sellers receive a return of zero .
the realized sellers return distribution has the same total area as the buyers return distribution as both represent the total number of trades . ]
[ fig1:marketmech ] shows graphically how the trading price is set and how the return distributions look after invalid bids and asks are eliminated .
if , as in the example in the figure , the trading price is closer to the average bid ( @xmath21 ) there will be an excess of supply : only a fraction of the sellers who submitted valid asks gets to trade , but with the higher trading price  so those that do trade receive higher returns .
the buyers who submitted valid bids are in a minority compared to the sellers and so determine the number of trades .
they can all trade , but receive relatively low returns on account of the high trading price .
so far we have described how agents interact at a given market .
we next define how they decide _ how to trade _ ( to buy or to sell ) , and _ where to trade _
( at which market ) .
agents trade repeatedly in our model , and they adapt their preferences for the various choices from one trading period to the next .
we focus on the case of two markets , though the model can easily be extended to an arbitrary number of markets .
we assume that each agent decides on an action at the beginning of each trading period , only based on his or her past experience .
to formalize this we introduce a set of attractions @xmath22 for each player , one for each action @xmath23 : buy at market 1 , sell at market 1 , buy at market 2 , sell at market 2 .
the attractions will generally differ from player to player , but we suppress this in the notation for now .
the attractions are updated after every trading period , @xmath24 , using the following reinforcement rule : @xmath25 the quantity @xmath26 is the score gained by taking action @xmath23 in the @xmath24-th trading period .
the length of the agents memory is set by @xmath27 : agents weight returns obtained @xmath28 time steps ago with exponentially decaying factors @xmath29 , effectively corresponding to a sliding window of length of order @xmath30 for the weighted averaging of past returns .
the update rule above is a special instance of a more general experience - weighted attraction rule  @xcite , which has been shown to be in reasonable agreement with experimental data on human learning in repeated games .
many special cases of this rule are in common use in evolutionary biology and in the game - theoretic literature .
one important variant of ewa is a case in which _ all _ actions are updated with their returns , no matter whether that action was actually taken or not .
this assumes that an agent can calculate or at least estimate the return ( s)he would have obtained from actions @xmath23 that ( s)he did not choose to play  @xcite .
we argue that an agent would not normally have sufficient information to do this in the context of a double auction market : ( s)he would need access to the current price , and to the numbers of valid bids and asks submitted .
this is unrealistic , which is why we posit that scores of unplayed actions are updated with an effective payoff of zero .
one plausible alternative that does _ not _ rely on estimation of returns from unplayed actions would be an update rule where the attractions to unplayed actions are forgotten with a different rate ( or not forgotten at all ) ; we return to this in the discussion at the end .
it only remains to specify how agents choose their actions based on the attractions .
this is done in line with the experience - weighted attraction literature @xcite , simply by converting the attractions to probabilities using the so - called _ softmax _ or _ logit _ function .
explicitly , each agent takes action @xmath23 in trading period @xmath24 with probability @xmath31 , where @xmath32 is the _ intensity of choice _  @xcite and regulates how strongly the agents bias their preferences towards actions with high attractions .
for @xmath33 the agents choose the option with the highest attraction , while for @xmath34 they choose randomly with equal probabilities among all options .
the parameter @xmath32 is sometimes denoted @xmath35 in the literature and has been referred to for example as the _ response sensitivity _
@xcite and the _ learning sensitivity _  @xcite .
we begin our exploration of the two - market setup defined above with results from numerical simulations . unless specified otherwise , parameters were set as detailed in table [ parametertable ] in the methods section .
all agents start with equal preferences for all four choices , i.e.  @xmath36 where @xmath37 buy and @xmath38 sell . to aid visualization
we project the four - dimensional space of attractions @xmath22 down to two coordinates , the overall attraction to buying as against selling , defined as @xmath39 , and the attraction to market 1 as against market 2 , @xmath40 . due to the nonlinearity of the _ softmax _ function ,
a single - peaked distribution of attractions with a non - zero spread will , for large enough intensity of choice @xmath32 , become a multimodal distribution in the space of preferences .
this effect can not be regarded as genuine segregation .
for this reason we will avoid representing agents in the space of their preferences @xmath41 , and use the underlying attractions instead .    in fig .
[ fig2:simulation ] ( left ) we present the steady state attraction distribution for a population of traders with intensity of choice @xmath42 .
the initially narrow , _ delta - peaked _ distribution of attractions ( all initialized at @xmath43 ) has been broadened due to diffusion arising from the random nature of returns and from the stochasticity of the agents actions . the steady state shown in the left - hand panel of fig .
[ fig2:simulation ] represents an unsegregated population of traders .
while this population does include some traders with moderately strong preferences for one of the actions , preferences remain weak on average .
the population as a whole remains homogeneous in the sense that there is no split into discernible groups .    .
the colour scale in the central scatter plots shows the probability density of agents.@xcite for low enough intensity of choice ( left , @xmath42 ) , an unsegregated steady state arises , while higher @xmath32 ( right , @xmath44 ) causes traders to segregate into four discernible groups .
the histograms along the axes show the marginal distributions of @xmath45 and @xmath46 , respectively . from the marginals we note that in the segregated state roughly half of the population specialize in buying ( similarly half prefers market 1 ) , although the fractions of buyers ( sellers ) at different markets are not the same .
other system parameters are given in table [ parametertable ] .
the data shown are taken from 100 trading periods of 100 independent runs . ]
[ fig2:simulation ] ( right ) contrasts this scenario with the steady state of a system with exactly the same set of parameters but at the higher intensity of choice @xmath44 .
the population of traders now splits into four groups , with the agents _ persistently trading _ preferentially at one of the markets and with a preferred buy or sell action .
we refer to this state as _ segregated_. the markets shown in this example ( fig
.  [ fig2:simulation ] ) are biased symmetrically ( @xmath47 ) : if an agent buys at market 1 , or sells at market 2 ( actions @xmath48 or @xmath49 ) , and if they manage to trade , ( s)he is awarded with a higher score on average than if they were to use the other two actions ( c.f .
[ fig1:marketmech ] , where sellers are the group with the higher average return ) . in this symmetric market setup
there are therefore two different kinds of behaviour among the four segregated groups .
the agents in two of the groups ( @xmath48 and @xmath49 ) specialize in actions that award them higher average return , we call those _ `` return - oriented''_. we will refer to the agents in the other two groups ( @xmath50 or @xmath51 ) as__``volume - oriented '' _ _ for reasons which we explain shortly .
if all traders were return - oriented , they would have no partners to trade as there would be agents playing @xmath50 or @xmath51 .
consequently everyone would receive zero returns .
the fact that some traders have developed persistent preferences for placing orders that give them a lower average return ( here @xmath50 , @xmath51 ) can thus be interpreted as cooperative , trade - enabling behaviour . due to the market mechanism , the agents who choose one of @xmath50 or @xmath51 will have their orders rejected as invalid more often ( see the group of buyers in fig .  [ fig1:marketmech ] ) .
however , those whose orders are accepted will form a minority group in the market and will always find a trading partner .
hence , when submitting valid orders , these traders trade more often so we will call them _ ``
volume - oriented''_.    there is a tendency for agents to cluster around the diagonal and anti - diagonal in the two - dimensional projection shown in fig .
[ fig2:simulation ] .
inspection of the underlying attractions @xmath22 shows that this arises because many agents have one large attraction , for their preferred action , while their other attractions are close to zero .
for example if a return - oriented agent , say a buyer at market 1 , has attractions @xmath52 , then this projects to the diagonal @xmath53 .
similarly a volume - oriented trader who prefers to sell at market 1 is projected to the anti - diagonal @xmath54 if her other three attractions are close to zero .
the fact that the attractions of non - preferred actions are often small comes from the fact that , within our reinforcement learning dynamics , agents gradually forget the scores of actions they only use rarely . +    [ [ persistence - and - time - correlation . ] ] persistence and time correlation .
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +    the above results indicate that segregation is seen above a critical intensity of choice , @xmath55 ; we defer a discussion of how @xmath56 depends on the parameters of the model to the section analytical description below .
one has to bear in mind though that the data shown in fig .
[ fig2:simulation ] represents the state of the system at a given time .
it therefore does not tell us whether agents really develop loyalty in the sense that they stay in one of the segregated groups for a long time , or whether they switch frequently between groups .    to understand which of these two alternatives applies , and to characterise the dynamics of group switching events , one can analyse the persistence times of agents within each of the four peaks in fig .
[ fig2:simulation ] .
consistent with the intuitive meaning of a segregated state one finds @xcite that at high enough intensity of choice @xmath32 the agents develop `` loyalty '' to a certain market and a choice of buying and selling : their persistence times are much longer than the timescale of the small short - term fluctuations in preferences that every agent experiences .
these short - term fluctuations occur on the time scale of the memory - loss , @xmath30 . on the other hand
the agents are _ not _ frozen , i.e.  the persistence times are finite and the agents change loyalties on longer timescales . therefore the steady state we observe is well defined rather than a consequence of agent preferences frozen - in from early fluctuations in their trading history .     and forgetting rate @xmath27 are different from the standard values in table [ parametertable ] : here @xmath57 , @xmath27 as shown in the legend .
this is to highlight the separation of timescales in the segregated state .
a larger than usual initial number of trading periods was simulated ( @xmath58 trading periods ) to ensure the systems reached steady state at such high @xmath32 . ]
what emerges from the above discussion is that a key feature of a segregated state is a separation of timescales in the dynamics of the agents . to quantify this
further we consider the autocovariance function @xmath59 where @xmath60 indicates an average over the attractions of players in the population , and over the time @xmath61 in the stationary state .
this is a matrix capturing cross - correlations in time between the attractions to the various actions an agent can take ; here as a summary statistic we look at the trace @xmath62 , i.e.  the sum of the autocovariances . in fig .
[ fig3:covariance ] we show how this autocorrelation function depends on time for various forgetting rates @xmath27 at fixed @xmath57 .
we observe two separate decays , which is consistent with the intuition described above : first a fast decay of correlations that occurs as an agent moves around one of the peaks of the distribution @xmath63 , caused by randomness in returns at a given market and the fact that the decisions of each agent remain stochastic .
this fast decay does not lead to full decorrelation but rather to a plateau in the autocorrelation function : the attractions of an agent stay in the same  loyalty group " ( i.e. within the same peak of @xmath63 ) , and the agent s actions remain correlated .
the decay from this plateau defines the slow timescale , and it is a measure of how long agents typically stay in one loyalty group before moving to another peak of @xmath63 .    because the slow timescale increases very rapidly as @xmath27 is decreased  the theoretical description below suggests exponential growth with @xmath30  we show a rather smaller range of @xmath27 in the figure than elsewhere in the paper . comparing the curves for different @xmath27 we note the increase of the initial value of the autocorrelation function with @xmath27 , which makes sense as the variance of the fluctuations within each peak of @xmath63 grows roughly proportional to @xmath27 .
we also see that the fast time scale is of the order of unity in the rescaled time units , @xmath64 , used in the figure .
this reflects the fact that the effective memory of each agent is @xmath30 trading periods .
[ [ summary - and - characterisation - of - segregated - state . ] ] summary and characterisation of segregated state .
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +    summarizing so far , the existence of a plateau in the autocorrelation function is clear evidence of the segregation of agents into groups that remain loyal over extended periods of time to a certain set of preferences defining a group of agents , while at the same time exhibiting small and much faster fluctuations around these typical preference .
this represents the most intuitive definition of segregation that we can think of .
however , the existence of a plateau  quantitatively , a turning point in a plot of autocorrelation versus log time  would not be easy to utilize in practice to detect segretation .
this is because already for @xmath65 the amplitude of the initial fast decay becomes so small that it merges into the plateau , while at the same time the slow timescale for switching between loyalty groups outgrows the range of times that can easily be explored computationally . for practical purposes we therefore stick to multimodality of @xmath63 as our criterion for segregation .
our simulation results suggest that even our simplified trading system shows rich and interesting behaviour .
a more detailed analysis ( discussed below ) reveals a threshold intensity of choice @xmath66 such that for values @xmath67 the system segregates , i.e.  the initially homogeneous population of traders splits into groups that persistently choose to trade at a specific market .
the pattern of these market loyalties is co - operative , in that some traders  the volume - oriented ones  forego potentially higher returns and instead choose actions that enable trade for everyone .
we will see below that this behaviour has clear payback , in giving average returns across all traders that exceed those for the obvious nash equilibrium .
an obvious question that remains open at this point is how robust the observed segregation behaviour is to variation in our model parameters and setup ; we defer this issue to the discussion section .        to understand in more detail how segregation arises , and to characterise the nature of the transition to the segregated state
, a theoretical analysis of the model dynamics would evidently be useful .
mathematically our model is markovian . to capture the full dynamics one needs to keep track of the attractions @xmath68 to all actions @xmath69 of all agents @xmath70 , or equivalently the attraction vectors @xmath71 for all agents .
one can write down a master equation for the evolution of the joint distribution of these @xmath72 variables .
this equation is however difficult to work with and not easily analysed further . in order to make progress
it is useful to realise that the payoff an agent receives when they take a particular action only depends on aggregated quantities , but not on the detailed actions of individual other agents .
more specifically the return for a given action is determined by ( i ) the bid or ask the agent places ; ( ii ) the validity of the bid or ask placed and ( iii ) whether or not a suitable trading partner is found .
all quantities ( i)-(iii ) are random objects and so the return received for a given action at any one time will be a random variable itself .
properties ( ii ) and ( iii ) only depend on the macroscopic statistics of bids and asks placed by the population of traders in its entirety .
we now focus on the limit of large ( formally infinite ) populations , that is we take the limit @xmath73 .
the distribution of bids and asks submitted in any trading round will then follow gaussian distributions with mean @xmath74 and standard deviation @xmath75 for asks , and analogously for bids ( @xmath76 ) . by definition in our model
the returns that flow from these bids or asks are non - negative , implying a truncation at zero of the return distributions .
these distributions can then be written as @xmath77 the return an agent receives depends on the action @xmath23 the agent chooses , i.e. on the market , @xmath78 , they trade in , and whether they chose to buy , @xmath79 , or sell , @xmath80 .
this is reflected in our notation above .
the first term in each of the above expressions describes the case of a non - zero return .
this occurs with probability @xmath81 , where @xmath82 denotes the probability that an agent s order is valid ; once validated , it is executed with probability @xmath83 , which is the probability of finding a suitable trading partner .
if the order is executed an agent receives a return @xmath84 drawn from a gaussian distribution , truncated to allow only non - negative payoffs ; if the order was invalid , or was valid but not executed , the agent receives @xmath12 .
this occurs with probability @xmath85 ,    to complete the above description of the single agent dynamics for large @xmath86 one needs expressions for the market price @xmath87 as well as the probabilities @xmath82 and @xmath83 . in the deterministic limit , @xmath73 , the expression in eq .
( [ price ] ) reduces to @xmath88 as the means of the bids and asks submitted in any one round become the population means @xmath89 and @xmath74 by virtue of the law of large numbers . in the case when @xmath90 , the bid and ask distributions are mirror images of each other around @xmath91 and so the quantity @xmath92 introduce above is the equilibrium price where demand equals supply .
( for @xmath93 the real equilibrium trading price is not given by this simplified formula , but in our model the market price is still calculated from average bids and asks and we retain the symbol @xmath94 for the average of the two means . )    the probabilities that an order is valid , @xmath82 , are calculated from @xmath95 these expressions reflect the requirement for a bid or ask to be on the correct side of the market price , and are based on our assumption of gaussian bid and ask distributions . the integrals can be carried out in closed form and expressed in terms of error functions .
the trading probabilities @xmath96 , finally , can be written as @xmath97 where @xmath98 is the total number of agents taking an action @xmath23 and submitting a valid order , @xmath99 in this expression @xmath100 is given by the appropriate _ softmax _ function applied to an agent s vector of attractions @xmath101 .
the average @xmath102 is over the distribution @xmath103 of attraction vectors across all agents .
the expressions ( [ tradingp ] ) can be understood as follows : if a trader submits an order that is valid , ( s)he will always be able to trade if ( s)he is in the minority group , otherwise his probability of being able to trade is the size ratio of the minority and majority groups .
we can now write an evolution equation for the distribution @xmath104 of attraction vectors across the population of traders . writing @xmath105 for the distribution at the end of trading period @xmath24 , we have @xmath106 with @xmath107 a transition kernel that encodes the dynamics of the system .
it is of the form @xmath108 where @xmath109 is a four - dimensional vector with an entry of @xmath110 for action @xmath23 and entries @xmath43 otherwise .
the learning rule of eq .
( [ reinfrule ] ) is enforced through the delta function .
it is worth noting that ( [ mastereq ] ) is not a standard linear chapman - kolmogorov equation as the right - hand side is nonlinear in the distribution @xmath111 .
this arises because the kernel @xmath112 depends on the trading probabilities @xmath83 as given in ( [ tradingp ] ) , which in turn depend on @xmath105 . the nonlinearity arises because we have effectively projected from a description in terms of all @xmath72 attractions to one involving only four single - agent attractions .    from our reasoning
so far , eq . ( [ mastereq ] ) should constitute an exact description of the model in the limit @xmath73 .
it can , at least in principle , be solved numerically starting from our chosen initial condition @xmath113 .
the presence of the @xmath114-peaks at zero returns @xmath12 makes the kernel awkward to deal with numerically , however .
we therefore make one further simplification and transform to a fokker - planck description .
this is appropriate for small @xmath27 , i.e.  agents with long memory .
note to this end that the change in attraction @xmath115 in any one trading period is directly proportional to @xmath27 , see equation ( [ kernel ] ) .
the kramers - moyal expansion ( see e.g. @xcite ) of equation ( [ mastereq ] ) is of the form @xmath116 + \frac{r^2}{2}\partial_\mathbf{a}^2 \left[\mathbf{m}_2(\mathbf{a})p(\mathbf{a})\right ] + \ldots , \label{km}\ ] ] where the scaled jump moments @xmath117 are of order @xmath118 .
the generic @xmath119-th order term on the rhs of equation ( [ km ] ) comes with a factor @xmath120 so for small @xmath27 one can proceed by neglecting higher - order terms beyond the first two .
next , it is useful to introduce a re - scaled time @xmath121 .
a unit time interval in @xmath122 then corresponds to @xmath30 trading periods and hence the memory length of the agents . with this replacement , equation ( [ km ] )
reduces to a fokker - planck equation in the limit @xmath123 .
specifically we have in this limit @xmath124 + \frac{r}{2}\partial_\mathbf{a}^2\left[\mathbf{m}_2(\mathbf{a})p(\mathbf{a})\right ] .
\label{adaptivefokkerplanck}\ ] ] as before and to keep the notation compact , we have not written out the various components of the derivatives and jump moments ; e.g.  @xmath125 $ ] is to be read as @xmath126 $ ] .
segregation behaviour can in principle be characterised by studying the steady - state solution of the above fokker - planck equation ( [ adaptivefokkerplanck ] ) .
specifically one would investigate the conditions under which it is multimodal ( i.e. , it has several peaks ) .
similar to the kernel @xmath112 , the drift and diffusion coefficients @xmath127 and @xmath128 depend on the trading probabilities @xmath83 . so finding the steady state requires an iterative approach : @xmath129 initialize @xmath104 , e.g.  with delta peaked distributions , corresponding to agents without preferences
; @xmath130 calculate the number of traders taking the various actions [ eq .
( [ numberoftraders ] ) ] and thus the trading probabilities @xmath83 [ eq .  ( [ tradingp ] ) ] ; @xmath131 find the steady state solution of the fokker - planck equation ( [ adaptivefokkerplanck ] ) for these @xmath83 . steps ( ii ) and ( iii ) are then repeated until a self - consistent solution is obtained , i.e.  until the @xmath83 no longer change .
we note that finding the stationary distribution of the fokker - planck equation ( step ( iii ) ) is non - trivial , details will be discussed below .
once we have the steady - state values of the trading probabilities @xmath83 , we can switch point of view and think of the fokker - planck equation ( [ adaptivefokkerplanck ] ) as describing the dynamics of individual agents within a large population with fixed average properties . as we argue that our system is ergodic , the steady state distribution of attractions can then be re - interpreted as the distribution of a single agent s attraction sampled over a long enough time interval .
zeros of the drift velocity @xmath132 are fixed points of the single agent dynamics , and for small amounts of diffusive noise @xmath27 the single agent will spend most of its time near ( stable ) fixed points , causing local maxima of @xmath104 . to detect segregation
we therefore look for multiple stable fixed points of the single agent - dynamics in the steady state population .      finding the steady state solution of the fokker - planck equation
even with given trading probabilities is a non - trivial task in the four - dimensional space of attraction vectors @xmath101 .
this is true particularly because the drift and diffusion coefficients @xmath127 and @xmath128 do not in general define a time - reversible single agent - dynamics , for which determining the steady state would be much simpler ( see for example  @xcite ) .
we thus proceed with one more simplification to produce a theoretical description directly comparable to simulations .
we fix the agents preferences for buying or selling , i.e. each agent now carries a fixed probability @xmath133 with which they buy .
they sell with probability @xmath134 .
this probability may vary from agent to agent , but crucially it remains fixed in time for each trader .
agents thus have a single decision left to make , namely , where to trade . in the case of two markets
the single variable that we then need to track for every agent is the difference or relative attraction @xmath135 .
this makes a full numerical analysis possible .
the resulting fokker - planck equation is one - dimensional , and one can find a closed - form solution . locating all single agent fixed points can be achieved e.g.  by a bisection method .
as it turns out we do find segregation in this simplified scenario , so the reduced model is useful in its own right , and provides evidence of the robustness of segregation behaviour .
hence in the sections below we focus on this simplified model , comparing numerical predictions for nonzero @xmath27 directly to simulations ; whenever possible we state the comparison with the original fully adaptive model .    in the limit of large population size
, the analogue of @xmath104 in the simplified model is the probability distribution @xmath136 .
the quantity @xmath137 is the distribution of attraction differences , @xmath138 , among agents with buying preference @xmath133 .
the distribution over preferences for buying @xmath139 is fixed as part of the specification of the model . as a simple case ,
we investigate a population with @xmath140 , consisting of equal numbers of two types of agents with buying preference @xmath141 and @xmath142 , respectively .
agent @xmath143 chooses market @xmath110 with probability @xmath144 $ ] and independently chooses to buy with probability @xmath145 or @xmath146 depending on her type .    as in the case of fully adaptive agents
we can formulate the master equation for the process , and derive a fokker - planck equation in the limit of small memory - loss rates @xmath27 .
we obtain : @xmath147 + \frac{r}{2}\partial_\delta^2\left[m_2(\delta|p_\mathcal{b}^{(g)},t_\gamma)p(\delta|p_\mathcal{b}^{(g)})\right ] \label{fokkerplanck}\ ] ] where @xmath148 ( for type or `` group '' ) labels the agent type .
the jump moments @xmath149 and @xmath150 couple the two types of agents via the set of trading probabilities @xmath151 .
the generic steady state solution of the fokker - planck equation ( [ fokkerplanck ] ) reads@xcite @xmath152 as the notation emphasizes , the stationary probability distribution is dependent on the trading probabilities , and these are themselves function(al)s of the probability distributions @xmath153 .
accordingly we use the iterative procedure described after equation ( [ adaptivefokkerplanck ] ) to find a solution , repeating steps ( ii ) and ( iii ) until the trading probabilities @xmath83 remain stable to an accuracy of @xmath154 .     from simulation and fokker - planck theory ( the corresponding distributions for the second type of agents @xmath155
are mirror images with respect to the y - axis ) .
left : @xmath156 , right : @xmath157 .
forgetting rate is @xmath158 , other system parameters as specified in table [ parametertable ] . ]
[ fig4:ssbuyers ] compares the steady state distributions @xmath159 obtained from direct numerical simulations and from the fokker - planck theory described above .
the buying preferences @xmath160 are symmetric about 1/2 and so we do not show @xmath161 , which would be the mirror image about @xmath162 .
the distribution obtained for low @xmath32 ( fig .
[ fig4:ssbuyers ] left ) shows the behaviour expected for an unsegregated population , with a single - peaked distribution of relative attraction @xmath138 for each agent type ; the mean of the distribution essentially coincides with the fixed point of the single agent dynamics , i.e.  the solution of @xmath163 . in the high-@xmath32 regime
, the agents of each type segregate into two groups corresponding to the two peaks of the distribution of the attraction differences @xmath138 . as in the case of fully adaptive agents ,
one group is return - driven , i.e.  prefers the market that awards them with higher returns , although they are not always able to trade there .
the agents in the other group are volume - driven ; they settle for the market where returns are lower on average but where they can trade more regularly .
the fokker - planck theory successfully reproduces the qualitative transition from unsegregated behaviour at low values of the intensity of choice to segregated steady states at higher values of @xmath32 .
the quantitative agreement with numerical simulations is good , remarkably so given that the latter were obtained for relatively small systems ( @xmath164 agents ) and for moderate @xmath158 while we developed the theory for the combined limits of large @xmath86 and small @xmath27 .
the agreement between theory and numerical experiment also suggests that segregation is not a finite - size effect .      to track the change in the shape of the relative attraction distributions from unimodal to bimodal as @xmath32
is changed we consider the so - called binder cumulant ( see for example  @xcite ) .
this quantity is defined as @xmath165 and it is a good indicator of segregation .
it has different limiting values for unimodal and bimodal distributions .
the quantity @xmath166 is in principle dependent on the type of agent considered , @xmath167 ; but in the situations we consider where the two types have distributions of score differences @xmath138 that are mirror images of each other , this dependence disappears . for numerical simulation data we show @xmath168 .
the binder cumulant takes the value @xmath169 for a gaussian distribution , while @xmath170 for a distribution consisting of two sharp peaks ( the precise value depends on the relative weight of the peaks ) . for small @xmath27 , where the @xmath138-distributions become sharp around their peak(s )
according to equation ( [ stationarydistribution ] ) these are therefore the values of @xmath166 we expect for @xmath32 below and above the segregation threshold @xmath66 , respectively . for finite values of the learning rate @xmath27
, we expect a smooth transition between the two limiting values .    ) ) of the relative attraction distribution for different values of @xmath27 as shown in the legend ( large to small @xmath27 from bottom to top on the right of the plot ) .
inset : numerical simulations ( blue ) versus fokker - planck theory ( orange ) for @xmath158 .
simulated system size @xmath164 traders , with @xmath138 distributions obtained from the last @xmath30 trading periods of @xmath171 independent simulation runs . ]    in fig .  [ fig5:binders ]
we show the predictions of our fokker - planck theory for the binder cumulant of the reduced model with fixed buy / sell - preferences as a function of @xmath32 , and for different values of @xmath27 .
these confirm the expectations set out above , with the segregation transition become increasingly sharp as @xmath27 decreases .
the limit @xmath172 of the theory can be worked out by a separate procedure and gives a sharp transition at a well - defined segregation threshold @xmath66 ( for the system presented in fig .
[ fig5:binders ] , @xmath173 in the limit @xmath172 ) .
the inset of the fig .  [ fig5:binders ] compares numerical simulations and theory for @xmath158 and again shows very good agreement .
we attribute the remaining deviations to finite - size effects and to the fact that simulations necessarily operate at nonzero @xmath27 while the fokker - planck theory is derived in the limit of small @xmath27 .
the qualitative behaviour of the binder cumulant , i.e.  a transition between the expected theoretical values for small and large values of @xmath32 that becomes sharper with decreasing @xmath27 , is exactly the same in the fully adaptive model ; see  @xcite .
there are of course quantitative differences ; e.g.  the threshold value @xmath174 ( for @xmath172 ) is higher  @xcite .
[ [ further - characterisation - of - segregation - dynamics . ] ] further characterisation of segregation dynamics .
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +    so far we have successfully constructed a mathematical description that reproduces the segregation effects seen in simulations .
we now use the theory to look more closely at the emergence of segregation and the properties of the segregated state . to this end
we consider average returns across the population of agents .
these allow us detect whether segregation brings population - level benefits even though all agents make decisions on a purely individual basis .
given that persistence times are finite , the population - averaged returns also give the long - time average returns for any agent and so they tell us about the benefits of segregation for single agents .    in fig .
[ fig6:returns ] we plot the average return obtained by agents in the steady state against intensity of choice @xmath32 for populations with different forgetting rates @xmath27 .
the data shown are from the fokker - planck analysis of the reduced two - strategy model described above .
remarkably , the average return is a non - monotonic function of @xmath32 : it has a minimum close to the segregation threshold @xmath66 , with a height that decreases as @xmath27 is reduced .
the qualitative non - monotonic trend is also found in numerical simulations ( see inset ) .
it is harder to detect there as the absolute changes in returns are fairly small , but appears in both the reduced and the fully adaptive model .    to put the returns for our segregated steady states into context , we compare them to two benchmark values . the dashed line in fig .
[ fig6:returns ] indicates the first of these , which is the average return of an unsegregated population ( in the limit @xmath172 limit , to be discussed in more detail shortly ) .
while this homogeneous population return decreases monotonically with @xmath32 , segregation avoids this decrease for intensities of choice @xmath67 and in fact converts it to an increase .     for different values of @xmath27 ( see legend
; @xmath27 decreases from top to bottom ) , as predicted by fokker - planck theory ( circles denote @xmath56 for the given value of @xmath27 ) .
black dashed line : average return of an unsegregated population for @xmath172 .
horizontal dotted line : envy - free nash equilibrium ( see text ) .
the segregated solution achieves higher returns than either the unsegregated population at the same @xmath32 , or the nash equilibrium .
insert : comparison between numerical simulations and fokker - planck theory for @xmath158 and population size @xmath164 . ]    as a second baseline we show in fig .  [ fig6:returns ] the average return in an envy - free nash equilibrium .
a nash equilibrium in general is a state in which no agent can increase their payoff by unilaterally changing strategy . in our system
, a state would be specified by the probability @xmath175 for each agent @xmath143 to choose market 1  as the set of actions is @xmath176market 1 , market 2@xmath177 .
the strategy of an agent is defined by @xmath178  and a nash equilibrium is reached when no agent c@xmath143 an achieve higher average return by changing @xmath175 , at fixed strategies of all other players .
this still leaves potentially many different nash equilibria  @xcite and so we focus on what we will refer to as the _ envy - free _ nash equilibrium .
these are equilibria in which no agent is envious of any other agent s return because they all achieve the same payoff on average over time .
this is realized in our system when the average returns for all four distinct actions ( buy or sell , at market 1 or 2 ) are the same .
this condition allows us to identify a unique set of trading probabilities and from these the envy - free nash equilibrium return . as fig .
[ fig6:returns ] shows , this is always _ lower _ than the average return of a segregated population ( both in theory and simulations , see the inset ) .
a segregated steady state is thus better in terms of returns than both the homogeneous steady state at the same @xmath32 and the envy - free nash equilibrium .
what is notable here is that the segregated state is not envy - free over short time horizons : an agent in the volume driven group obtains a lower return than one from the return driven group .
however , as emphasized above , on very long time scales agents can change their loyalties , i.e.  change group , so that in a long - time average all achieve the same return .
this again emphasizes the co - operative nature of the segregated state .    [
[ estimating - the - segregation - threshold - beta_rm - s - the - rrightarrow-0-limit . ] ] estimating the segregation threshold @xmath66 : the @xmath172 limit .
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +    we now proceed to study the segregation threshold @xmath66 of the intensity of choices and how it depends on the parameters of the model .
this is easiest in the limit @xmath123 where the segregation transition is sharp , see fig .
[ fig5:binders ] above .
we first focus on the regime @xmath179 , i.e.  the unsegregated phase , in which the distributions @xmath180 will be single - peaked . in the limit @xmath123 , equation ( [ stationarydistribution ] ) indicates that ( i ) this peak becomes infinitely sharp , so that the distributions are of the form @xmath181 ; and ( ii ) the location @xmath182 of the peak for each group of players is determined by the zero - drift condition @xmath183    the next step is to solve these two equations for @xmath184 and @xmath185 , which is the @xmath123 analogue of finding the steady state of the fp equation for general @xmath186 . as before one needs to make the solution self - consistent so that the trading probabilities @xmath83 appearing in ( [ zero_drift ] ) are those calculated from the distributions @xmath181 themselves .
the iterative approach explained after the equation ( [ adaptivefokkerplanck ] ) can again be used to find such a self - consistent solution , starting from @xmath187 .
we briefly explore the properties of this homogeneous steady state before considering how to detect the onset of segregation .
we focus on agent types with symmetric biases toward buying and selling , @xmath188 . for this choice
we find non - zero @xmath189 even in the limit @xmath190 .
this indicates that agents recognize the more rewarding option : agents that are more likely to buy have a preference for the market that is good for buyers , and similarly for sellers .
of course @xmath190 means that agents nevertheless choose randomly between the markets . as @xmath32 increases ,
the relative attractions @xmath189 become more pronounced , i.e.  they move away from zero , and agents start to choose the `` better '' market more frequently .
this is the reason for the decay of the average return in the homogeneous steady state with @xmath32 , as shown in fig .
[ fig6:returns ] : as agents of each type increasingly focus on `` their '' market , buyers congregate in one market and sellers in the other ; trading opportunities are reduced and thus the average return ( which includes zero returns for trading periods where an agent can not trade ) decreases .
the more definitive choices agents make are the consequence of the two effects : ( 1 ) the fixed points @xmath189 increase in absolute value ( and they correspond to the difference in the average score an agent receive in the two markets ) ; ( 2 ) the increase of @xmath32 makes the choices more definitive .
quantitatively , we find that ( 2 ) is the stronger effect . as the intensity of choice @xmath32 is increased further , we expect a transition to a segregated steady state . to detect this transition we can follow the general logic explained in the beginning of analytical description : a segregated state must have more than one fixed point of the single - agent dynamics .
the peak position @xmath184 is always a fixed point for agent type 1 from eq .
( [ zero_drift ] ) , and similarly for type 2 . to detect the onset of segregation we therefore need to check when _ additional _ fixed points appear , i.e.  additional solutions of the zero - drift condition @xmath191 . in looking for these alternative fixed points
we need to keep the trading probabilities @xmath83 _ fixed _ at their values calculated for the homogeneous steady state , because we are considering the _ single - agent _ fixed points .
note that in general one needs to search for alternative fixed points globally , i.e.  across all possible @xmath138 .
this is because for most parameter settings the new fixed points appear far from @xmath184 or @xmath185 , respectively , as pairs of stable and unstable fixed points .    , assuming the other agent type has the opposite preference @xmath192 .
different sets of symmetric market parameters are compared ; non - trivially , the region of segregation is largest when both markets are fair . ]    in figures [ fig7:pbdiffthtcsurf ] and [ fig8:pb1pbtcsurf ] we present the segregation thresholds obtained by the method above , for various parameter settings . in fig .
[ fig7:pbdiffthtcsurf ] specifically we show how @xmath66 changes with @xmath193 for various symmetric markets . one observes that @xmath66 does not depend very strongly on the exact preferences for buying of the agents , except for the region of parameters where both agent types have almost even preferences for buying and selling .
a full analysis of the change in monotonicity in that region exceeds the scope of this publication and will be presented elsewhere . in contrast , the effect of the market biases follows a simple trend : the region of segregation shrinks as the difference between the two markets increases , suggesting that segregation is not a trivial effect of market biases .    in the fig .
[ fig8:pb1pbtcsurf ] we show two contour plots to compare the trends in @xmath66 when the two agent types buying preferences are varied independently , for two different choices of market parameters . on
the left is the symmetric markets setup @xmath194 that we have already used several times . from the plot we observe that the segregation threshold @xmath66 is lowest when the subgroups are symmetric with respect to buy - sell preferences , i.e.  @xmath195 ; the variation of @xmath66 along that line
is presented in fig .
[ fig7:pbdiffthtcsurf ] .
we also note that when two agent types have similar preferences ( e.g.  both prefer buying over selling ) then @xmath66 is on average higher than in the case where the types have opposite preferences .
this qualitative behavior we see also in the case of two fair markets that set the trading price at the equilibrium price , as shown in fig .
[ fig8:pb1pbtcsurf](right ) .
we do not show similar plots for asymmetrically biased markets ; the qualitative behaviour is similar there , but the line of minimal @xmath56 is no longer @xmath195 but @xmath196 , where @xmath197 is a constant that depends on the market parameters .     when preferences for buying @xmath145 and @xmath146 of both agent types are varied independently .
left : symmetric markets @xmath198 ; right : two fair markets ( @xmath199 ) .
contours are presented in terms of @xmath200 only for the better visual accessibility . ]    finally , we can adapt the above method of calculating the segregation threshold to the original model of fully adaptive agents choosing among all four possible actions ( e.g. @xmath201 ) .
because of the difficulties of finding the steady state solution numerical for finite @xmath27 , this analysis is carried out only in the limit @xmath123 .
this is feasible because we only need to find zeros of the drift @xmath149 , rather than solve for a full distribution @xmath104 that is a stationary solution of the fokker - planck equation .
as argued before , the first moment ( @xmath149 ) is a function of the whole distribution , but in the @xmath172 limit and for @xmath202 this distribution is a delta distribution , which simplifies the calculation .
however , as the @xmath172 limit is not the most realistic one ( it assumes agents with infinite memory ) , we focused most of our previous analysis on the simplified model where we can say more about segregation for nonzero @xmath27 .    in fig .
[ fig9:adaptivetcsurf ] we show a contour plot of the segregation threshold against the two market biases . as in fig .
[ fig7:pbdiffthtcsurf ] , for agents with fixed buy - sell preferences , we notice that the segregation threshold @xmath56 increases when the difference in the symmetric market biases increases ; this can be seen specifically by looking at the symmetric markets diagonal of fig .
[ fig9:adaptivetcsurf ] and fig .
[ fig7:pbdiffthtcsurf ] .
additionally in the system of fully adaptive agents we notice that this conclusion extends to the case when at least one market is fair , i.e.  segregation arises for smaller instances of @xmath32 if at least one market is fair . in fig .
[ fig9:adaptivetcsurf ] we note also a four fold symmetry , which we conjecture is a consequence of the fact that agents have more choices : a fully  adaptive agent does not have a preferred market initially , so all four action choices are equal .
this is not the case for an agent with a fixed preference for buying and selling because returns are buyer / seller - specific .     in a system of fully adaptive agents , against the market bias parameters
@xmath203 . along the lines where at least one market is fair , @xmath66 is lowest so that segregation occurs for the widest possible range of intensities of choice @xmath32.,scaledwidth=50.0% ]    [ [ multiple - steady - states . ] ] multiple steady states .
+ + + + + + + + + + + + + + + + + + + + + + +    when iteratively finding a self - consistent steady state of the fokker - planck equation as discussed around equation ( [ adaptivefokkerplanck ] ) , we always used as initial condition a distribution of all agents having zero attractions . while the dynamics of the iterative solution is not identical to the real dynamics , this choice was sensible to obtain steady states that match the ones from simulations of the real dynamics as closely as possible . after further analysis we found that in the numerical simulations for small values of @xmath27 one obtains two qualitatively different classes of segregated states . to investigate this notion further
, we now explore whether there can be more than one self - consistent solution of the fokker - planck equation .
these additional solutions could  in principle for example be accessible by using our iterative procedure , but starting from other initial conditions .
the simplest way to perform this exploration systematically is to realize that the trading probabilities @xmath83 from equation ( [ tradingp ] ) only depend on the demand - to - supply ratios @xmath204 and @xmath205 at the two markets ; we define @xmath206 for each market @xmath78 as the ratio of the number of buy and sell orders that arrive at the market .
specifying @xmath207 thus tells us all trading probabilities , and hence determines a unique steady state solution of the fokker - planck equation . from this steady state solution
we can recalculate @xmath204 and @xmath205 , and plot in the @xmath207-plane the two lines where the new and old @xmath204 ( @xmath205 , respectively ) coincide .
the intersections of these two lines are then the self - consistent steady states we are after .
we find numerically , in the range of parameter values that we have explored , that there is either one such state or there are three .     and
@xmath32 . *
number and nature of the steady state solutions of the fokker - planck equations in the @xmath208-plane ( u : unsegregated state , s : strongly segregated state , w : weakly segregated state ) .
other system parameters are set to their default values ( see table [ parametertable ] ) .
to the left ( small @xmath27 ) of the orange line there are three steady state solutions , while to the right there is only one .
the blue line separates the region where at least one of the solutions is segregated , i.e.  bimodal .
empty circles represent @xmath123 endpoints of the two lines , calculated independently . ]    in fig .
[ fig10:rtphasespace ] we show the resulting phase diagram in the @xmath209-plane and indicate the number and nature of self - consistent steady state solutions . where solutions are segregated we differentiate between two possibilities , strong and weak segregation . by strong segregation we mean a solution branch where the two peaks in @xmath210 remain of comparable height as @xmath123 .
we call a solution branch weakly segregated when one peak weight becomes exponentially small for @xmath123 , so that the solution effectively reduces to an unsegregated one . in the limit
, all agents then typically prefer the same market .
the empty circles in the figure are results from a separate analysis of the deterministic ( @xmath172 ) theory , and are consistent with the extrapolation of the results for nonzero @xmath27 .
numerical simulations confirm the existence of all three solution types ( u , s , w ) in the relevant regions of the phase space , where necessary starting from appropriately tuned initial conditions . where the strongly segregated solution competes with others it appears to become unstable but long lived in small system simulations .
( details are beyond the scope of this paper and will be given elsewhere . )
the blue line in figure [ rtphasespace ] is the segregation threshold @xmath66 discussed previously .
it is nearly constant , increasing only very slowly with @xmath27 ; this shows that the @xmath66 values obtained via the @xmath123 analysis will be good estimates also for larger @xmath27 . a second interesting feature of fig .  [ fig10:rtphasespace ]
is that there is a threshold value of @xmath211 above which the strongly segregated solution is the only possible option , for any @xmath32 large enough for a segregated state to exist at all : this state is then the genuine steady state .
where agents have only moderate memory , with @xmath30 of the order of 10 trading periods , steady states where one market comes to attract most agents thus disappear , and the emergence of persistent market loyalties becomes the norm . for the fully adaptive model we have preliminary evidence for a similar phase diagram as in fig .
[ fig10:rtphasespace ] and in particular for the existence of weakly segregated states , but defer further analysis of their behaviour to a separate publication .
the increasing fraction of global trades that now takes place online in the form of high - frequency algorithmic trading ( around @xmath212 of equity trading in the uk and around @xmath213 in the usa  @xcite ) raises many challenges for market regulations . to make such regulation as informed as possible , research is needed to understand the possible long - run states of such systems .
we focused on one particular long - run state
the segregation of traders .
as argued in the introduction , it is easy to imagine that such a state can bring benefits to the system , but also disadvantages ; both make it important to investigate and understand the phenomenon and its consequences .
we have developed a stylized model of double - auction markets serving a large number of adaptive traders ; this has helped us to shed light on the benefits of segregation for the population as a whole .
we have considered two variants of our model , one populated with agents who can adaptively tune their preferences for buying and selling along with their preferences for the two markets ; in the other model agents have fixed preferences for buying and hence also selling .
the two models share our main qualitative result : above a ( model - dependent ) threshold value of intensity of choice @xmath66 the agents segregate , i.e.  develop a long lasting loyalty to one action , or one market .
the onset of segregation is signalled both in simulations and in the analytical description by the emergence of multiple peaks in the distribution of agent preferences , as summarized e.g.  in the binder cumulant .
these peaks are accompanied by long persistence times for the agents to remain within each peak  @xcite .
in the model with fixed buying preferences we have shown that one can carry out the analytical description to a significant level of detail .
we find that even though individual agents do not explicitly try to maximise the well - being of the entire population , the strongly segregated state is in effect cooperative : it is more beneficial for every individual player , and the population as a whole , compared to possible unsegregated and envy - free nash equilibrium states .
the segregated state is neither envy - free  the traders that specialize to what we called volume - driven behaviour have lower returns than the return - driven ones  nor a nash equilibrium . in this sense the segregated state
is stabilized by incomplete information , of each agent about the precise returns to be expected from each action and about the average returns achieved by others .    the main parameter that separates between the two states  the intensity of choice @xmath32 plays effectively the same role as the scale of returns : multiplying either by some factor has the same effect on agents preferences .
when the possible returns are small an agent plays randomly , while if the stakes are high an agent will try to take into account information from previous trades as much as possible . in this interpretation
our main result states that there is a critical scale for single transaction returns above which the preferred state of the agent population is the segregated one .    finally , it is important to discuss simplifications we have made in our analysis and the way they might have affected our main results . for example , we have made various assumptions about the bid and the ask distributions .
it turns out that if these are relaxed it changes our main results only quantitatively but not qualitatively .
for example , we have shown all data for the case where the mean bid is greater than the mean ask as this enables more trades at the markets ; qualitatively identical results are obtained in the opposite case , however , with the only change being the in the specific vale of the threshold @xmath66 . more generally , the assumptions we made on the shape of bid / ask distribution can be relaxed .
in fact , within the fokker - planck description only the first and the second moment of the truncated bid / ask distribution appears and the precise distribution shape is otherwise immaterial .
another important assumption about the agents is their learning rule . as we discussed
when first setting out the model , there are several variants in the literature of the rule we used .
an important class of these is given rules where an agent updates the score for unplayed actions with the fictitious score .
we have argued that the assumption that agents can estimate fictitious scores is not realistic in our set up ; however , changing the way an agent forgets the score of the unplayed actions might be reasonable .
this leads to a generalized reinforcement rule : @xmath214 where the parameter @xmath215 can be tuned to vary between two extremes : @xmath216 is the case we have discussed so far , where an agent forgets the score of the unplayed actions with the same rate as the scores of the played action , effectively imputing a score of 0 for actions that were not taken . on the other hand
, @xmath217 corresponds to the case where an agent does not forget the attractions of the unplayed actions , which effectively means imputing a score equal to the average score up to that time .
we have explored in our analytical description the entire range of @xmath215 for both variants of our model ( fully adaptive and fixed buy - sell preference ) , and find generally that the segregation threshold @xmath66 increases as @xmath215 decreases towards zero .
it remains finite for any @xmath218 , so that segregation continues to take place , in a manner qualitatively similar to our vanilla model ( @xmath216 ) .
the case @xmath217 , which presupposes that agents have effectively infinite memory to scores of unplayed action , is special and will be explored further elsewhere .    one question that remains , and which we can not address directly here , is whether the emergence of segregation is an intrinsic property of systems with adaptive agents , or a consequence of our specific stylized model .
the simplicity of the model itself argues for the former , as we did not need to make exotic assumptions to find segregation .
but clearly there is still much to do from here to reach a detailed understanding of segregation in real markets , at a level that can directly influence policies .
we have carried out preliminary research into the more realistic _ continuous _
double auction markets , which certainly supports the robustness of segregation as an emergent phenomenon .
further directions for investigation include making not just agents but markets adaptive within the model , to understand whether the competition between markets that this will engender suppresses or promotes segregation .
there is clearly also scope for capturing more complex trading strategies in the model , something we have not pursued here as we were motivated by the simplicity of high - frequency trading algorithms and more broadly by the aim to develop a baseline model on which further extensions can be built .
the parameters of the system are summarized in table [ parametertable ] with their definitions and the standard values that are used in the main text unless otherwise specified . for all numerical simulations ( adaptive )
agents were initialized with  @xmath36 and the trading dynamics was run until a stationary state was reached . similarly in the simplified model with fixed preferences for buying , @xmath219 for all agents initially .
the time required to reach a steady state was highly dependent on the chosen parameters ( longer for low @xmath27 and high @xmath32 ) , but for the results presented in this paper was in the range between @xmath220 and @xmath221 trading periods . to be sure that the system reached the steady state we measured average returns , attractions and higher cumulants of the attraction distributions ; when the average of these observables became independent of time we assumed stationarity and started collecting the data for the analysis .
statistics presented in the paper are gathered for each parameter setting from @xmath171 independent runs of the stochastic dynamics .
time averages are usually taken over @xmath222 trading periods at the end of each simulation run .
llr + parameter & description & typical value + @xmath223 & number of markets & @xmath224 + @xmath225 & market biases - usually assumed to be symmetric , @xmath226 & @xmath227 + @xmath86 & number of traders & @xmath228 + @xmath229 & mean and standard deviation of the ask distribution ( sellers ) & @xmath230 + @xmath231 & mean and standard deviation of the bid distribution ( buyers ) & @xmath232 + @xmath27 & forgetting rate ; range @xmath233 $ ] & @xmath158 + @xmath32 & intensity of choice ; simulation range @xmath234 $ ] &  + @xmath235 & preferences for buying of the two types of agents of the toy model & ( 0.8,0.2 ) +
we acknowledge funding by the engineering and physical sciences council epsrc ( uk ) , grant reference ep / k000632/1 ( network plus , towards consensus on a unifying treatment of emergence and systems far from equilibrium ) .
ps acknowledges the stimulating research environment provided by the epsrc centre for doctoral training in cross - disciplinary approaches to non - equilibrium systems ( canes , ep / l015854/1 ) .
we thank yuzuru sato for useful discussions .
aa , ps and pm conceived the study .
aa and ps carried out the research , aa developed the simulations , carried out the analytical calculations and prepared the figures .
aa , ps and tg interpreted the data and shaped the study .
all authors wrote and reviewed the manuscript .
10    kirman ap , vriend nj . learning to be loyal .
a study of the marseille fish market . in : gatti
d , gallegati m , kirman a , editors . interaction and market structure . vol .
484 of lecture notes in economics and mathematical systems .
springer berlin heidelberg ; 2000 .
p. 3356 .
smith a. an inquiry into the nature and causes of the wealth of nations .
cannan e , editor .
library of economics and liberty [ online ] available from http://www.econlib.org/library/smith/smwn.html ; accessed 19 october 2015 ; 1904 .
alori a , sollich p , mcburney p. spontaneous segregation of agents across double auction markets . in : amblard f , miguel fj , blanchet a , gaudou b , editors .
advances in artificial economics .
vol . 676 of lecture notes in economics and mathematical systems .
springer international publishing ; 2015 .