An Evolution Model of Trading Behavior Based on Peer Effect in Networks

This work concerns the modeling of evolvement of trading behavior in stock markets which can cause significant impact on the movements of prices and volatilities. Based on the assumption of the investors’ limited rationality, the evolution mechanism of trading behavior is modeled according to peer effect in network, that investors are prone to imitate their neighbors’ activity through comprehensive analysis on the neighboring preferred degree, self-psychological preference, and the network topology of the relationship among them. We investigate by meanfield analysis and extensive simulations the evolution of investors’ trading behavior in various typical networks under different characteristics of peer effect. Our results indicate that the evolution of investors’ behavior is affected by the network structure of stock market and the effect of neighboring preferred degree; the stability of equilibrium states of investors’ behavior dynamics is directly related with the concavity and convexity of the peer effect function; connectivity and heterogeneity of the network play an important role in the evolution of the investment behavior in stock market.


Introduction
In the behavioral finance literature, investors are considered to be limited rational, especially for the less sophisticated ones, who always attempt to mimic financial gurus or follow the activities of successful investors, since using their own information/knowledge might incur a higher cost 1 .The most typical example is that in the financial crisis of 2008, agents' were rushed to sell shares in the same direction, leading the market behavior to herding critically.More imitation behavior among the investors is probe to result in herding behavior in stock market, as Nofsinger and Sias 2 note, "a group of investors trading in the same direction over a period of time," and introducing big fluctuations easily, particularly in bull or bear states.Empirically, this may lead to observed behavior patterns that are correlated across individuals and that bring about systematic, erroneous decision-making by entire populations 3 .Therefore, mechanism of dynamic and herding behavior of stock markets has attracted much academic and industrial attention.
In recent years, the literature about dynamic or herding behavior of stock markets can be classified into two categories.One category studies focus on examining the existence of herding behavior in stock market, which the investors' trading behavior evolves into.Griffin et al. 4 conclude, the nature of herding is not universal and differs across exchanges and countries.Specifically, investors in emerging markets might exert herding patterns different from those observed in developed countries.In 5 , the authors find evidence of intentional herding in China among both domestic accesses to information and expertise between these two cohorts.Zhou and Lai 6 discover that herding activity in Hong Kong's market tends to be more prevalent with small stocks and that investors are more likely to herd when selling rather than buying stocks.In 7 , Chiang and Zheng extend the investigation of herding behavior from domestic markets to global markets and find evidence of herding in advanced stock markets except the USA and in Asian markets.In all cases, herding behavior is proved to be a common state of stock behavior's evolving into.
The other studies concentrate on using various methods to study the evolution process of trading behavior in stock market.Wei et al. 8 propose that instability in the stock market is partly due to social influences impacting investors' decision to buy, sell, or hold stock.By developing a Cellular Automata model of investment behavior in the stock market they show that increased imitation among investors leads to a less stable market.In 9 , Liang and Han construct artificial stock market models by multiagent method based on small-world relationship network and find that evolvement of investors' trading behavior in stock market emerges most of stylized facts, such as clustered volatility, bubbles, and crashes.Based on incorporating stock price into investor decisions, Bakker et al. construct a social network model of investment behavior in stock market and find that real life trust networks can significantly delay the stabilization of a market 10 .Chen et al. use experimental platform to study the correlation between herd behavior and earnings volatility in stock market and find that stock price bubbles or crashes are caused by synergy herding behavior through imitation agent and market sentiment signals 11 .Liu et al. study herding behavior by designing an artificial stock market model analyzing its results through computational experiment.They find that, in the short run, herding interacts with the returns, and destabilizing the market; in the long run, it is not the traders' herding behavior but the traders' disregard of discovering their own information, the low proportion of informed traders and the lack of market liquidity that are to blame for the anomalies in stock markets 12 .Hassan et al. integrates agent computational modes and fuzzy set theory, to study how to simulate friendship dynamics in an agent-based model, based on the principle that social relationships are ruled by proximity 13 .Falbo and Grassi proposes a market with two kinds of agents: speculators and rational investors to analyze the dynamics of a financial market when agents anticipate the occurrence of a correlation breakdown and finds that the market equilibrium results depend on the prevalence of one of the two types of agents 14 .Consequently, it has a great important chance to study the evolvement of the trading behavior, for it affects the market critically and vice versa.
All the above-mentioned models and methods may capture some mechanisms of investor trading behavior and its impact on the market, but most of the studies mainly focus on the macroscopic features of trading behavior through quantitative analysis and only a few articles explore the inner mechanism of trading behavior's evolvement from the complexity theory perspective.In this work, we attempt to fill this gap by investigating the evolution of individual investors' trading behavior through mean-field theory and complex networks theory from microscopic perspective, so as to probe the collective dynamical evolution mechanism of trading behavior.According to Johansen and Sornette 15 , all traders around the world can be seen as a network organized from family, friends, colleagues, incorporated not only by the source of opinion but also the local influence among them.We consider a network of interacting agents whose trading behavior is determined by the action of their peer neighbors, according to peer effect evolvement rules.Using a mean-field approach, the evolvement equilibrium of investors' trading behavior is analyzed and it crucially depends on two components: the connectivity distribution of the network and the concavity of peer effect function.We show that, the stability of equilibrium states of investors' behavior dynamics is directly related with the concavity and convexity of the neighbors preference function.These results and their analysis can be used to generate insights to understand the evolution law of the collective dynamical behavior.
The rest of the paper is organized as follows.In Section 2, we introduce the model and define the evolvement rules of investor's trading behavior.In Section 3, the evolvement characteristics of the trading behavior are presented by the method of mean-field equation.In Section 4, the comparison between analytic and simulation results are conducted.And the conclusion is drawn in Section 5.

