# The Influence of Confidence and Social Networks on an Agent-Based Model of Stock Exchange

Authors: Mario A. Bertella; Jonathas N. Silva; André L. Correa; Didier Sornette
Journal: Complexity
 (2021)

---

## Abstract

This paper aims to investigate the influence of investors’ confidence in their portfolio holding relative to their social group and of various social network topologies on the dynamics of an artificial stock exchange. An investor’s confidence depends on the growth rate of his or her wealth relative to his or her social group’s average wealth. If the investor’s confidence is low, the agent will change his or her asset allocation; otherwise, he or she will maintain it. We consider three types of social networks: Barabási, small-world, and random. The actual stock markets’ properties are recovered by this model: high excess kurtosis, skewness, volatility clustering, random walk prices, and stationary return rates. The networks’ topologies are found to impact both the structuration of investors in the space of strategies and their performance. Among other characteristics, we find that (i) the small-world networks show the highest degree of homophily; (ii) as investors can switch to more profitable strategies, the best approach to make profitable investments is the chartist one in Barabási and small-world topologies; and (iii) an unequal distribution and more significant relative wealth gains occur in the Barabási network.


---

## Body

## 1. Introduction

Agent-based models study phenomena that emerge through individual interactions [1]. One branch of this computational economics refers to simulated economic systems on which economic theory can be tested. Such economic “laboratories” occupy a niche between analytical models, theoretical models, and empirical research. Artificial economic systems are typically more complex than analytical theory but simpler than real systems. Thus, they present the opportunity to verify more realistic theories than analytical models while maintaining the possibility of examining and understanding the resulting behavior. Another branch of agent-based computational economics aims at understanding the emergence of global behaviors based on local interactions. While global behaviors may be observed in empirical data, it is difficult to show why such behaviors occur. If the same behaviors exist in simulated models, then it can be stated that the inclusion of certain actors in the simulation may be sufficient to induce certain observed behaviors. These branches of agent-based computational economics are not mutually exclusive.In standard financial theory, agents are assumed to have rational expectations, and changes in prices mean alterations in fundamentals rather than changes in investor sentiment. However, empirical researches show that psychological factors contribute decisively to investor behavior. One of the phenomena analyzed by the behavioral finance literature refers to overconfidence, revealing that mainstream economic theory’s basic assumptions are violated. The agents show much confidence. For instance, a medical study showed that when the doctors were 90% confident in a diagnosis, they were right on average only 50% of the time. Similar results were found in other studies [2]. In short, people often bias in several directions contrary to what the traditional economic theory states.Networks represent patterns of connections or interactions between the components of a system. A network is a collection of points joined together in pairs by lines. These points are called vertices or nodes, and the lines that connect them are called edges. Examples of networks include the Internet, computers connected by data connections, and human societies, which are sets of people joined by social interaction. It should be noted that network structure can have a significant impact on system behaviors. Social network connections affect how people learn, form opinions, receive news, or how they invest. Unless we know about these networks’ structure, we cannot fully understand such systems.Many agent-based models (ABMs) include some behavioral aspects. In the following lines, we will briefly present a few of the most important ones.The work of Kim and Markowitz [3] is considered one of the first modern ABMs of the financial market. The backdrop of this model was the crash of the stock market in 1987. The main objective of this work was to explore the relationship between portfolio insurance strategies and market volatility. The main finding was that portfolio insurance strategies could destabilize the market due to their procyclical effect when accounting for their market impact, offering a possible explanation for the severity of the stock market crash. Brock and Hommes [4] use bifurcation theory and numerical methods to analyze market dynamics in a discounted value asset pricing model with heterogeneous beliefs. This paper reveals that an increase in the propensity to switch between predictors may lead to instability and complex dynamics for stock prices and returns. Another important work is the model presented by Levy, Levy, and Solomon [5]. When homogenous investors (with identical memory lengths) use past information, the stock market shows cyclic bubbles and crashes. When the memory lengths are heterogeneous across investors, the bubbles and crashes are less predictable and more realistic. Hommes [6] offers an early analysis of complex behavioral models using multiple heuristics and bounded rationality. The author stresses comparatively simple models for which some tractability is achieved by integrating analytical approaches with computational techniques. Chiarella et al. [7] discuss another area of research into boundedly rational heterogeneous financial market agent models, with particular focus on the role of the market-clearing process, investor utility function, price and wealth dynamics relationship, portfolio effects, and market dynamics influence of stochastic elements.Although many behavioral features that include investor biases have been analyzed in previous works, there are very few papers of agent-based models that explicitly incorporate emotional biases identified by the behavioral finance literature. Among them, one can find the works of Takahashi and Terano [8], Lovric [9], and Bertella et al. [10–12]. In Takahashi and Terano [8], two types of biases are studied: overconfidence and loss aversion. When the same number of agents (fundamentalists and chartists) populate the market, the share price coincides with its fundamental value. When the number of chartists is much more significant than the fundamentalists, the price deviates enormously from the fundamental value, and the fundamentalists are eventually eliminated from the market. There are also fundamental price deviations when investors are overconfident and when chartist agents act asymmetrically concerning losses and gains. On the other hand, Lovric [9] incorporates overconfidence in agents. This is formalized as an underestimated risk of expected returns. As a result, overconfident investors generate infrequent bubbles and crashes. In another work, Lovric [9] develops a stock exchange model in which agents or part of them are overconfident and maybe optimistic or pessimistic. While optimism or pessimism influences agents’ expectations of expected returns, overconfidence relates to those expectations’ accuracy. As a result, the author finds that bullish agents generate quite pronounced booms and crashes, while pessimism tends to keep the market close to the stock’s fundamental value. On the other hand, overconfidence causes investor sentiment to exacerbate. Bertella et al. [10] built an artificial stock market consisting of fundamentalists and chartists. Agents differ in their strategies for valuing stock prices and exhibit different memory lengths and confidence levels. When the heterogeneity of strategies used by agents is increased, excess volatility and kurtosis are observed. Confidence is also incorporated into the chartist agents, observing a positive correlation between the average confidence and return rate. The introduction of confidence brings even greater volatility to the market, reflecting the negative effect of greater irrationality on market behavior. In Bertella et al. [11], the objective is to verify, through an agent-based model, the stock price dynamics and its return rate in an artificial financial market composed of fundamentalists and chartists with and without confidence. When it is incorporated in the chartist agents, there is a higher price and rate of return volatility to the case without confidence. Besides, kurtosis and skewness are lower than in the case of simulation with no confidence. Then, it is observed that the share price and the confidence index, both generated by the model, cointegrate, and there exists a causal relationship of the share price to the confidence index, which does not exist in reverse. The model is then verified with the S&P 500 and Nikkei indices and their respective confidence indices for the stock exchange. For this, cointegration and Granger tests are performed, concluding that both stock exchanges’ indices cause confidence, corroborating the model’s results. Bertella et al. [12] study the effects of overconfidence and loss aversion in an artificial stock exchange. They find that the inclusion of confidence in 5% of chartists raises the trading volume as empirical evidence corroborates and price volatility increases considerably. On the other hand, loss aversion in 5% of chartists substantially decreases the trading volume. However, chartist traders now have a higher percentage of stocks in their portfolios, and a buy and hold strategy is adopted to mitigate losses.If there are few studies relating explicitly to behavioral biases on artificial stock exchanges, there are even fewer studies that explicitly include the structure of behaviorally biased networks on an artificial stock exchange. Although there is a multitude of agent-based models that study the influence of the characteristics of social networks in a stock exchange, as far as we know, there are only the articles by Hoffmann et al. [13] and Hashanah and Alsulaiman [14] that include agents explicitly with emotional biases in a social network environment. In the first study, different social network topologies (Barabási and Albert network or torus network) and interactions within these networks are used to develop the model. The price series and return rates show some qualitative and quantitative similarities with the Dutch stock exchange’s empirical evidence. The second work combines psychological biases in a specific type of social network (Barabási network). Investors have several investment strategies: zero intelligence, fundamentalists, chartists, and agents with adaptive strategies. One of its conclusions refers to the efficient market hypothesis found at the macro level but not at the micro level. Another result refers to volatility and market capitalization. Volatility is more sensitive to model parameters than market capitalization, and the level of volatility does not affect market capitalization.Our goal is to contribute to this research line by adding confidence, a behavioral variable, into investors within several social networks (Barabási, small-world, and random) to understand how network properties affect the dynamics of both stock prices and return rates. Besides this macro side, our work also intends to explain a few micro issues, such as: what kind of stock exchange emerges—in terms of the degree of homophily, prevailing investment strategy, investment strategy propagation rate, wealth distribution, among others—when distinct social networks are analyzed. In our model, investors’ confidence plays a key role since it considers how much their wealth varied in the period and how much their social group’s wealth (to which they are linked) changed in the same period. When investors’ confidence is low—because their social group made more money than them—they will change their investment strategy to provide more wealth to their social group; otherwise, they will keep it.Our work is structured as follows. In Section2, we present the model, the formalization of confidence, and a brief discussion about networks. Section 3 presents the results from the econometric point of view and from where investor profile emerges when various types of networks are incorporated. The final section ends with concluding remarks.


