#### Abstract

An information-based multiasset artificial stock market characterized by different types of stocks and populated by heterogeneous agents is presented and studied so as to determine the influences of agents’ networks on the market’s structure. Agents are organized in networks that are responsible for the formation of the sentiments of the agents. In the market, agents trade risky assets in exchange for cash and share their sentiments by means of interactions that are determined by sparsely connected graphs. A central market maker (clearing house mechanism) determines the price process for each stock at the intersection of the demand and the supply curves. A set of market’s structure indicators based on the main single-assets and multiassets stylized facts have been defined, in order to study the effects of the agents’ networks. Results point out an intrinsic structural resilience of the stock market. In fact, the network is necessary in order to archive the ability to reproduce the main stylized facts, but also the market has some characteristics that are independent from the network and depend on the finiteness of traders’ wealth.

#### 1. Introduction

The large availability of financial data has allowed the study of financial markets by means of the cooperation of different fields such as engineering, physics, mathematics, and economics [1–5]. This new multidisciplinary approach overcomes the limits of the classical approach and improves the knowledge about the price processes, discovering the so called stylized facts, that is, the main statistical properties of financial markets. In particular, focusing on the distribution of intertrade time between different financial transactions, previous works have demonstrated the presence of Weibull distribution [6]. Moreover, empirical study has demonstrated that the dynamics of price and volume of transactions, including the volatility over different time horizons, are influenced by the correlations and temporal patterns of the intertrade times. Furthermore, the rules that regulate the interactions among agents strongly depend on the regulatory mechanisms of each individual market [7]. In order to evaluate the correlations and to identify and quantify integrations among dynamical entities, such as agents on the stock market, special methods have been developed [8, 9]. Generally speaking, according to the classical approach, simple analytically tractable models with a representative, perfectly rational agent have been the main corner stones and mathematics has been the main tool of analysis. Conversely, the complexity science approach considers financial markets as complex systems where a large number of heterogeneous agents interact. In particular, the markets are populated by boundedly rational, heterogeneous agents using rule of thumb strategies. This approach fits much better with agent-based simulation models and computational and numerical methods have become an important tool of analysis [10]. Thus, a number of computer-simulated, artificial financial markets have been born with the aim of becoming a framework to perform computational experiments. Following the pioneering work done at the Santa Fe Institute [11–13], a large number of researchers have proposed model for artificial markets populated by heterogeneous agents endowed with learning and optimization capabilities [14, 15]. Moreover, the artificial financial markets are a useful framework to study the role of fraudulent agents and the corruption in financial markets, that is, how the fraudulent agents impact on the markets [16]. In particular, empirical analysis shows that corruption influences the economic growth rate and foreign investment [17]. For a detailed review on microscopic (“agent-based”) models of financial markets see [18, 19].

In this paper, using the Genoa Artificial Stock Market (GASM) developed in Genoa, the impact of the structural properties of traders’ networks of interaction on the emergent outcome in financial markets has been studied. In particular, starting from the information-based single-assets artificial market, a multiassets artificial stock market version of the GASM has been used [20–23]. In order to investigate this relationship, the market is populated by heterogeneous agents that are seen as nodes of sparsely connected graphs. The market is characterized by different types of stocks and agents trade risky assets in exchange for cash. Agents share their information by means of interactions that are determined by the graphs. Besides the amount of cash and assets owned, each agent is characterized by sentiments that summarize the agent’s information about the market and agent world. The sentiments include in one element the influence of the market trend, the influence of the neighbours agents, and the propensity for the market. Agents are subject to a portfolio choice on number and type of risky securities. The allocation strategy is based on sentiments and wealth. A central market maker (clearing house mechanism) determines the price process for each stock at the intersection of the demand and the supply curves.

The paper presents a study on how the traders’ networks and, thus, the sentiments’ components influence the market structure. In particular, this paper investigates the effects of changes in traders’ networks of interaction in the financial market. In order to perform this investigation, five different “market’s structure indicators” have been defined. The indicators have been defined considering the main univariate and multivariate stylized facts. Concerning univariate processes, the three main stylized facts taken as reference are the unitary root of price processes, the fat tails distribution of returns, and the volatility clustering. Concerning the multiassets environment the set of stylized facts consists in the statistical properties of the cross-correlation matrices of returns [24–26] and of the variance-covariance matrices of prices [27] that make reference to static and dynamic factors, respectively.