The Network
Nature, society, and many technologies are sustained by numerous networks that are not only too important to fail but paradoxically for decades have also proved too complicated to understand Albert and Barabási 16 .Based on the viewpoint posted by Johansen and Sornette 15 that all traders around the world can be seen as a network organized from family, friends, colleagues, incorporated not only by the source of opinion but also the local influence among them, the evolution system of investors' behavior in stock markets can be described as a network, while nodes represent investors, the edges between every two nodes represent their relationship, such as, social relations and trade association.
Consider a finite but large population of individuals N {1, 2, . . ., i, n}.Each investor i ∈ N interacts with a subset of the population which form a complex network G N, V , where i, j ∈ V means that i and j are linked in network.We consider undirected networks, that is, if i, j ∈ V then j, i ∈ V .Let N i be the set of individuals with whom i is linked.Formally, N i {j ∈ N, s.t.i, j ∈ L}, where k i |N i | is the number of neighbors of i, often referred as his connectivity.The connectivity can differ across individuals in the population and its distribution P k displays for each k ≥ 1 the fraction of nodes with connectivity k.More precisely, P k 1/n|{i ∈ N, s.t.k i k}|.

The Evolvement Mechanism
Our model studies evolvement of trading behavior in a population of stock markets.Normally, a trader i ∈ N can only exist in three discreet states: s i ∈ {−1, 0, 1}, where s i −1 if i select behavior "sell," s i 1 if i select behavior "buy," and s i 0 if i select the behavior "hold."Considering the following continuous dynamic process at time t, the state of the stock market is a vector s t s 1t , s 2t , . . ., s it , . . ., s Nt ∈ S N ≡ {−1, 0, 1} N , so, each investor can switch their trading behavior among these three states.
For investors' limited rationality and there incomplete knowledge about the market information, the factors affecting the investors' behavior can be roughly divided into two categories which are self-psychological preference and peer effect.Self-psychological preference is a comprehensive judgment of the macroeconomic environment, individual psychological and other random factors which have influence on the investors' recognition.Peer effect means the direct effect of neighbors' behavior; therefore, the evolvement mechanism of investors' trading behavior can be addressed as follows.
2 Peer effect: affected by neighbors' trading behavior, at time t, trader i switches his behavior at a rate of peer effect function F v i , k i , a i , which depends on neighboring preferred rate v i , connectivity k i , and the number of neighbors who select the certain behavior at time t a i j∈k i s j , where v i,1 v i,0 v i,−1 1.Assuming that the neighboring preferred rate and the effect of neighbors' behavior are independent, we can configure the peer effect function as , where f k i , a i is nonnegative function which represents the effect of neighbors' behavior and declines for a i .As k i ≥ 1, f k i , 0 0 obviously shows no peer effect.
According to the above statement, the evolvement mechanism of trading behavior can be expressed as M m δ, F v, f δ F v, f • , where δ, v, and f • represent selfpsychological preference factor, neighboring preferred degree, and the factor of neighbors' behavior effect, respectively.
Supposing that the investors' initial status of trading behavior is "hold," so that the default state vector of the stock market can be described as S t 0 {s 1t 0 , s 2t 0 , . . ., s nt 0 } ≡ 0. In addition, we assume that the traders whose trading behavior states have already changed can only switch trading behavior between "buy" and "sell," while the ones whose trading behaviors has not changed yet can select behavior among three states above mentioned.
Notice that, since the switch rates only depend on the properties of the present state, the dynamics, induced by the connectivity distribution P k and evolvement mechanism M, determines a continuous Markov chain over the space of possible states S N .The analytic results of this dynamic are extremely complicated and thus will not be addressed.We concentrate instead on the study of a mean-field described below.