## 2. Model

Our model initially follows the equations of Bertella et al. [10]. At a certain point, our work will differ from Bertella et al. [10] with random agents’ inclusion of different expectations for chartists and network topology. The present model also has strong similarities with the agent-based model with fundamentalists and noise traders developed by Kaizoji et al. [15] and Westphal and Sornette [16] We consider three classes of investors, referred to broadly as fundamentalists, chartists, and random. Price and dividend expectations are formed depending on whether investors are fundamentalists, chartists, or random.


### 2.1. Strategy of Fundamental Investors

A total ofN fundamental investors decide between two investment options (not mutually exclusive over time): stocks, which pay a stochastic dividend dt, and risk-free bonds that pay a constant interest rate r with an infinitely elastic offer. The dividend dt paid over each time is generated by an exogenous stochastic process, i.e., a first-order regressive process, AR1,(1)dt=d¯+ρdt−1−d¯+ϵt,where d¯ is the base dividend (a constant), ϵt has a normal distribution with zero mean and finite variance σ2 and −1<ρ<1. Fundamentalists predict prices and dividends of the stock based on the stock’s dividends, i.e., based on their fundamental values. As they do not have perfect rationality, they estimate the future value of the dividend by applying a simple heuristic as(2)Edt+1=dt1+g,where g is the dividend growth rate given exogenously.The expected value of the stock price is, according to Gordon’s model:(3)Ept+1=dt1+gk−g,where k is the future dividend flow discount rate, which is an exogenous constant. These two equations define Ei,tpt+1+dt+1, which is a critical value of formula (6).The fundamental investors have identical constant absolute risk aversion (CARA), and the utility function of wealth is given by(4)UWt=−e−λWi,t,where Wi,t is the wealth of agent i at time t and λ is the risk aversion level. Each individual has the same initial wealth value W0. For the following period t+1, the total value of the wealth of agent i is given by the expression as follows:(5)Wi,t+1=xi,tpt+1+dt+1+1+rWi,t−ptxi,t.In this model, each agent optimizes its allocation between stocks and fixed income bonds subject to the wealth constraint given by expression (5). Solving the maximization problem, we have the following result:(6)xi,t=Ei,tpt+1+dt+1−pt1+rλσi,t,p+d2,where xi,t is the number of stocks demanded by agent i in t.The perceived variance of the returns,σi,t,p+d2, corresponds to the following expression:(7)σi,t,p+d2=1−θσi,t−1,p+d2+θpt+dt−Ei,t−1pt+dt2,where parameter θ determines the weight on recent square errors relative to past square errors.


### 2.2. Strategy of Chartists

Chartists have price and dividend expectations based on past effective prices and dividends. Our work includes three types of chartists, wherein the difference between them is due to the different memories of each type of chartist. Thus, we have chartists with memorym=1, m=5, and m=10, where the m values are time units. The expression of the expected price for the chartist follows the formula of Barberis et al. [17]:(8)EtPt−1−Pt=∑l=1m1−ηPt−l−Pt−l−1ηl−1,where 0<η<1 is the weight attributed to the various price differences (dividends) between t−l and t−l−1. For the dividend, the expression is the same, simply replacing the price with the corresponding dividend.


### 2.3. Random Agents

Random agents also populate the investor universe. Their price estimate follows a normal distribution with averagePt−1 and variance σr,p2, while the expected dividend also follows a normal distribution with average dt−1 and variance σr,d2. The expected price and dividend variances are given exogenously.


### 2.4. Price Dynamic Equation

The market price is obtained by considering the total demandedBt and offered quantities of the stock Ot by all agent types. These are calculated as follows:(9)bi,t=xi,t−xi,t−1≥0,otherwisebi,t=0,oi,t=xi,t−xi,t−1<0,otherwiseoi,t=0,where bi,t and oi,t are, respectively, the demanded and offered quantity of agent i in t. Thus,(10)Bt=∑i=1Nbi,t,Ot=∑i=1Noi,t.The share market price int will be defined as a function of excess demand or supply in a given period, according to the following expression:(11)pt=pt−1eBt−Ot/β,where β is a parameter to minimize market price fluctuations.Table1 shows the values of the parameters used in all simulations.Table 1
Values of the parameters.
ParametersValuesNumber of investors100d¯4dt−14ρ0.95meanεt0varεt0.0742pt−120r0.10β2000λ0.5Wi,t−1100Ei,t−1pt+1+dt+122σi,t−1,p+d24xi,t−11g0.015k0.25θ0.01η0.25


### 2.5. Confidence

In this model, each agent checks whether his or her proportional wealth change variation increases or decreases relative to his or her social group. If this rate increases (decreases), his or her confidence also rises (falls). Although the formula below is similar to that in Bertella et al. [12], confidence (C) here is a function of the relative proportional variation rate of wealth (W), as shown in the following:(12)CW=c1W3+c2W2+c3W+c4,where the coefficients c1, c2, c3, and c4 change for all types of investors according to the expressions in the following:(13)c1=Cmax−Cn3Wm2+a3−3Wma2−Wm3,c2=3WmCmax−Cn3Wm2+a3−3Wma2−Wm3,c3=3Wm2Cmax−Cn3Wm2+a3−3Wma2−Wm3,c4=3CnWm2a+Cna3−3Cna2Wm−Wm3Cmax3Wm2+a3−3Wma2−Wm3,and Cmax=1, maximum confidence value; Cn=0.5, neutral confidence value; and Wm=W, value with neutral confidence. In this case, Wm=0.5; a=Wmax; Wmax = maximum value that W can assume, that is, Wmax=1.Although confidence rises (falls) as the relative proportional rate of variation of wealth increases (decreases), Figure1 shows that confidence does not increase at the same rate of relative proportional change of wealth. There is a range where confidence remains relatively constant.Figure 1
Confidence as a function of the relative rate of wealth growth.


### 2.6. Description of Investors’ Strategy Modulated by Confidence

After the market price is established, equation (11), each investor checks the rate of proportional change of wealth and calculates his or her confidence index for every period. As there are three kinds of investment strategies (fundamentalist, chartist, and random), the investor may switch his or her strategy among them as follows. After 12 units of time, the investor calculates the confidence index’s average and compares them with Cn (the neutral confidence index). If the confidence index’s average is more significant than Cn, her or she maintains his or her investment strategy; otherwise, he or she alters his or her strategy to that which provided the highest rate of wealth growth within the social group. In his or her new strategy (if he or she has changed), he or she makes his or her investments accordingly and calculates his or her confidence index for each period. After 12 units of time, he or she recalculates his or her average confidence index. If it is greater than Cn, he or she maintains his or her strategy. Otherwise, he or she will change it to the one that has generated, on average, the highest relative percentage change rate of wealth, which might be his or her previous investment strategy or that of investors close to him or her.


### 2.7. Network Topologies

The networks in this work (random, small-world, and scale-free or Barabási—both these terms are used interchangeably) are populated by investors (nodes). The links correspond to the interactions between them, and the wealth of each investor is proportional to the connections he or she has. The properties of the networks are described in Table2.Table 2
Properties of the networks used in the simulation.
RandomSmall-worldScale-freeAverage degree10.561010.26Diameter453Average path length2.1822.8432.161Density0.1070.1010.104Modularity0.2460.5340.234Number of communities736Average clustering coefficient0.1060.540.204As explained in Section2.6, agents will compare it with the neutral confidence index and change or not change their behaviors after calculating their average confidence index. If affirmative, they will change it according to the fundamental, chartist, or random agents’ expected price and dividend equations, as addressed in Sections 2.1–2.3.We are interested in the structure of a network largely determined by how the relationship between nodes or vertices is formed. In what follows, we briefly describe the three main models of complex networks (random, small-world, and scale-free) used in this work:(a)
Random networks [18–20]: in this model, undirected links or edges are randomly included between a fixed N number of nodes. Each edge is represented based on some probability p. The number of edges that connects each node of the network (vertex degree) follows a Poisson distribution with a maximum limit N. The expected degree of any given node is given by equation (14), where k is the total number of edges incident on a given node:(14)k=N−1p.This model produces random networks withN vertices and k edges, called random network ER. An example of a random network is shown in Figure 2(a).(b)
Small-world networks: many networks are interconnected, forming a small number of connections on each node [21]. In this model, the average distance between two nodes of a network does not exceed a small number of vertices. Hence, the expression is small-world. Such an effect is obtained in networks where most nodes are interconnected through a minimal path, also known as geodesic distance. An example of this type of network may be friends, with some having distant relatives in other parts of the world. Using these local and distant connections within the group, research shows that it is possible to connect any two people on average in just six steps and is called a small-world. Figure 2(b) is an example of a small-world network.(c)
Scale-free networks: many networks have some very peculiar characteristics. One of the main features, called the preferred connection, is the tendency for a new node to connect to a network vertex with a high degree of connections. This characteristic means networks with few highly connected vertices, known as hubs, and many nodes with few connections [22]. Networks with these qualities are called scale-free due to the network representation. In other words, this means that scale-free networks are those whose degree distribution follows a power law. Such networks exist in various systems, such as the Internet, the Web, and scientific papers’ citation networks. Figure 2(c) represents an example of a scale-free network.Figure 2
Complex networks. (a) Random, (b) small-world, and (c) scale-free. The size of the node is proportional to the degree of connectivity.
(a)(b)(c)In what follows below, we will distinguish two cases:(a)
No network effect: where the expected value of the price and dividend of each agent is fixed throughout the entire simulation (according to the equations determined for each type of agent—fundamentalist, random, and chartist)(b)
Network effects: in contrast, the other simulations investigate “network effects,” in the sense that each agent can change his or her way of calculating the expected value of price and dividend according to the specified rules, based on the type of the network and the links each agent has in the same network