Thus, the indicators defined are the number of I processes, the number of heteroscedastic processes, the number of processes with fat tails, the number of sector presented in the market, and the number of common trends. The computational experiments show an intrinsic structural resilience of the stock market. In fact, some characteristics of the market are “structural” and depend on the agents’ budget constraint, whereas others are an emerging properties of the traders’ network of interactions.

The paper is organized as follows: Section 2 presents the model and Section 3 the “market’s structure indicators” and Section 4 shows the computational experiments and Section 5 the discussion of results. Finally, Section 6 provides the conclusion of the study.

#### 2. The GASM Model

##### 2.1. Overview of the GASM Model

The model presented in this paper is an enrichment of the Genoa Artificial Stock Market (GASM) developed at the University of Genoa [20, 28]. The GASM is an agent-based artificial stock market whose baseline originally includes heterogeneous agents that trade risky assets in exchange for cash [29]. They are modeled as liquidity traders; that is, decision making process is constrained by the finite amount of financial resources (cash + stocks) they own. At the beginning of the simulation, cash and stocks are distributed randomly among agents.

##### 2.2. Agents’ Networks

In order to investigate the effects of agents’ networks in financial markets, for each stock presented in the market, the heterogeneous agents have been organized in graphs, and in particular, according to a directed random graph, where the agents are the nodes and the branches represent the interactions among agents. The graphs are responsible for the changes in agent’s sentiments. The graphs are directed; that is, the interactions are assumed unidirectional (i.e., if agent -th influences agent -th not necessarily agent -th influences agent -th) and characterized by a strength , assuming a positive real number. Generally speaking, due to the presence of a directed graph, both an output node degree, related to the output branches of a given node, and an input node degree, related to the input branches, should be defined.

The agents are organized according to a Zipf law. For each stock an agent is randomly connected to a set of other agents whose number and strength (of the connection) are inversely proportional to his/her rank, that is, richer agents influence a larger number of agents with a higher strength. Consequently, the output degree distributions over the nodes are set to power laws and the input degree distributions result in power laws too. Each agent has a different belief about the assets depending on his/her rank. Agent is characterized by a sentiment (i.e., real number in the interval ) that represents a propensity to invest in asset . A positive average sentiment denotes a propensity to buy, whereas a negative average sentiment corresponds to a propensity to sell. The graphs are responsible for the changes in agent’s sentiments. At each time step , information is propagated through the market and sentiments of agent are updated.

Let be the set of agents that influences the behavior of trader* i*-th for the asset and the market price of the risky asset . The new sentiments of agent* i*-th for each asset are functions of the previous sentiments, of the log return (market feedback), of the influence of interacting agents and of average sentiment of the agent about the market behavior. The expression is whereis a smooth function that constrains agent sentiments in the range .

Furthermore, represents the market feedback, represents the influence of interacting agents, and models the global vision of agent -th for the market trend. The coefficients in (1) are inversely proportional to agent’s rank; that is, richer agents have stronger beliefs. Moreover a constraint on graph intersection is consideredthat is, self-interaction is a counterpart of graph interactions, with random (i.e., uniform distribution) changes in sign at each time step. Eq. (6) models a specific behavior of agents, that is, the fact that sometimes an agent changes idea about the sentiments of neighbour, and so he changes his reaction. In fact, (6) points out that agent that are strongly influenced by their previous sentiment (big traders, bank, mutual funds, etc.) and are poorly influenced by the neighbouring agents’ sentiment (e.g., small single investors) and represents the self-neighbouring sentiment balance coefficient [20].

Moreover, the amplitude of market feedback depends on rank, so that the coefficients are inversely proportional to agent ranks; that is, agents with higher ranks are less sensitive to the single asset trends. Finally, the term is a stabilizing element for the sentiment, so that the coefficient in (1) is always negative.

Agent’s trading decision is based on cash and stocks owned and on sentiment. In particular, the stock price process depends on the propagation of information among the interacting agents, on budget constraints and on market feedback. In this respect, also the coefficients in (1) are proportional to agent’s rank; that is, richer agents have stronger beliefs.

##### 2.3. Allocation Strategy

At each time step , a subset of agents is randomly chosen from a uniform distribution to operate as traders on the market. Let be the sentiment, the amount of cash, and the amount of asset owned by the -th trader at time .

If is the market price of the risky asset at time step , the risky wealth owned by trader at time step is whereas represents the total wealth of agent -th.

At each simulation step, trader -th tries to allocate in risky assets a fraction of his total wealth related to his vision of the market trend; that is, where .