Mean-Field Analysis
The mean-field approximation allows us to address questions that otherwise would be intractable.For instance, given a certain peer effect function of evolvement mechanism, how does the connectivity distribution of the network affect the evolution of trading behavior?Furthermore, given a certain network, how do the collective dynamics depend on the properties of the peer effect function?All these questions will be discussed below.
Consequently, in what follows, we will assume that the population of investors is infinite.More precisely, let ρ k t be the relative density of traders who show trading behavior "buy" at time t with connectivity k.So, ρ t k P k ρ k t will be the relative density of traders with behavior "buy" at time t.Denote by ϕ t and φ t the probabilities that any given link points to a trader with behavior "buy" or "sell," respectively, at time t.Therefore, the probability that a "nonbuy" behavior trader with k neighbors has exactly a neighbors with "buy" behavior at time t is k a ϕ t a 1 − ϕ t k−a .In the same, the probability that a "nonsell" behavior trader with k neighbors has exactly a neighbors with "sell" behavior at time t is k a φ t a 1 − φ t k−a .Hence, the transition rate from "nonbuy" behavior to "buy" behavior, for a trader with connectivity k, is given by The transition rate from "buy" behavior to "sell" behavior, for a trader with connectivity k, is given by So, for each k ≥ 1 the dynamic mean-field equation of trading behaviors' evolvement can be written as Equation 3.3 shows the following: the variation of the relative density of "buy" behavior traders with k links at time t equals the proportion of "non-buy" behavior traders with k neighbors at time t who change their behavior minus the proportion of "buy" behavior traders with k neighbors at time t who become "non-buy" behavior ones.
Consequently, for all k ≥ 1, the stationary condition of behavior "buy" is equivalent to dρ k t /dt 0. Therefore, the stationary state must satisfy that Let k denote the average connectivity of the network, that is, k k kP k .The probability that a trader links to another one with connectivity k equals kP k / k .Thus, the value of ϕ can be computed as Equations 3.4 and 3.5 determine the stationary values for ϕ and ρ k of the stock markets.On submitting 3.3 into 3.4 we can obtain that The solutions of 3.6 are the stationary values of ϕ.Therefore, given a specific connectivity distribution P k , peer effect f k, a , and traders' self-psychological preference δ, the stationary values ρ k of trading behavior "buy" in stock markets can be computed.So do the trading behaviors "sell" and "hold."

Comparison between Analytic and Simulation Results
Johansen and Sornette 15 point that the market collapse is the mutual influence of the continuous decline process, associated with the characteristics of psychology, especially depends on the investors' conception of loss and their selection of reference.Therefore, the evolution of trading behavior will be subjected to investors' psychological impact on the peer effect function, reflecting the essential characteristics of traders' limited rationality.When the degree of investors' rationality is high, marginal utility of peer effect increases with a high investors' rationality.While the degree of investors' rationality is low, marginal utility of peer effect will decreases.In this section we will present the analytic and simulation results so as to study how the connectivity distribution and the evolvement mechanism affect the mean-field equilibrium outcomes of the trading behavior in stock markets.