## 2.1. Strategy of Fundamental Investors

A total ofN fundamental investors decide between two investment options (not mutually exclusive over time): stocks, which pay a stochastic dividend dt, and risk-free bonds that pay a constant interest rate r with an infinitely elastic offer. The dividend dt paid over each time is generated by an exogenous stochastic process, i.e., a first-order regressive process, AR1,(1)dt=d¯+ρdt−1−d¯+ϵt,where d¯ is the base dividend (a constant), ϵt has a normal distribution with zero mean and finite variance σ2 and −1<ρ<1. Fundamentalists predict prices and dividends of the stock based on the stock’s dividends, i.e., based on their fundamental values. As they do not have perfect rationality, they estimate the future value of the dividend by applying a simple heuristic as(2)Edt+1=dt1+g,where g is the dividend growth rate given exogenously.The expected value of the stock price is, according to Gordon’s model:(3)Ept+1=dt1+gk−g,where k is the future dividend flow discount rate, which is an exogenous constant. These two equations define Ei,tpt+1+dt+1, which is a critical value of formula (6).The fundamental investors have identical constant absolute risk aversion (CARA), and the utility function of wealth is given by(4)UWt=−e−λWi,t,where Wi,t is the wealth of agent i at time t and λ is the risk aversion level. Each individual has the same initial wealth value W0. For the following period t+1, the total value of the wealth of agent i is given by the expression as follows:(5)Wi,t+1=xi,tpt+1+dt+1+1+rWi,t−ptxi,t.In this model, each agent optimizes its allocation between stocks and fixed income bonds subject to the wealth constraint given by expression (5). Solving the maximization problem, we have the following result:(6)xi,t=Ei,tpt+1+dt+1−pt1+rλσi,t,p+d2,where xi,t is the number of stocks demanded by agent i in t.The perceived variance of the returns,σi,t,p+d2, corresponds to the following expression:(7)σi,t,p+d2=1−θσi,t−1,p+d2+θpt+dt−Ei,t−1pt+dt2,where parameter θ determines the weight on recent square errors relative to past square errors.


## 2.2. Strategy of Chartists

Chartists have price and dividend expectations based on past effective prices and dividends. Our work includes three types of chartists, wherein the difference between them is due to the different memories of each type of chartist. Thus, we have chartists with memorym=1, m=5, and m=10, where the m values are time units. The expression of the expected price for the chartist follows the formula of Barberis et al. [17]:(8)EtPt−1−Pt=∑l=1m1−ηPt−l−Pt−l−1ηl−1,where 0<η<1 is the weight attributed to the various price differences (dividends) between t−l and t−l−1. For the dividend, the expression is the same, simply replacing the price with the corresponding dividend.


## 2.3. Random Agents

Random agents also populate the investor universe. Their price estimate follows a normal distribution with averagePt−1 and variance σr,p2, while the expected dividend also follows a normal distribution with average dt−1 and variance σr,d2. The expected price and dividend variances are given exogenously.


## 2.4. Price Dynamic Equation

The market price is obtained by considering the total demandedBt and offered quantities of the stock Ot by all agent types. These are calculated as follows:(9)bi,t=xi,t−xi,t−1≥0,otherwisebi,t=0,oi,t=xi,t−xi,t−1<0,otherwiseoi,t=0,where bi,t and oi,t are, respectively, the demanded and offered quantity of agent i in t. Thus,(10)Bt=∑i=1Nbi,t,Ot=∑i=1Noi,t.The share market price int will be defined as a function of excess demand or supply in a given period, according to the following expression:(11)pt=pt−1eBt−Ot/β,where β is a parameter to minimize market price fluctuations.Table1 shows the values of the parameters used in all simulations.Table 1
Values of the parameters.
ParametersValuesNumber of investors100d¯4dt−14ρ0.95meanεt0varεt0.0742pt−120r0.10β2000λ0.5Wi,t−1100Ei,t−1pt+1+dt+122σi,t−1,p+d24xi,t−11g0.015k0.25θ0.01η0.25


## 2.5. Confidence

In this model, each agent checks whether his or her proportional wealth change variation increases or decreases relative to his or her social group. If this rate increases (decreases), his or her confidence also rises (falls). Although the formula below is similar to that in Bertella et al. [12], confidence (C) here is a function of the relative proportional variation rate of wealth (W), as shown in the following:(12)CW=c1W3+c2W2+c3W+c4,where the coefficients c1, c2, c3, and c4 change for all types of investors according to the expressions in the following:(13)c1=Cmax−Cn3Wm2+a3−3Wma2−Wm3,c2=3WmCmax−Cn3Wm2+a3−3Wma2−Wm3,c3=3Wm2Cmax−Cn3Wm2+a3−3Wma2−Wm3,c4=3CnWm2a+Cna3−3Cna2Wm−Wm3Cmax3Wm2+a3−3Wma2−Wm3,and Cmax=1, maximum confidence value; Cn=0.5, neutral confidence value; and Wm=W, value with neutral confidence. In this case, Wm=0.5; a=Wmax; Wmax = maximum value that W can assume, that is, Wmax=1.Although confidence rises (falls) as the relative proportional rate of variation of wealth increases (decreases), Figure1 shows that confidence does not increase at the same rate of relative proportional change of wealth. There is a range where confidence remains relatively constant.Figure 1
Confidence as a function of the relative rate of wealth growth.


## 2.6. Description of Investors’ Strategy Modulated by Confidence

After the market price is established, equation (11), each investor checks the rate of proportional change of wealth and calculates his or her confidence index for every period. As there are three kinds of investment strategies (fundamentalist, chartist, and random), the investor may switch his or her strategy among them as follows. After 12 units of time, the investor calculates the confidence index’s average and compares them with Cn (the neutral confidence index). If the confidence index’s average is more significant than Cn, her or she maintains his or her investment strategy; otherwise, he or she alters his or her strategy to that which provided the highest rate of wealth growth within the social group. In his or her new strategy (if he or she has changed), he or she makes his or her investments accordingly and calculates his or her confidence index for each period. After 12 units of time, he or she recalculates his or her average confidence index. If it is greater than Cn, he or she maintains his or her strategy. Otherwise, he or she will change it to the one that has generated, on average, the highest relative percentage change rate of wealth, which might be his or her previous investment strategy or that of investors close to him or her.


## 2.7. Network Topologies

The networks in this work (random, small-world, and scale-free or Barabási—both these terms are used interchangeably) are populated by investors (nodes). The links correspond to the interactions between them, and the wealth of each investor is proportional to the connections he or she has. The properties of the networks are described in Table2.Table 2
Properties of the networks used in the simulation.
RandomSmall-worldScale-freeAverage degree10.561010.26Diameter453Average path length2.1822.8432.161Density0.1070.1010.104Modularity0.2460.5340.234Number of communities736Average clustering coefficient0.1060.540.204As explained in Section2.6, agents will compare it with the neutral confidence index and change or not change their behaviors after calculating their average confidence index. If affirmative, they will change it according to the fundamental, chartist, or random agents’ expected price and dividend equations, as addressed in Sections 2.1–2.3.We are interested in the structure of a network largely determined by how the relationship between nodes or vertices is formed. In what follows, we briefly describe the three main models of complex networks (random, small-world, and scale-free) used in this work:(a)
Random networks [18–20]: in this model, undirected links or edges are randomly included between a fixed N number of nodes. Each edge is represented based on some probability p. The number of edges that connects each node of the network (vertex degree) follows a Poisson distribution with a maximum limit N. The expected degree of any given node is given by equation (14), where k is the total number of edges incident on a given node:(14)k=N−1p.This model produces random networks withN vertices and k edges, called random network ER. An example of a random network is shown in Figure 2(a).(b)
Small-world networks: many networks are interconnected, forming a small number of connections on each node [21]. In this model, the average distance between two nodes of a network does not exceed a small number of vertices. Hence, the expression is small-world. Such an effect is obtained in networks where most nodes are interconnected through a minimal path, also known as geodesic distance. An example of this type of network may be friends, with some having distant relatives in other parts of the world. Using these local and distant connections within the group, research shows that it is possible to connect any two people on average in just six steps and is called a small-world. Figure 2(b) is an example of a small-world network.(c)
Scale-free networks: many networks have some very peculiar characteristics. One of the main features, called the preferred connection, is the tendency for a new node to connect to a network vertex with a high degree of connections. This characteristic means networks with few highly connected vertices, known as hubs, and many nodes with few connections [22]. Networks with these qualities are called scale-free due to the network representation. In other words, this means that scale-free networks are those whose degree distribution follows a power law. Such networks exist in various systems, such as the Internet, the Web, and scientific papers’ citation networks. Figure 2(c) represents an example of a scale-free network.Figure 2
Complex networks. (a) Random, (b) small-world, and (c) scale-free. The size of the node is proportional to the degree of connectivity.
(a)(b)(c)In what follows below, we will distinguish two cases:(a)
No network effect: where the expected value of the price and dividend of each agent is fixed throughout the entire simulation (according to the equations determined for each type of agent—fundamentalist, random, and chartist)(b)
Network effects: in contrast, the other simulations investigate “network effects,” in the sense that each agent can change his or her way of calculating the expected value of price and dividend according to the specified rules, based on the type of the network and the links each agent has in the same network