is the average sentiments of all assets described by (5). The symbol denotes that is the amount that agent* i*-th is willing to allocate in the risky investment, whereas the real amount effectively allocated in stocks will depend on the trading process with the other agents. For each asset , a positive sentiment denotes a propensity to allocate, while a negative sentiment denotes a propensity to sell all the assets in the portfolio. In this model only long positions are allowed. Thus, if , the quantity desired by agent of risky asset is given by where is given by is the set of assets with positive sentiment. The symbol in (9) denotes the integer part. Conversely, if , asset is characterized by a desired quantity .

The amount of the order issued by trader -th at time step relative to stock is is the difference between the desired amount of stock at time step and the real amount held in the portfolio by agent -th. If the order is a buy order. Conversely, if the agent issues a sell order. Every order is associated with a limit price. Each limit price is determined according to (12) where is a random draw from a Gaussian distribution with average According to previous models [20, 30], we assume that buy (sell) orders cannot be executed at prices above (below) their limit price . It is worth noting that for a buy order (i.e., ) in average . Conversely, for a sell order (i.e., ) in average . Furthermore, the standard deviation is proportional to the historical volatility of the price of stock through the equation . Linking limit orders to volatility takes into account a realistic aspect of trading psychology: when volatility is high, uncertainty on the “true” price of a stock grows and traders place orders with a broader distribution of limit prices. In our model, is a constant for all agents, whereas is the standard deviation of log-price returns of asset , computed in a time window proper for agent -th randomly associated with the agent [20, 28].

All buy and sell orders issued at time step are collected and the demand and supply curves are consequently computed. The intersection of the two curves determines the new price (clearing price) of stock (see [20, 28] for more details on market clearing).

Buy and sell orders with limit prices compatible with are executed. After any transactions, traders’ cash, portfolio, and sentiments are updated. Orders that do not match the clearing price are discarded.

#### 3. Market’s Structure Indicators

As discussed in the previous Sections, we aim to investigate how the structural properties of traders’ networks of interactions affect the emergent outcome of financial markets. In order to measure the influence of the traders’ networks on financial markets, five different indicators have been defined, that is,(a)The number of prices processes that are integrated I processes(b)The number of returns processes that exhibit volatility clustering (heteroscedastic processes)(c)The number of returns processes whose distribution shows fat tails (power law distributions)(d)The number of static factors(e)The number of dynamic factors

These indicators make reference to the main stylized facts, empirically derived by the international literature on stock markets. In fact, the large availability of financial data has allowed both qualitative and quantitative investigations of financial markets by means of stylized facts. In particular, the indicators (a), (b), and (c) referred to the single asset statistical properties [31–35], whereas indicators (d) and (e) referred to the multiassets statistical properties [24–27].

The first indicator chosen is the number of prices processes that are integrated I processes and is indicated with [31]. In order to verify if a time series is integrated I process, the Augmented Dickey-Fuller and the Kwiatkowski, Phillips, Schmidt, and Shin (KPSS) tests at the significance level of 5% are employed. It is worth remembering that the null hypothesis of the ADF test is that a univariate time series presents a unit root, whereas the null hypothesis of the KPSS test is that the time series is stationary [36, 37]. Figure 1(a) shows an I price process for a typical asset generated by the artificial stock market (GASM) presented in this paper.

**(a)**

**(b)**

The second indicator chosen is the number of returns processes that present volatility clustering and is indicated with [33]. In order to test the presence of heteroscedastic effect, Engle’s autoregressive conditional heteroscedastic (ARCH) test and the Ljung-Box -test (LBQ test) at the significance level of 5% are employed. It is worth noting that the null hypothesis of the ARCH test is no conditional heteroscedasticity, whereas the null hypothesis of the LBQ test is that the residuals of the absolute value of returns are autocorrelated [38–40]. Figure 1(b) shows the volatility clustering of the return process for the price process shown in Figure 1(a).

The third indicator chosen is the number of returns processes whose distribution presents “fat tails” and is indicated with [35]. It is worth remembering that the expression “fat tails” means that the distribution of the analyzed data decays with a power law; that is, if compared with a Gaussian distribution, it decays slowly compared to the Gaussian distribution. The Gaussian distribution has kurtosis equal to 3; that is, if the data’s kurtosis is larger than 3, the data exhibits “fat tails” and the distribution is leptokurtic. Figure 2 shows the “fat tails” of returns for asset shown in Figure 1 compared with a Gaussian distribution. Moreover, the presence of “fat tails” is checked by means of the Jarque-Bera (JB) test. It is worth remembering that the null hypothesis of JB test is that the data comes from a normal distribution with an unknown mean and variance [41].