Theoretical Analysis
Normally, when investors' rationality is high, there is marginal utility decreasing of peer effect function.Therefore, let f k, a be a weekly convex function.More precisely, for all 0 < a < k, the function shows the following characteristic: 4.1 The interpretation for 4.1 is that, for any given investor, adding one more "buy" behavior trader has an impact on her probability of selecting this action, which is weakly decreasing with respect to the existing number of "buy" behavior traders. For being all continuous and differentiable within their domain, we let λ 0 δ −1 g F φ and can obtain

4.6
Considering that, function f k, a is nonnegative for k, a and is nondecreasing for a, so it can be derived that g F ϕ ≥ 0 and E ϕ ≥ 0. Meanwhile, based on the assumption of concave characteristic of peer effect function, we can obtain that g F ϕ ≤ 0 and E ϕ ≤ 0. Therefore, E ϕ is a nondecreasing concave function within its domain and has an only stable solution.Thus, we can present an example of a concave function and let f k, a a/k 1/2 .Based on this, we can see the logical equilibrium stable under the condition that peer effect function is marginal utility decreasing, shown in Figure 1.

Simulation Analysis
Notice that, evolution of investors' trading behavior not only depends on the peer effect function f k, a , but also on investors' self-psychological preference factor δ, neighboring preferred degree v, and network structure P k .Particularly, due to the complexity of network structure, it cannot be resolved directly by mathematical methods to describe its impact on the evolution of investors' behavior.In this section, we will analyze the influence on the evolution of investors' behavior from the network structure and investors' neighboring preferred degree through simulation analysis.
Let N 500 be the number of investor and S N 0 be the initial state of investors' behavior; simulation experiment will be done 100 times and each of them will go 100 time steps.Degree k 4 and k 12 of ER Network 17 , WS Network 18 , BA Network 19 , and IN Network 20 are comparatively analyzed in the simulation, respectively.Noticing that this paper focuses on the behavior "buy," we assume that the psychological preference of choosing behavior "buy" is stronger than behavior "sell."It is saying that the stock market being in good condition is assumed.The Red, Blue and Green lines represent "buy," "sell," and "hold" when k 4. The Black, Pink Red, and Yellow lines represent "buy", "sell," and "hold" when k 12.

(i) Evolution of Trading Behavior Affected by Network Structure
effect function is marginal utility decreasing, to some extent, network heterogeneity reduces the proportion of investors who choose trading behavior "buy", and increases the volatility of the evolution state of the trading behavior, especially leading to the impact on the equilibrium state from network degree.

(ii) Evolution of Trading Behavior Affected by Neighboring Preferred Degree
Figure 3 describes the evolution path of the proportion of investors who select behavior "buy" as the neighboring preferred degree changes, under the condition of marginal utility decrease of peer effect function, at different network degree.In BA Network and IN Network, the proportion of investors who choose behavior "buy" increases as the investors' neighboring preferred degree increases, while in ER Network and WS Network, the proportion shows stable state.Overall, the proportion of investors who choose behavior "buy" presents a linear evolvement.

Theoretical Analysis
In contrast with the elaboration in Section 4.1.1,when investors' rationality is low, there is marginal utility increase of peer effect function.Therefore, let f k, a be a weekly concave function.More precisely, for all 0 < a < k, The interpretation for 4.7 is that, for any given investor, adding one more "buy" behavior trader has an impact on her probability of selecting this action, which is weakly increasing with respect to the existing number of "buy" behavior traders.
Consequently, g F ϕ ≥ 0. For E ϕ 's being positive or negative depends on the parameters δ −1 , δ 1 , g F φ and g F ϕ ; E ϕ is not second-order monotonic and is prone to be multiple equilibrium.Considering that E ϕ , E ϕ , and E ϕ are continuous and nondecreasing functions, the requirement of E ϕ 's being multiple equilibrium is that it shows the characteristics of both concave and convex, so we suppose that when ϕ 0, E 0 > 0 and when ϕ 1, E 0 < 0.
When ϕ 0, we can obtain that g F 0 kvf k, 1 , g F 0 k k − 1 v f k, 2 − 2f k, 1 and g F 0 0. Based on the assumption of g F 0 > 0 and upon substituting it into E F ϕ , we can obtain that we have the following results:

4.10
When ϕ 1, we can obtain that g Based on the assumption of g F 1 > 0, g F , 1 > 0 and upon substituting it into E F ϕ , we obtain we have the following result: At this time, v satisfies the above two conditions both and it is prone to find multiple equilibrium solutions of function E ϕ .
Therefore, we can present an example of a convex function and let f k, a a/k 2 .Based on this, we can see the logical evolvement equilibrium stable under the condition that peer effect function is marginal utility decreasing, shown in Figure 4.  the evolvement equilibrium of trading behavior in ER Network and WS Network.Compared with ER Network and WS Network, the stability of evolvement equilibrium is little weaker in BA Network and IN Network.About at time t ≈ 50, equilibrium gradually stabilized.As time goes, in contrast with the evolution state at k 4, the proportion of investors who choose behavior "buy" at k 12 transforms from initially lower than at k 4 to higher than at k 4. The changes in IN Network are more obvious.Therefore, we can obtain that, when peer effect function is marginal utility increasing, network heterogeneity delays the process that the evolution of trading behavior reaches the equilibrium and strengthens the impact on the equilibrium of trading behavior which network degree places.

(ii) Evolution of Trading Behavior Affected by Neighboring Preferred Degree
Figure 6 describes the evolution path of the proportion of investors who select behavior "buy" as the neighboring preferred degree changes, at different network degrees, when peer effect function shows the characteristic of marginal utility increasing.Overall, the proportion of investors who choose behavior "buy" increases as the investors' neighboring preferred degree increases.In ER Network and WS Network, the evolution equilibrium of trading behavior is not affected by the neighboring preferred degree, and the validity of the equilibrium is a little strong at k

Conclusion
In this paper, we introduce an evolution model of investors' trading behavior in stock market based on peer effect, represented by peer effect function, in networks, according to the assumption of investors' limited rationality in behavioral financial literature.The model describes the evolution mechanism of investors' trading behavior from the two aspects of

Figure 2 Figure 2 :
Figure 2 shows the comparative analysis on evolution of trading behavior in ER Network, WS Network, BA Network and IN Network, under the condition of marginal utility decreasing of peer effect function, where k 4 and k 12 respectively.Overall, the volatility of equilibrium of behavior's evolvement in BA Network and IN Network is little stronger than in ER Network and WS Network.In BA Network and IN Network, the proportion of investors who select behavior "buy" at k 4 is higher than at k 12; while, the change magnitude in IN Network is larger than in BA Network.From the graph, we can conclude that, when peer

Figure 3 :
Figure 3: Simulation visualization for evolution of investor's trading behavior in four network ER Network, WS Network, BA Network, and IN Network , with the change of neighboring preferred degree, at different network degree k 4 and k 12 , on the condition of peer effect function's being marginal utility decreasing.

Figure 5
Figure 5 shows the comparative analysis on evolution of trading behavior in ER Network, WS Network, BA Network, and IN Network 15 , under the condition of marginal utility increasing of peer effect function, where k 4 and k 12, respectively.In ER Network and WS Network, about at time t ≈ 10, evolvement of trading behavior almost comes to the equilibrium.The equilibrium values of the two networks at k 4 and k 12 are basically the same, that is to say, network degree has little influence on

Figure 4 :
Figure 4: Logical equilibrium representation of peer effect function E k, a, 2 satisfying 4.7 .

4 .
Figure6describes the evolution path of the proportion of investors who select behavior "buy" as the neighboring preferred degree changes, at different network degrees, when peer effect function shows the characteristic of marginal utility increasing.Overall, the proportion of investors who choose behavior "buy" increases as the investors' neighboring preferred degree increases.In ER Network and WS Network, the evolution equilibrium of trading behavior is not affected by the neighboring preferred degree, and the validity of the equilibrium is a little strong at k 4.InBA Network and IN Network, the validity at k 12 is obviously stronger than at k 4, especially in IN Network.When neighboring preferred degree v ≈ 0.25, the proportion of investors who select behavior "buy" in BA Network and IN Network at k 12, gradually transform from lower to larger than at k 4. By the way, at k 12 in IN Network, there is multiequilibrium state of trading behavior evolvement.