## 3. Results and Discussion

### 3.1. Econometric Analysis

Figure3 shows the returns of “no network effect” and “network effects” (small-world, scale-free, or random network included in the agent-based model), considering 60% of fundamentalist agents, 20% chartists, and 20% random. It is noteworthy that the behavior of simulated data using networks presents episodes of increased volatility concentrated in specific periods (volatility clustering), alternating moments of relative stability. This behavior is one of the stylized facts related to the empirical analysis of returns in the time series literature [23, 24].Figure 3
Simulated model of return rate dynamics. (a) No network effect, (b) Barabási, (c) random, and (d) small-world.
(a)(b)(c)(d)Table3 shows the descriptive statistics of rates of return for simulated and actual data (Dow Jones between 3/31/2009 and 12/16/2020).Table 3
Statistical summary.
Returns (r)NStandard deviationExcess kurtosisSkewnessJarque–Bera normality testNo network effect10000.0120.005−0.0330.178 (ns)Barabási10000.0243.624−0.324564.690∗∗∗Random10000.0273.767−0.624656.368∗∗∗Small-world10000.0282.670−0.583353.662∗∗∗Real dataDow Jones33200.01023.170−0.93474727.3∗∗∗Small caps (Dow Jones34090.01313.802−0.95927572.3∗∗∗Large caps (Dow Jones34090.01017.718−0.89945039.4∗∗∗∗∗∗The null hypothesis of normality is rejected at 1% level; ns represents that the null hypothesis is not rejected.The standard deviations of simulated returns with networks indicate greater dispersion than the calculated dispersion for actual data (except for small caps data). Interestingly, the small-world network model showed the three network models’ highest standard deviation, although the difference between them is very small. Excess kurtosis of simulated returns with networks indicates heavier tails, consistent with actual data. The observed exception refers to simulated data with no network effects whose kurtosis is very close to 3 (normal distribution value). The Jarque–Bera test rejected the hypothesis of normality for all simulated returns with networks and also for the actual data. The normality hypothesis could not be rejected for simulated returns with no network effect, in line with the kurtosis result presented above. All results point to negative skewness. The magnitude of simulated data with networks is compatible with the actual data. In summary, with any type of network, the kurtosis and skewness (in absolute value) of the return rate are much higher than the model with no network effect and are in line with real stock market data.Table4 shows the ADF test results for unit root detection according to the specifications with constant and constant and trend terms. In the case of prices, the results indicate that the unit root hypothesis cannot be rejected at the 5% level of statistical significance, except for the simulated price in the model with no network effects and for small caps in the specification with constant and trend (the KPSS with a trend term test rejects the unit root hypothesis for small caps). In the case of returns, the unit root hypothesis is rejected at the level of 1% of statistical significance for all variables. These results are in line with the stylized facts about stock prices and returns: prices generally behave like a nonstationary series (random walk), whereas returns behave like stationary series. The KPSS and Phillips–Perron tests were also performed, and the conclusions remain.Table 4
ADF unit root test.
VariableDeterministic termLagged differencesTest statisticPrices: real dataDow JonesConstant27−0.073Constant and trend27−3.171Small capsConstant9−0.689Constant and trend9−4.060(∗∗∗)Large capsConstant270.805Constant and trend27−2.081Prices: simulated dataNo network effectConstant14−3.120(∗∗)Constant and trend14−2.845BarabásiConstant26−1.389Constant and trend26−1.915RandomConstant17−1.766Constant and trend17−3.049Small-worldConstant17−1.812Constant and trend17−3.199Returns: real dataDow JonesConstant12−16.914(∗∗∗)Constant and trend12−16.913(∗∗∗)Small caps (DJ)Constant12−16.450(∗∗∗)Constant and trend12−16.455(∗∗∗)Large caps (DJ)Constant12−17.293(∗∗∗)Constant and trend12−17.290(∗∗∗)RETURNS: simulated dataNo network effectConstant5−5.032(∗∗∗)Constant and trend5−5.185(∗∗∗)BarabásiConstant21−4.477(∗∗∗)Constant and trend21−4.831(∗∗∗)RandomConstant19−4.028(∗∗∗)Constant and trend19−4.856(∗∗∗)Small-worldConstant8−3.446(∗∗∗)Constant and trend8−4.593(∗∗∗)Number of lagged differences determined by Akaike information criteria. The symbols∗∗∗ and ∗∗ indicate statistical significance at 1% and 5% levels, respectively.Conditional volatility models (GARCH and its variants) were developed throughout the 1980s (see Engle [25] and Bollerslev [26]. These models aim to adequately explain a stylized fact related to macroeconomic and financial series, specifically the phenomenon known as volatility clustering, where variations of great magnitude tend to focus on specific periods. Technically, in GARCH models, the goal is to model the second moment of the series under analysis explicitly.Letεt be the disturbance of a time series. If this follows an ARCH (q) process, it may be represented by(15)εt=σtut,where(16)ut∼i.i.d.0,1,σt2=ω+∑i=1qαiεt−i2.One of the ARCH model (q) problems is the relatively large number of parameters required for proper adjustment. A potentially more parsimonious representation is given by the GARCH (p, q) model, defined by(17)σt2=ω+∑i=1qαiεt−i2+∑j=1pβiσt−j2.In general,qARCH > q + pGARCH. For many economic series, the GARCH (1, 1) model provides a good fit:(18)σt2=ω+αεt−12+βσt−12.It can be demonstrated that the GARCH model has kurtosis greater than 3 and that the volatility clustering phenomenon is governed by parameterα.An alternative specification represented by the exponential GARCH (EGARCH) model allows for the incorporation and testing of asymmetric effects in the series, i.e., adverse shocks are followed by more intense volatility increases compared to positive shocks. The EGARCH model (1, 1, 1) is given by(19)lnσt2=ω+αεt−1σt−1−Eεt−1σt−1+βlnσt−12+γεt−1σt−1.It can be demonstrated that ifα > 0, the model is compatible with volatility clustering, and if γ < 0, the model has an asymmetric effect.Following specifications (18) and (19), we achieved the following results.As seen in Tables5 and 6, the simulated models’ magnitude is mostly compatible with the actual data. On the other hand, parameter γ is not significant in the simulated models (its signal is correct in three of the four simulations).Table 5
GARCH (1, 1) estimation results.
VariableNo network effectVariableBarabásiParameterEstimateSig.ParameterEstimateSig.Omega1.267e − 05∗∗∗Omega4.451e − 06∗Alpha0.082∗∗∗Alpha0.111∗∗∗Beta0.829∗∗∗Beta0.884∗∗∗VariableRandomVariableSmall-worldParameterEstimateSig.ParameterEstimateSig.Omega1.540e − 05∗∗∗Omega5.922e − 06∗∗∗Alpha0.169∗∗∗Alpha0.164∗∗∗Beta0.808∗∗∗Beta0.831∗∗∗VariableDow JonesVariableSmall capsParameterEstimateSigParameterEstimateSig.Omega2.414e − 06∗∗∗Omega3.054e − 06∗∗∗Alpha0.129∗∗∗Alpha0.095∗∗∗Beta0.846∗∗∗Beta0.885∗∗∗VariableLarge capsParameterEstimateSig.Omega2.557e − 06∗∗∗Alpha0.122∗∗∗Beta0.853∗∗∗The symbols∗∗∗, ∗∗, and ∗ indicate significance at 1%, 5%, and 10%, respectively.Table 6
EGARCH (1, 1) estimation results.
VariableNo network effectVariableBarabásiParameterEstimateSig.ParameterEstimateSig.Omega−0.911∗∗∗Omega−0.240∗∗∗Alpha0.145∗∗∗Alpha0.218∗∗∗Beta0.910∗∗∗Beta0.992∗∗∗Gamma−0.004Gamma0.010VariableRandomVariableSmall-worldParameterEstimateSig.ParameterEstimateSig.Omega−0.535∗∗∗Omega−0.425∗∗∗Alpha0.324∗∗∗Alpha0.316∗∗∗Beta0.964∗∗∗Beta0.978∗∗∗Gamma−0.008Gamma−0.002VariableDow JonesVariableSmall capsParameterEstimateSigParameterEstimateSig.Omega−0.482∗∗∗Omega−0.318∗∗∗Alpha0.176∗∗∗Alpha0.143∗∗∗Beta0.963∗∗∗Beta0.977∗∗∗Gamma−0.155∗∗∗Gamma−0.118∗∗∗VariableLarge capsParameterEstimateSig.Omega−0.439∗∗∗Alpha0.162∗∗∗Beta0.966∗∗∗Gamma−0.142∗∗∗The symbols∗∗∗, ∗∗, and ∗ indicate significance at 1%, 5%, and 10%, respectively.Finally, in Table7, we show the price volatility of several models and the actual data. We reveal that the small-world model presents the highest volatility closely followed by the random model among the models that include networks. However, this volatility is much smaller than the actual data. It is interesting to note that the introduction of networks makes stock prices much more volatile.Table 7
Price volatility.
Prices (p)NCoefficient of variationNo network effect10000.014Barabási10000.032Random10000.047Small-world10000.050Real dataDow Jones33200.349Small caps (Dow Jones)34090.341Large caps (Dow Jones)34090.373


### 3.2. Network Analysis

With the incorporation of networks in the model, some profiles enabled only with the introduction of networks were investigated. The degree of homophily (or network homogeneity) is one of these characteristics.Homophily (h) of a network tends to connect nodes with the same characteristics. In our model, the characteristic analyzed is the investment strategy: fundamentalist, chartist, and random. Its quantification is made by comparing the number of edges that connect nodes of similar characteristics (Q) with the expected number of these connections if they were perfectly grouped (Qmax), that is,(20)h=QQmax,where(21)Q=∑i,jAi,j−xixj2mδi,j,Qmax=2m−∑i,jxixj2mδi,j,and Ai,j are the elements of the adjacency matrix A that defines a network, xi is the degree of node i, m is the number of edges of the network, and δi,j is the Kronecker’s delta. The closer h is to the unit, the more homogenous the network will be.Figure4 shows the degree of homophily in the Barabási network, the random network, and the small-world network.Figure 4
Degree of homophily according to the network topology. The small-world network presents greater values (its groups of connected agents are more homogenous concerning the type of strategy), followed by the Barabási network, and finally the random network.By making a weighted average of the degree of homophily of the three networks, we have Table8.Table 8
Average degree of homophily according to network topology.
BarabásiRandomSmall-world0.19390.11360.3872As observed, the small-world network has the highest degree of homophily. This result seems natural since the small-world network has the highest clustering.Given the possibility of investors switching investment strategies between fundamentalists, chartists, or technical and random, as explained in 1.6 above, we explore the investment strategy dynamics under the three network topologies.Figures5(a)–5(c) show the changing strategies over time. Each curve corresponds to the percentage fraction of the total of agents that adopt a specific strategy. The winning strategy is considered one in which most agents choose to adopt, that is, the highest percentage.Figure 5
Strategy Dynamics (fundamentalist–red, random–blue, and chartist–green) analyzed in the networks: (a) Barabási, (b) random, and (c) small-world. The dynamics are translated in terms of the fraction or percentage of agents that adopt one of the three strategies and vary each from 0% (no agent adopts the strategy) to 100% (all agents adopt the same strategy).
(a)(b)(c)Table9 summarizes the above results.Table 9
The average percentage of agents who adopt a particular strategy throughout the simulation.
Fundam.RandomChartist 1Chartist 5Chartist 10Barabási30.217.144.55.92.3Random66.44.813.2015.6Small-world8.8120079.2As seen above, in the Barabási network, investors have mostly become chartists with memory 1, followed by fundamentalists. The winning strategy was the fundamentalist in the random network, while in the small-world network the chartists with memory 10 prevailed.Figure6 shows the initial (the beginning of the simulation) and final configurations (the end of the simulation) of the distribution of agent types (represented by different colors), where each node size is proportional to its initial wealth (Figures 6(a), 6(c), and 6(e)) and proportional to its average wealth (Figures 6(b), 6(d), and 6(f)) in all the three networks.Figure 6
Initial (a, c, e) and final (b, d, f) configurations of agent distribution for random (a, b), small-world (c, d), and Barabási networks (e, f). The term initial refers to the beginning of the simulation and the term final refers to the end of the simulation. The size of each node is proportional to the initial wealth (a, c, e) and to the average wealth of the entire simulation (b, d, f). Graphical representation of the networks used in the simulations. Each node corresponds to an agent (100 in all). Each color of the node corresponds to a type of agent, the fundamentalists being pink; the random agents being green, orange, blue, and black; the chartists of memory 1, 5, and 10. A line represents the link between two agents. In cases (a), (c), and (e), we see how the types of agents are distributed at the beginning of the simulation. In (b), (d), and (f), we observe the configuration of the types of agents at the end of the simulation for each type of network. The size of each node is proportional to the respective wealth of the agent at the instant considered. (a, b) Random network. (c, d) Small-world network. (e, f) Barabási network.
(a)(b)(c)(d)(e)(f)We also investigated the cumulative distribution function of the absolute value of normalized returns. The power-law’s behavior with a network is close to 3, corresponding to one of the stylized facts. The closest value to 3 is obtained with the small-world network. Table10 summarizes the results.Table 10
Power law exponent value calculated from the cumulative distribution of the return rates.
No network effectBarabásiRandomSmall-world4.593.183.243.15The value of 3 is the reference pointed out as a stylized fact. The addition of a network to the model makes its behavior approximate well with the observed empirical data.We also checked the contagion dynamics, i.e., in what type of network the most significant percentage of investors follows the social group’s investment strategy with the highest relative percentage gain. Figure7 shows the answer, and Table 11 summarizes the results. The dynamics are greater in the small-world network, as shown in the figure.Figure 7
Investment strategy spread rate (%) according to the network topology. For the Barabási network (in red), there is an increasing propagation of strategy from the initial moment of the simulation; that is, the agents are leaving their initial strategies for others, reaching rapidly maximum values from which they decrease until reaching low values (less than 10). This indicates that a significant portion of the agents, after switching to a given strategy, return to their initial strategies. In the small-world network (in green), the maximum values (of the same order as the Barabási network) are reached over a longer time and decrease to values that are not too low, that is, the dynamics of change is such that a larger portion of agents go back to their initial strategy and change again. As for the random network (blue), its maximum value is well below that of the other networks.Table 11
Average propagation rate (%) according to the network.
BarabásiRandomSmall-world13.79.115.5The spread rateλ is defined as the ratio of the number of agents that have changed their initial strategy, Nc, to the total number of agents, Nt, that is,(22)λ=NcNt.Its value can vary from 0, the value in which all agents maintain their initial strategies, to 100%, when all agents changed their initial strategies. When reaching the highest value, or peak value,λ may decrease because several agents resume their initial strategy.As observed, the largest spread occurs in the small-world network followed by the Barabási network, an expected result since the small-world network has the highest clustering.We also investigated in which network the highest relative percentage gain in wealth occurred. The highest percentage gain is in relation to his or her original investment strategy. Figure8 shows the percentage gain per agent for each type of network.Figure 8
Average relative percentage gain of wealth of the 100 agents for each type of network. Values are ranked from 1 (highest gain) to 100 (greatest loss). The way agents are connected in the Barabási network favors a dynamic of strategy change. On average, most agents are richer than if they did not change their strategy, with a minimum number of agents with almost zero losses. The random network has similar behavior with slightly lower gain values than the Barabási network for most agents. The small-world network has lower values of wealth gain than the other two networks and higher values of wealth loss for about 30% of investors compared to the other networks.As can be seen, the largest percentage gain occurred in the Barabási network, where, for instance, the first agent gained about 13% more than if he or she did nothing (and kept his or her original investment strategy). In contrast, in the small-world network, the largest gain was about 3.5%. Some investors lost money in small-world and random networks. Table12 summarizes these results.Table 12
Relative average wealth gain (%).
BarabásiRandomSmall-world2.92.30.8We also investigated the wealth distribution in all networks analyzed. The Lorenz curves in Figure9 reveal that the greatest inequality is found in the Barabási network, followed by the random network. The small-world network shows the lowest wealth inequality. We also calculated the Gini coefficient for all networks, and the results shown in Table 13 corroborate the Lorenz curves.Figure 9
Lorenz curves for all networks calculated from the average wealth of each agent throughout the simulations. In the horizontal axis, we value the accumulated proportion of agents (p), and in the vertical axis, the corresponding value of the accumulated proportion of wealth, L (p).Table 13
Gini coefficient.
NetworkGini coefficientBarabási0.288Small-world0.050Random0.148


### 3.3. Sensitivity Analysis

Sensitivity analysis determines how vulnerable the outputs of a model are to parameter specifications. In other words, it is a look at how changing model parameters affect model findings. We analyze the impacts of different start conditions on the model outcomes to evaluate how sensitive a model is.In our model, given its stationarity, we picked the return rate as an output variable to examine its robustness with respect to changes of parameters. The stock price would not be a suitable choice since it is nonstationary. To test the sensitivity of our results, we ran ten simulations for each parameter value, totaling approximately 500 simulations of 1000 time steps. The parameters, the corresponding network, and the output results are described in Table14.Table 14
Sensitivity analysis.
Parameter(1)Parameter ranges(2)Network(3)Parameter value used in this paper/corresponding average return rate (A) and std dev of the return rate (SD)(4)Average return rate between the parameter ranges(5)Average std deviation of the return rate between the parameter ranges(6)Link set by new nodes (L)2≤L≤10Barabási60.1910≤A≤0.19680.0271≤SD≤0.0431ASD0.1920.0399Number of initial neighbors (IN)3≤IN≤7Small-world50.1933≤A≤0.19470.0343≤SD≤0.0485ASD0.19470.0417Rewiring probability (RP)0.05≤RP≤0.15Small-world0.100.1934≤A≤0.19670.0369≤SD≤0.0425ASD0.19470.0417Linking probability (LP)0.075≤LP≤0.15Random0.100.1927≤A≤0.19500.0392≤SD≤0.0453ASD0.19450.0436Interest rate (r)0.075≤r≤0.125Barabási0.100.1846≤A≤0.19200.0399≤SD≤0.0427ASD0.19200.0399Betaβ1500≤β≤2500Barabási20000.1908≤A≤0.19520.0334≤SD≤0.0527ASD0.19200.0399Risk aversionλ0.3≤λ≤0.9Barabási0.50.1920≤A≤0.19520.0303≤SD≤0.0619ASD0.19200.0399Interest rate (r)0.075≤r≤0.125Small-world0.100.1854≤A≤0.19920.0417≤SD≤0.0438ASD0.19470.0420Betaβ1500≤β≤2500Small-world20000.1926≤A≤0.19680.0285≤SD≤0.0630ASD0.19470.0420Risk aversionλ0.3≤λ≤0.9Small-world0.50.1939≤A≤0.19580.0252≤SD≤0.0702ASD0.19470.0420Interest rate (r)0.075≤r≤0.125Random0.100.1867≤A≤0.19730.0420≤SD≤0.0441ASD0.19450.0436Betaβ1500≤β≤2500Random20000.1928≤A≤0.19570.0292≤SD≤0.0517ASD0.19450.0436Risk aversionλ0.3≤λ≤0.9Random0.50.1945≤A≤0.19700.0287≤SD≤0.0671ASD0.19450.0436The range of the first parameters (L, IN, RP, and LP) were selected based on what could be defined using the Network Workbench software for each type of network.In the above simulations, we vary the parameters (L, IN, RP, and LP) by approximately plus or minus 50% around their central values used in most of the simulations. For example, the value in the paper for parameterL, the number of connections for new nodes in the Barabási network, is 6, so we scan it in the range from 2 to 10. Because the value used in the paper for parameter IN, the number of initial neighbors for the small-world network, is 5, we scan it in the range from 3 to 7. Likewise for the parameters RP, Rewiring Probability, and LP, Linking Probability.The other parameters,r (Interest Rate), β (to lessen market price fluctuations), and λ (risk aversion coefficient), were investigated because of their importance in stock exchange dynamics. For the three types of networks (Barabási, small-world, and random), we evaluated different values for the three parameters (r, β, and λ).As can be seen from the final three columns of Table14, the mean and standard deviation of the returns for the parameter values used in this study (column 4 of Table 14) show that our model is extremely resilient, as they are very close to the mean and standard deviation of the returns for the other parameter values reported in this sensitivity analysis (columns 5 and 6).


## 3.1. Econometric Analysis

Figure3 shows the returns of “no network effect” and “network effects” (small-world, scale-free, or random network included in the agent-based model), considering 60% of fundamentalist agents, 20% chartists, and 20% random. It is noteworthy that the behavior of simulated data using networks presents episodes of increased volatility concentrated in specific periods (volatility clustering), alternating moments of relative stability. This behavior is one of the stylized facts related to the empirical analysis of returns in the time series literature [23, 24].Figure 3
Simulated model of return rate dynamics. (a) No network effect, (b) Barabási, (c) random, and (d) small-world.
(a)(b)(c)(d)Table3 shows the descriptive statistics of rates of return for simulated and actual data (Dow Jones between 3/31/2009 and 12/16/2020).Table 3
Statistical summary.
Returns (r)NStandard deviationExcess kurtosisSkewnessJarque–Bera normality testNo network effect10000.0120.005−0.0330.178 (ns)Barabási10000.0243.624−0.324564.690∗∗∗Random10000.0273.767−0.624656.368∗∗∗Small-world10000.0282.670−0.583353.662∗∗∗Real dataDow Jones33200.01023.170−0.93474727.3∗∗∗Small caps (Dow Jones34090.01313.802−0.95927572.3∗∗∗Large caps (Dow Jones34090.01017.718−0.89945039.4∗∗∗∗∗∗The null hypothesis of normality is rejected at 1% level; ns represents that the null hypothesis is not rejected.The standard deviations of simulated returns with networks indicate greater dispersion than the calculated dispersion for actual data (except for small caps data). Interestingly, the small-world network model showed the three network models’ highest standard deviation, although the difference between them is very small. Excess kurtosis of simulated returns with networks indicates heavier tails, consistent with actual data. The observed exception refers to simulated data with no network effects whose kurtosis is very close to 3 (normal distribution value). The Jarque–Bera test rejected the hypothesis of normality for all simulated returns with networks and also for the actual data. The normality hypothesis could not be rejected for simulated returns with no network effect, in line with the kurtosis result presented above. All results point to negative skewness. The magnitude of simulated data with networks is compatible with the actual data. In summary, with any type of network, the kurtosis and skewness (in absolute value) of the return rate are much higher than the model with no network effect and are in line with real stock market data.Table4 shows the ADF test results for unit root detection according to the specifications with constant and constant and trend terms. In the case of prices, the results indicate that the unit root hypothesis cannot be rejected at the 5% level of statistical significance, except for the simulated price in the model with no network effects and for small caps in the specification with constant and trend (the KPSS with a trend term test rejects the unit root hypothesis for small caps). In the case of returns, the unit root hypothesis is rejected at the level of 1% of statistical significance for all variables. These results are in line with the stylized facts about stock prices and returns: prices generally behave like a nonstationary series (random walk), whereas returns behave like stationary series. The KPSS and Phillips–Perron tests were also performed, and the conclusions remain.Table 4
ADF unit root test.
VariableDeterministic termLagged differencesTest statisticPrices: real dataDow JonesConstant27−0.073Constant and trend27−3.171Small capsConstant9−0.689Constant and trend9−4.060(∗∗∗)Large capsConstant270.805Constant and trend27−2.081Prices: simulated dataNo network effectConstant14−3.120(∗∗)Constant and trend14−2.845BarabásiConstant26−1.389Constant and trend26−1.915RandomConstant17−1.766Constant and trend17−3.049Small-worldConstant17−1.812Constant and trend17−3.199Returns: real dataDow JonesConstant12−16.914(∗∗∗)Constant and trend12−16.913(∗∗∗)Small caps (DJ)Constant12−16.450(∗∗∗)Constant and trend12−16.455(∗∗∗)Large caps (DJ)Constant12−17.293(∗∗∗)Constant and trend12−17.290(∗∗∗)RETURNS: simulated dataNo network effectConstant5−5.032(∗∗∗)Constant and trend5−5.185(∗∗∗)BarabásiConstant21−4.477(∗∗∗)Constant and trend21−4.831(∗∗∗)RandomConstant19−4.028(∗∗∗)Constant and trend19−4.856(∗∗∗)Small-worldConstant8−3.446(∗∗∗)Constant and trend8−4.593(∗∗∗)Number of lagged differences determined by Akaike information criteria. The symbols∗∗∗ and ∗∗ indicate statistical significance at 1% and 5% levels, respectively.Conditional volatility models (GARCH and its variants) were developed throughout the 1980s (see Engle [25] and Bollerslev [26]. These models aim to adequately explain a stylized fact related to macroeconomic and financial series, specifically the phenomenon known as volatility clustering, where variations of great magnitude tend to focus on specific periods. Technically, in GARCH models, the goal is to model the second moment of the series under analysis explicitly.Letεt be the disturbance of a time series. If this follows an ARCH (q) process, it may be represented by(15)εt=σtut,where(16)ut∼i.i.d.0,1,σt2=ω+∑i=1qαiεt−i2.One of the ARCH model (q) problems is the relatively large number of parameters required for proper adjustment. A potentially more parsimonious representation is given by the GARCH (p, q) model, defined by(17)σt2=ω+∑i=1qαiεt−i2+∑j=1pβiσt−j2.In general,qARCH > q + pGARCH. For many economic series, the GARCH (1, 1) model provides a good fit:(18)σt2=ω+αεt−12+βσt−12.It can be demonstrated that the GARCH model has kurtosis greater than 3 and that the volatility clustering phenomenon is governed by parameterα.An alternative specification represented by the exponential GARCH (EGARCH) model allows for the incorporation and testing of asymmetric effects in the series, i.e., adverse shocks are followed by more intense volatility increases compared to positive shocks. The EGARCH model (1, 1, 1) is given by(19)lnσt2=ω+αεt−1σt−1−Eεt−1σt−1+βlnσt−12+γεt−1σt−1.It can be demonstrated that ifα > 0, the model is compatible with volatility clustering, and if γ < 0, the model has an asymmetric effect.Following specifications (18) and (19), we achieved the following results.As seen in Tables5 and 6, the simulated models’ magnitude is mostly compatible with the actual data. On the other hand, parameter γ is not significant in the simulated models (its signal is correct in three of the four simulations).Table 5
GARCH (1, 1) estimation results.
VariableNo network effectVariableBarabásiParameterEstimateSig.ParameterEstimateSig.Omega1.267e − 05∗∗∗Omega4.451e − 06∗Alpha0.082∗∗∗Alpha0.111∗∗∗Beta0.829∗∗∗Beta0.884∗∗∗VariableRandomVariableSmall-worldParameterEstimateSig.ParameterEstimateSig.Omega1.540e − 05∗∗∗Omega5.922e − 06∗∗∗Alpha0.169∗∗∗Alpha0.164∗∗∗Beta0.808∗∗∗Beta0.831∗∗∗VariableDow JonesVariableSmall capsParameterEstimateSigParameterEstimateSig.Omega2.414e − 06∗∗∗Omega3.054e − 06∗∗∗Alpha0.129∗∗∗Alpha0.095∗∗∗Beta0.846∗∗∗Beta0.885∗∗∗VariableLarge capsParameterEstimateSig.Omega2.557e − 06∗∗∗Alpha0.122∗∗∗Beta0.853∗∗∗The symbols∗∗∗, ∗∗, and ∗ indicate significance at 1%, 5%, and 10%, respectively.Table 6
EGARCH (1, 1) estimation results.
VariableNo network effectVariableBarabásiParameterEstimateSig.ParameterEstimateSig.Omega−0.911∗∗∗Omega−0.240∗∗∗Alpha0.145∗∗∗Alpha0.218∗∗∗Beta0.910∗∗∗Beta0.992∗∗∗Gamma−0.004Gamma0.010VariableRandomVariableSmall-worldParameterEstimateSig.ParameterEstimateSig.Omega−0.535∗∗∗Omega−0.425∗∗∗Alpha0.324∗∗∗Alpha0.316∗∗∗Beta0.964∗∗∗Beta0.978∗∗∗Gamma−0.008Gamma−0.002VariableDow JonesVariableSmall capsParameterEstimateSigParameterEstimateSig.Omega−0.482∗∗∗Omega−0.318∗∗∗Alpha0.176∗∗∗Alpha0.143∗∗∗Beta0.963∗∗∗Beta0.977∗∗∗Gamma−0.155∗∗∗Gamma−0.118∗∗∗VariableLarge capsParameterEstimateSig.Omega−0.439∗∗∗Alpha0.162∗∗∗Beta0.966∗∗∗Gamma−0.142∗∗∗The symbols∗∗∗, ∗∗, and ∗ indicate significance at 1%, 5%, and 10%, respectively.Finally, in Table7, we show the price volatility of several models and the actual data. We reveal that the small-world model presents the highest volatility closely followed by the random model among the models that include networks. However, this volatility is much smaller than the actual data. It is interesting to note that the introduction of networks makes stock prices much more volatile.Table 7
Price volatility.
Prices (p)NCoefficient of variationNo network effect10000.014Barabási10000.032Random10000.047Small-world10000.050Real dataDow Jones33200.349Small caps (Dow Jones)34090.341Large caps (Dow Jones)34090.373


## 3.2. Network Analysis

With the incorporation of networks in the model, some profiles enabled only with the introduction of networks were investigated. The degree of homophily (or network homogeneity) is one of these characteristics.Homophily (h) of a network tends to connect nodes with the same characteristics. In our model, the characteristic analyzed is the investment strategy: fundamentalist, chartist, and random. Its quantification is made by comparing the number of edges that connect nodes of similar characteristics (Q) with the expected number of these connections if they were perfectly grouped (Qmax), that is,(20)h=QQmax,where(21)Q=∑i,jAi,j−xixj2mδi,j,Qmax=2m−∑i,jxixj2mδi,j,and Ai,j are the elements of the adjacency matrix A that defines a network, xi is the degree of node i, m is the number of edges of the network, and δi,j is the Kronecker’s delta. The closer h is to the unit, the more homogenous the network will be.Figure4 shows the degree of homophily in the Barabási network, the random network, and the small-world network.Figure 4
Degree of homophily according to the network topology. The small-world network presents greater values (its groups of connected agents are more homogenous concerning the type of strategy), followed by the Barabási network, and finally the random network.By making a weighted average of the degree of homophily of the three networks, we have Table8.Table 8
Average degree of homophily according to network topology.
BarabásiRandomSmall-world0.19390.11360.3872As observed, the small-world network has the highest degree of homophily. This result seems natural since the small-world network has the highest clustering.Given the possibility of investors switching investment strategies between fundamentalists, chartists, or technical and random, as explained in 1.6 above, we explore the investment strategy dynamics under the three network topologies.Figures5(a)–5(c) show the changing strategies over time. Each curve corresponds to the percentage fraction of the total of agents that adopt a specific strategy. The winning strategy is considered one in which most agents choose to adopt, that is, the highest percentage.Figure 5
Strategy Dynamics (fundamentalist–red, random–blue, and chartist–green) analyzed in the networks: (a) Barabási, (b) random, and (c) small-world. The dynamics are translated in terms of the fraction or percentage of agents that adopt one of the three strategies and vary each from 0% (no agent adopts the strategy) to 100% (all agents adopt the same strategy).
(a)(b)(c)Table9 summarizes the above results.Table 9
The average percentage of agents who adopt a particular strategy throughout the simulation.
Fundam.RandomChartist 1Chartist 5Chartist 10Barabási30.217.144.55.92.3Random66.44.813.2015.6Small-world8.8120079.2As seen above, in the Barabási network, investors have mostly become chartists with memory 1, followed by fundamentalists. The winning strategy was the fundamentalist in the random network, while in the small-world network the chartists with memory 10 prevailed.Figure6 shows the initial (the beginning of the simulation) and final configurations (the end of the simulation) of the distribution of agent types (represented by different colors), where each node size is proportional to its initial wealth (Figures 6(a), 6(c), and 6(e)) and proportional to its average wealth (Figures 6(b), 6(d), and 6(f)) in all the three networks.Figure 6
Initial (a, c, e) and final (b, d, f) configurations of agent distribution for random (a, b), small-world (c, d), and Barabási networks (e, f). The term initial refers to the beginning of the simulation and the term final refers to the end of the simulation. The size of each node is proportional to the initial wealth (a, c, e) and to the average wealth of the entire simulation (b, d, f). Graphical representation of the networks used in the simulations. Each node corresponds to an agent (100 in all). Each color of the node corresponds to a type of agent, the fundamentalists being pink; the random agents being green, orange, blue, and black; the chartists of memory 1, 5, and 10. A line represents the link between two agents. In cases (a), (c), and (e), we see how the types of agents are distributed at the beginning of the simulation. In (b), (d), and (f), we observe the configuration of the types of agents at the end of the simulation for each type of network. The size of each node is proportional to the respective wealth of the agent at the instant considered. (a, b) Random network. (c, d) Small-world network. (e, f) Barabási network.
(a)(b)(c)(d)(e)(f)We also investigated the cumulative distribution function of the absolute value of normalized returns. The power-law’s behavior with a network is close to 3, corresponding to one of the stylized facts. The closest value to 3 is obtained with the small-world network. Table10 summarizes the results.Table 10
Power law exponent value calculated from the cumulative distribution of the return rates.
No network effectBarabásiRandomSmall-world4.593.183.243.15The value of 3 is the reference pointed out as a stylized fact. The addition of a network to the model makes its behavior approximate well with the observed empirical data.We also checked the contagion dynamics, i.e., in what type of network the most significant percentage of investors follows the social group’s investment strategy with the highest relative percentage gain. Figure7 shows the answer, and Table 11 summarizes the results. The dynamics are greater in the small-world network, as shown in the figure.Figure 7
Investment strategy spread rate (%) according to the network topology. For the Barabási network (in red), there is an increasing propagation of strategy from the initial moment of the simulation; that is, the agents are leaving their initial strategies for others, reaching rapidly maximum values from which they decrease until reaching low values (less than 10). This indicates that a significant portion of the agents, after switching to a given strategy, return to their initial strategies. In the small-world network (in green), the maximum values (of the same order as the Barabási network) are reached over a longer time and decrease to values that are not too low, that is, the dynamics of change is such that a larger portion of agents go back to their initial strategy and change again. As for the random network (blue), its maximum value is well below that of the other networks.Table 11
Average propagation rate (%) according to the network.
BarabásiRandomSmall-world13.79.115.5The spread rateλ is defined as the ratio of the number of agents that have changed their initial strategy, Nc, to the total number of agents, Nt, that is,(22)λ=NcNt.Its value can vary from 0, the value in which all agents maintain their initial strategies, to 100%, when all agents changed their initial strategies. When reaching the highest value, or peak value,λ may decrease because several agents resume their initial strategy.As observed, the largest spread occurs in the small-world network followed by the Barabási network, an expected result since the small-world network has the highest clustering.We also investigated in which network the highest relative percentage gain in wealth occurred. The highest percentage gain is in relation to his or her original investment strategy. Figure8 shows the percentage gain per agent for each type of network.Figure 8
Average relative percentage gain of wealth of the 100 agents for each type of network. Values are ranked from 1 (highest gain) to 100 (greatest loss). The way agents are connected in the Barabási network favors a dynamic of strategy change. On average, most agents are richer than if they did not change their strategy, with a minimum number of agents with almost zero losses. The random network has similar behavior with slightly lower gain values than the Barabási network for most agents. The small-world network has lower values of wealth gain than the other two networks and higher values of wealth loss for about 30% of investors compared to the other networks.As can be seen, the largest percentage gain occurred in the Barabási network, where, for instance, the first agent gained about 13% more than if he or she did nothing (and kept his or her original investment strategy). In contrast, in the small-world network, the largest gain was about 3.5%. Some investors lost money in small-world and random networks. Table12 summarizes these results.Table 12
Relative average wealth gain (%).
BarabásiRandomSmall-world2.92.30.8We also investigated the wealth distribution in all networks analyzed. The Lorenz curves in Figure9 reveal that the greatest inequality is found in the Barabási network, followed by the random network. The small-world network shows the lowest wealth inequality. We also calculated the Gini coefficient for all networks, and the results shown in Table 13 corroborate the Lorenz curves.Figure 9
Lorenz curves for all networks calculated from the average wealth of each agent throughout the simulations. In the horizontal axis, we value the accumulated proportion of agents (p), and in the vertical axis, the corresponding value of the accumulated proportion of wealth, L (p).Table 13
Gini coefficient.
NetworkGini coefficientBarabási0.288Small-world0.050Random0.148


## 3.3. Sensitivity Analysis

Sensitivity analysis determines how vulnerable the outputs of a model are to parameter specifications. In other words, it is a look at how changing model parameters affect model findings. We analyze the impacts of different start conditions on the model outcomes to evaluate how sensitive a model is.In our model, given its stationarity, we picked the return rate as an output variable to examine its robustness with respect to changes of parameters. The stock price would not be a suitable choice since it is nonstationary. To test the sensitivity of our results, we ran ten simulations for each parameter value, totaling approximately 500 simulations of 1000 time steps. The parameters, the corresponding network, and the output results are described in Table14.Table 14
Sensitivity analysis.
Parameter(1)Parameter ranges(2)Network(3)Parameter value used in this paper/corresponding average return rate (A) and std dev of the return rate (SD)(4)Average return rate between the parameter ranges(5)Average std deviation of the return rate between the parameter ranges(6)Link set by new nodes (L)2≤L≤10Barabási60.1910≤A≤0.19680.0271≤SD≤0.0431ASD0.1920.0399Number of initial neighbors (IN)3≤IN≤7Small-world50.1933≤A≤0.19470.0343≤SD≤0.0485ASD0.19470.0417Rewiring probability (RP)0.05≤RP≤0.15Small-world0.100.1934≤A≤0.19670.0369≤SD≤0.0425ASD0.19470.0417Linking probability (LP)0.075≤LP≤0.15Random0.100.1927≤A≤0.19500.0392≤SD≤0.0453ASD0.19450.0436Interest rate (r)0.075≤r≤0.125Barabási0.100.1846≤A≤0.19200.0399≤SD≤0.0427ASD0.19200.0399Betaβ1500≤β≤2500Barabási20000.1908≤A≤0.19520.0334≤SD≤0.0527ASD0.19200.0399Risk aversionλ0.3≤λ≤0.9Barabási0.50.1920≤A≤0.19520.0303≤SD≤0.0619ASD0.19200.0399Interest rate (r)0.075≤r≤0.125Small-world0.100.1854≤A≤0.19920.0417≤SD≤0.0438ASD0.19470.0420Betaβ1500≤β≤2500Small-world20000.1926≤A≤0.19680.0285≤SD≤0.0630ASD0.19470.0420Risk aversionλ0.3≤λ≤0.9Small-world0.50.1939≤A≤0.19580.0252≤SD≤0.0702ASD0.19470.0420Interest rate (r)0.075≤r≤0.125Random0.100.1867≤A≤0.19730.0420≤SD≤0.0441ASD0.19450.0436Betaβ1500≤β≤2500Random20000.1928≤A≤0.19570.0292≤SD≤0.0517ASD0.19450.0436Risk aversionλ0.3≤λ≤0.9Random0.50.1945≤A≤0.19700.0287≤SD≤0.0671ASD0.19450.0436The range of the first parameters (L, IN, RP, and LP) were selected based on what could be defined using the Network Workbench software for each type of network.In the above simulations, we vary the parameters (L, IN, RP, and LP) by approximately plus or minus 50% around their central values used in most of the simulations. For example, the value in the paper for parameterL, the number of connections for new nodes in the Barabási network, is 6, so we scan it in the range from 2 to 10. Because the value used in the paper for parameter IN, the number of initial neighbors for the small-world network, is 5, we scan it in the range from 3 to 7. Likewise for the parameters RP, Rewiring Probability, and LP, Linking Probability.The other parameters,r (Interest Rate), β (to lessen market price fluctuations), and λ (risk aversion coefficient), were investigated because of their importance in stock exchange dynamics. For the three types of networks (Barabási, small-world, and random), we evaluated different values for the three parameters (r, β, and λ).As can be seen from the final three columns of Table14, the mean and standard deviation of the returns for the parameter values used in this study (column 4 of Table 14) show that our model is extremely resilient, as they are very close to the mean and standard deviation of the returns for the other parameter values reported in this sensitivity analysis (columns 5 and 6).


## 4. Conclusions

We have presented an agent-based model that includes a behavioral variable (confidence), which changes according to the variation of the investor’s wealth compared to other investors’ wealth in his or her social network. We have investigated this model’s properties on three types of social networks (small-world, scale-free, and random). The combination of a psychological variable (confidence) with social networks produced results consistent with empirical facts. The incorporation of networks in conjunction with the behavioral variable sheds light on several properties that are little explored in this literature, such as the degree of homophily and the level of wealth inequality within social network topologies of a virtual stock exchange.It is noteworthy that the behavioral (confidence) variable plays a crucial role within the model, as it determines that the investor–whether fundamentalist, chartist, or random–decides to change or not his or her investment strategy once confidence changes according to his or her wealth growth rate in comparison with the investor’s average wealth growth rate in his or her social network. The confidence is not very volatile and is enjoying a large interval of stability. Also, the investor only changes his or her strategy when his or her confidence value reaches belowCn, a neutral confidence index. In other words, the fundamentalist, chartist, or random investor will change his or her strategy to a more profitable one whenever he or she has little confidence in his or her current investment strategy.The actual stock exchange data’s statistical properties are recovered in our model: high excess kurtosis, skewness, volatility clustering, random walk prices, and stationary return rates. We also investigated several types of networks. For instance, the small-world network has the highest degree of homophily. As the investors can switch to more profitable strategies, we found that the fundamentalist strategy is prevalent only in the random network. In the other networks (Barabási and small-world), the best approach to make profitable investments is the chartist one, which is a surprising outcome since the network models are compatible with the random walk hypothesis. We also investigated the cumulative distribution function of the absolute value of normalized returns. The exponent of the power-law distribution is found close to 3, in agreement with stylized empirical facts. The most extensive spread of social contagion occurs in the small-world network, an expected result since this network topology has the highest clustering. The Barabási network has uneven income distribution and a greater relative gain, followed by the random network. With regard to sensitivity analysis, we showed that the model outputs are robust. In terms of the mean and standard deviation of the stock return rate, changes in the values of various parameters (unique to each social network and general to all networks) yield fairly comparable outcomes. Finally, for future studies, we suggest looking into the effects of social networks on the creation of bubbles and collapses on the stock exchange and determining what type of social network a stock exchange may be characterized into.



---

*Source: 1083640-2021-07-19.xml*