The fourth and fifth indicators are focused on the statistical properties of the multivariate process of prices and returns and deal with the definition and analysis of factor models. In the context of factor models, two main classes can be identified, that is, static and dynamic factors. Concerning the former class, attention is paid to returns as the return processes result (in the first approximation) in quasi-stationary. In particular, the risk of a security can be described as superposition of different source of risks (also described by stationary processes) and this general formulation is basic for classical portfolio theory and risk management, CAPM, multifactors CAPM, APT, and so on [42–45].

Conversely, in the case of dynamic factors attention is paid to asset prices and the main employed concept is cointegration. In particular, statistical analysis on empirical data points out that in financial markets it is not possible to reject the hypothesis of integrated univariate price processes, but at the aggregate level the price processes are not independent. Indeed, only few independent integrated processes can be identified, whereas all the others price processes are cointegrated with them; that is, it is possible to identify linear combinations of I price processes that result in stationary I(0) processes (so called cointegration equations) [42–45].

The number of static factor, , is evaluated using the cross-correlation matrix of returns. In particular, following the approach introduced in the econophysics literature [24–26], the cross-correlations of returns are analyzed in the framework of the random matrix theory (RMT). Thus, the indicator is equal to the number of the eigenvalues of the cross-correlation matrix that are larger than the largest eigenvalue of the random matrix. It is worth noting that the largest eigenvalue represents the market, whereas the eigenvalues larger than the largest eigenvalue of the random matrix represent the sectors. Figure 3 shows the probability density function (PDF) of eigenvalues of the cross-correlation matrix for the GASM data. Furthermore, for the sake of comparison, the theoretical PDF of a random matrix (represented by the continuous line) and the PDF of eigenvalues for the 100 stocks, randomly chosen, among the S&P 500 index are also shown. The presence of outliers well above the bounds determined according to RMT (i.e., eigenvalues larger than the largest eigenvalue determined by the RMT) is highlighted.

Finally, the fifth indicator, the number of dynamic factors, , makes reference to assets prices and their cointegration. This indicator has been defined by means of the variance-covariance matrix of prices. According to empirical analysis, only a reduced number of assets prices series in a large market are independent integrated processes [27]. In fact, the analysis of prices processes shows that financial assets are random walk, that is, I processes, but aggregate of financial assets exhibits cointegration. The analysis of this property is performed following the procedure described by Stock and Watson [27]. In particular, the PCA analysis on the variance-covariance matrix of prices allows one to identify portfolios with minimum variance. Conversely to price processes, these portfolios, that is, linear combination of prices, generally accept the hypothesis of stationarity [27] that is verified by the ADF and KPSS test at significance level of 5%. Thus, the indicator is evaluated as the number of portfolios that reject the hypothesis of stationarity. Figure 4 shows the results of the ADF test for the GASM data and for 100 stocks, randomly chosen, among the S&P 500 index. As clearly stated in Figure 4, only a reduced number of portfolios reject the hypothesis of stationarity. These series are the only independent I processes, that is, the common trends of the aggregate.

#### 4. Computational Experiments

All the computational experiments performed make reference to an artificial stock market with 100 different stocks each of them related to a specific firm. The number of agents is set to 2,278 that are initially endowed by a random distribution of cash and number of stocks. Furthermore, time window for the calculation of the historical standard deviation is randomly chosen from a uniform distribution in the range (10, 100).

Furthermore, the influence of the traders’ networks on the financial market has been investigated by varying the coefficients in (1) and analyzing the behavior of the five indicators defined in Section 3. In particular, the performed analysis addresses the influence of the market return , of the neighbouring agents and of the agent global vision of the market sentiment , respectively. The influence of each varies among three values, none (N), average (A), or strong (S). It is worth noting that, in the case of N, the corresponding interaction is absent, in the case of A, the interaction is at a reference value, and in the case of S the influence is an order of magnitude larger than the reference value. Table 1 summarizes the all scenarios considered in the analysis.

#### 5. Results and Discussion

The 27 scenarios have been considered and Table 2 shows the market’ structure indicators for all cases.

The indicators , , and refer to the behavior of the single asset whereas and refer to the behavior of the multiasset market.

Concerning the indicator, that is, the number of assets that are I processes, Table 2 shows the results of the ADF and KPSS tests. It is worth noting that, from scenario (i) to scenario (ix) and from scenario (xix) to scenario (xxvii), that is, when is equal to zero or it is very large, according to the ADF test, almost all the price processes reject the null hypothesis of unitary root. Conversely, from scenario (x) to scenario (xviii) the price processes do not reject the hypothesis of unitary root. These results are also confirmed by the KPSS test, for which the null hypothesis of stationarity is rejected for every cases. Based on these results, we can conclude that the influence of the neighbour is crucial in order to reproduce the single asset stylized facts. The indicator , that is, the number of returns processes that are heteroscedastic, shows that the volatility clustering is always present for every scenario. In fact, Table 2 reports the results of the ARCH test, that is, the number of returns processes that reject the null hypothesis of no conditional heteroscedasticity. This result has been also verified performing the Ljung-Box test on the absolute value of returns processes. It is worth noting that indicator suggests that the heteroscedasticity is a strong feature of financial markets not depending on the traders’ networks of interaction.

The indicator , that is, the number of returns process with kurtosis larger than three, shows that if the is null or average, that is, from scenario (i) to scenario (xviii), the price processes exhibit fat tails, whereas if is strong, that is, from scenario (xix) to scenario (xxvii), the indicator is small and that the returns processes do not exhibit fat tails. These results are further confirmed by the Jarque-Bera test. Table 2 reports the number of assets that do not reject to null hypothesis of normal distribution. It is worth noting that from scenario (i) to scenario (xviii) almost all the price processes reject the null hypothesis of normal distribution, whereas from scenario (xix) to scenario (xxvii), the JB test cannot reject the null hypothesis of Gaussian distribution.

Summarizing the results of indicators , , and , we can conclude that the influence of the neighbour is crucial in order to reproduce the single asset stylized facts. Moreover, if influence is strong the and indicator are significantly different from the reference values of S&P500, thus allowing us to conclude that the presence of agents’ neighbour is necessary but it should be not too large. Moreover, these results are in good agreement with the observations of market dynamics in historical and archeological data [46].

Once the impacts of the trader’ network of interactions on single asset are addressed, the attention has been focused on the indicators and that deal with the aggregate behavior of the market, that is, the statistical properties of the multivariate process of prices and returns.

In particular, the indicator shows the number of static factor, that is, the number of sectors presented in the market. First of all, it is worth noting that even for the case of absence of interactions (i.e., ), at least one sector is presented. It is worth remarking that this is not a trivial outcome as it points out that the CAPM is originated by the finiteness of trader’s wealth rather than by trader’s interactions and strategies of portfolio allocation. Furthermore, if the influence of (average sentiment) is larger than the other *α* the market shows an increasing number of sectors. Moreover, if influence is strong, that is, from scenario (xix) to scenario (xxvii), some price processes are not traded. This result can be explained focusing on the traders allocation’s choice. As ’s influence is strong, each trader is extremely influenced by the neighbours agents and thus, he/she makes the same portfolio allocation of his/her neighbours. Thus the financial market is becoming homogeneous and the heterogeneous agents start to act as in the case of a representative agent.

Finally, the presence of the common trends of the aggregate is a strong feature that is present for every scenario and becomes stronger increasing the influence of traders’ network of interactions. It is worth remarking that the number of common trends is influenced by traders’ networks and by the market feedback as confirmed by the results in Table 1. From scenario (i) to scenario (xxvii) the number of common trends increases, thus showing that the presence of cointegrated processes becomes larger as the and influence is stronger.

In is worth noting that the traders’ network of interactions influences positively the market but irrespective to such positive outcome, the main statistical properties of financial market are emergent features even in the case of absence of any interactions among the traders. This allows us to conclude that the multiassets stylized facts of the financial market are a direct consequence of realistic mechanism for portfolio allocation with budget constraint rather than of traders’ interactions network. All these emergent properties point out an intrinsic structural resilience of the stock market.

#### 6. Conclusions

An analysis of the influences of agents’ networks on the market structure has been presented using an information-based multiasset artificial stock market characterized by different types of stocks and populated by heterogeneous agents. In this complex system, agents are characterized by cash, stocks, and sentiments. Sentiments denote propensities to buy or to sell. Agents are organized in networks modeled as nodes of sparsely connected graph, so that each agent is influenced by a subset of other agent, the only ones that are “near” to him. Five network influence indicators, considering the main single-assets and multiassets stylized facts have been defined in order to investigate the effects of the agents networks. Results have pointed out an intrinsic structural resilience of the stock market. In fact the network is necessary in order to archive the ability to reproduce the main stylized facts, but also the market has some characteristics that are independent from the network and depend on the finiteness of traders’ wealth.

#### Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this paper.

#### Acknowledgments

This work has been supported by the University of Genoa under Grant FRA2016.