1 Introduction
Complex financial systems typically have many-body interactions. The interactions of multiple agents induce various collective phenomena, such as abnormal distributions, temporal correlations, and sector structures [
1-
9]. Complex financial systems are also substantially influenced by external information that may, for example, drive the systems to non-stationary states, larger fluctuations, or extreme events [
10-
17].
Complex financial systems are important examples of open complex systems. Standard finance supposes that investors have complete rationality, but the progress of behavioral and experimental finance shows that investors in real life have behavioral and emotional differences [
18,
19]. To be more specific, agents who are not fully rational may have different personal preferences and interact with each other differently in financial markets [
9,
20-
26].
Information is a leading factor in complex financial systems. However, our understanding of external information and its controlling effect in agent-based modeling is rather limited [
27-
30]. In recent years, exploring the scientific impact of online big-data has attracted much attention of researchers from different fields. The massive new data sources resulting from human interactions with the internet offer a better understanding of the profound influence of external information on complex financial systems [
31-
39].
Agent-based modeling is a powerful simulation technique to understand the collective behavior in complex financial systems [
40-
45]. More recently, the concept of determining the key parameters of agent-based models from empirical data instead of setting them artificially was suggested [
20]. A similar concept has also been applied to order-driven models, which were first proposed by Mike and Farmer [
46] and improved by Gu and Zhou [
47-
50]. In this family of order-driven models, the parameters of order submissions and order cancellations are determined using real-order book data. For comparison, agent-based models focus more on the behaviors of agents [
40-
45], while order-driven models are mainly intended to explore the dynamics of order flows [
46-
50]. In Section 2, we review several agent-based models that are based on agents’ behaviors with heterogeneous personal preferences and interactions. These models explore the microscopic origination of the temporal and spatial correlations of financial markets [
9,
21,
24]. In Section 3, we present a novel paradigm combining big-data analysis with agent-based modeling [
51].
2 New approaches in agent-based models
From the viewpoint of physicists, the dynamic behavior and community structure of complex financial systems can be characterized by temporal and spatial correlation functions. Recently, several agent-based models are proposed to explore the microscopic generation mechanisms of temporal and spatial correlations [
9,
21,
24]. These models are microscopic herding models, in which the agents are linked with each other and trade in groups, and, in particular, contain new approaches to multi-agent interactions.
2.1 Basics of agent-based models
The stock price on day t is denoted as , and the logarithmic price return is . For comparison of different time series of returns, the normalized return is introduced as
where represents the average over time t, and is the standard deviation of . In stock markets, the information for investors is highly incomplete; therefore, an agent’s decision of buy, sell, or hold is assumed to be random. In these models, there is only one stock and N agents, and each agent operates one share every day. On day t, each agent i makes a trading decision so that
and the probabilities of buy, sell, or hold decisions are denoted as , , and , respectively. The price return is defined by the difference of the demand and supply of the stock as
For simplicity, the volatility is defined as the absolute return . Other definitions yield similar results.
The investment horizon is introduced since agents’ decisions are based on the previous stock performance of different time horizons [
9,
21,
24]. It has been found that the relative portion
of agents with an
i-days investment horizon follows a power-law decay,
with
[
20]. The maximum investment horizon is denoted as
M. To describe the integrated investment basis of all agents, a weighted average return
is introduced as
where
k is a proportional coefficient. According to Ref. [
52], the investment horizons of investors range from a few days to several months. For
M between 50 and 500, the results from simulations remain robust.
In complex financial systems, herding is one of the collective behaviors, which arises when investors imitate the decision of others rather than follow their own beliefs and judgment. In other words, investors cluster into groups when making decisions [
53,
54]. Here, a herding degree,
, is introduced to quantify the clustering degree of the herding behavior as
where is the average number of agents in each cluster on day t.
2.2 Agent-based model with asymmetric trading and herding
The negative and positive return-volatility correlations, that is, the so-called leverage and anti-leverage effects, are particularly important for the understanding of price dynamics [
1,
6,
55,
56]. Although various macroscopic models have been proposed to describe the return-volatility correlation, it is very important to understand the correlations from the microscopic level. To study the microscopic origination of the return-volatility correlation in financial markets, two novel microscopic mechanisms, that is, investors’ asymmetric trading and herding in bull and bear markets, are recently introduced in agent-based modeling [
21].
2.2.1 Two important behaviors of investors
(i) Asymmetric trading. An investor’s willingness to trade is affected by the previous price returns, leading the trading probability to be distinct in bull and bear markets. The model thus assumes dynamic probabilities for buying and selling, but with
. As the trading probability
, its average over time is set to be
. We adopt the value of
p estimated in Ref. [
20], where
. The market performance is defined to be bullish if
and bearish if
. The investors’ asymmetric trading in bull and bear markets gives rise to the distinction between
and
. Thus,
should take the following form:
Here, α and β are asymmetric factors, and requires ; that is, α and β are not independent.
(ii) Asymmetric herding. Herding, as a collective behavior in financial markets, describes the fact that investors form clusters when making decisions, and these clusters can be large [
53,
54]. However, the herding behavior in bull markets is not the same as that in bear ones [
57,
58].
In general, herding should be related to previous volatilities [
59,
60], and we set the average number of agents in each cluster
. Thus, the herding degree on day
t+1 is
This herding degree is symmetric for and . However, investors’ herding behaviors in bull and bear markets are asymmetric. Thus, should be redefined as
Here, is the degree of asymmetry. Every day, agents in a cluster make the same trading decision, that is, decision to buy, sell, or hold with the same probability , , or .
2.2.2 Determination of α and ΔR
Data from six representative stock-market indices are collected, that is, daily data for the S&P 500 Index, Shanghai Index, Nikkei 225 Index, FTSE 100 Index, HKSE Index, and DAX Index.
We assume that the trading probability is proportional to the trading volume. Thus, the ratio of average trading volumes for the bull and bear markets is
Together with the condition that , α is determined from for the six representative stock market indices, as shown in Table 1.
From empirical analysis, the herding degrees of bull and bear stock markets are not equal, that is, . To quantize this asymmetry, a shifting is introduced such that with . From this definition, is derived to be
Here, the herding degrees of bull markets () and bear markets () are defined as the average with weight , that is,
Then, shifting to the time series , which equalizes the herding degree, in bull markets () and bear markets () is computed in a similar manner. Table 1 shows the values of and for different indices.
2.2.3 Simulation results
With α and determined for each index, the model produces the time series of returns . To describe how past returns affect future volatilities, the return-volatility correlation function is defined as
with
[
61]. Here,
represents the average over time
. As displayed in Fig. 1,
calculated with the empirical data of the S&P 500 Index shows negative values up to at least 15 days, and this is the well-known leverage effect [
1,
6,
61]. On the other hand,
for the Shanghai Index remains positive for about 10 days. This is the so-called anti-leverage effect [
6,
55]. The return-volatility correlation function produced in the model is in agreement with that calculated from empirical data on amplitude and duration for both the S&P 500 and Shanghai indices. This is the first time that the leverage and anti-leverage effects are simulated with a microscopic model. As displayed in Fig. 2,
for the simulations is also in agreement with that for the Nikkei, FTSE 100, HKSE, and DAX indices.
As shown in Fig. 4 and Fig. 5 of Ref. [
21], the model also produces volatility clustering and fat-tail distribution of returns [
21]. The Hurst exponent of
is calculated to be 0.79, which also indicates the long-range correlation of volatilities [
62]. The auto-correlation function of returns fluctuates around zero. The power-law exponent of the simulated returns is estimated to be 2.96, close to the so-called inverse cubic law [
63-
66].
2.3 Agent-based model with asymmetric trading preference
The problem of whether and how volatilities affect the price movement draws much attention. However, the usual volatility-return correlation function, which is local in time, typically fluctuates around zero. Recently, a dynamic observable nonlocal in time was constructed to explore the volatility-return correlation [
9]. Strikingly, the correlation is found to be non-zero with an amplitude of a few percent and duration of over two weeks. This result provides compelling evidence that past volatilities nonlocal in time affect future returns. Alternatively, this phenomenon could be also understood as the non-stationary dynamic effect of complex financial systems.
To study the microscopic origin of the nonlocal volatility-return correlation, an agent-based model is constructed [
9], in which a novel mechanism, that is, the asymmetric trading preference in volatile and stable markets, is introduced.
In financial markets, the market behaviors of buying and selling are not always in balance [
67]. Hence,
and
are not always equal to each other. They are affected by previous volatilities, and the more volatile the market is, the more
differs from
.
For an agent with an i-days investment horizon, the average volatility over previous i days is taken into account, which is defined as
The background volatility is considered to be , with M being the maximum investment horizon. On day t, the agent with an i-days investment horizon estimates the volatility of the market by comparing with . Therefore, the integrated perspective of all agents on the recent market volatility is defined as
Thus, the probabilities of buying and selling are assumed to be
Here, the parameter
c measures the degree of agents’ asymmetric trading preference in volatile and stable markets. Compared with the model reviewed in Section 2.2,
c is the only additional parameter. In principle,
c could be determined from the trade and quote data of stock markets. Unfortunately, the data are currently not available to us. Thus, the question of how to determine
c from historical market data remains unanswered. Nevertheless, with this model, it is possible to simulate the non-zero volatility-return correlation nonlocal in time [
9].
2.4 Agent-based model with multi-level herding
The spatial structure of stock markets is explored through the cross-correlations of individual stocks. With the random matrix theory (RMT), for example, communities can be identified, which are usually associated with business sectors in stock markets [
7,
15,
68-
72]. To simulate the sector structure with the agent-based model, we newly introduce the multi-level herding mechanism [
24].
2.4.1 Multi-level herding
In the model, there are N agents, n stocks, and sectors. Each sector contains stocks. Every agent holds only one stock, which is randomly chosen from the n stocks. The logarithmic price return of the k-th stock on day t is denoted by . We assume that the agents’ herding behavior comprises the herding at stock, sector, and market levels. The schematic diagram of the multi-level herding is displayed in Fig. 3(a).
(i) Herding at the stock level. The agents in each individual stock first cluster into groups, which are called I-groups. The herding degree DI quantifies the herding behavior at this level. On day t, the herding degree for the k-th stock is
In the k-th stock, the number of I-groups is , and the agents randomly join one of the I-groups. After the herding at the stock level, the number of I-groups in the j-th sector and the whole market are denoted, respectively, by and as follows:
Here, k∈j represents stock k in sector j.
(ii) Herding at the sector level. Stocks in the same sector share the characteristics of the sector. At this level, agents’ herding behavior is driven by the price co-movement of the sector; that is, the prices of stocks in a sector tend to rise and fall simultaneously. Thus, the I-groups in the same sector would further form larger groups, which are called S-groups. HM and Hj characterize the price co-movement degrees for stocks in the whole market and in sector j, respectively. For the j-th sector, the average number of I-groups in each S-group is set to be , which represents the pure price co-movement of the sector. Therefore, the herding degree is
In sector j, the number of S-groups is , and each I-group joins one of the S-groups.
(iii) Herding at the market level. Agents’ herding behavior at this level is driven by the price co-movement of the entire market. The S-groups in different sectors share common features of the whole market, and thus they cluster into larger groups. These groups are called M-groups. For the S-groups in sector j, the herding degree at market level is
and the number of M-groups is . The total number of M-groups in the market is the maximum of for different j. With all M-groups numbered, an S-group in sector j joins one of the first M-groups.
In the formation of S-groups, the I-groups in the same stock tend not to join the same S-group, otherwise these I-groups would have gathered together during the herding at the stock level. Similarly, in the formation of M-groups, the S-groups in the same sector tend not to join the same M-group.
After the herding for the three levels, all agents cluster into
M-groups. The agents in the same
M-group make the same trading decision
with the same probability. Similar to the previous models [
20,
21], the buying and selling probabilities are equal, that is,
, thus
. Here,
P is the buying or selling probability of an
M-group, which can be calculated from the daily trading probability
p for each agent and the average number of agents in an
M-group [
24]. The return of the
k-th stock is defined as
Here,
i∈
k represents agent
i in stock
k.
2.4.2 Determination of HM and Hj
On each day t, according to the sign of , the stocks are grouped into two market trends, that is, rising and falling. The amplitudes of the rising and falling trends on day t are defined as and , respectively, as follows:
Here, ns is the number of stocks in a sector, and in the calculation of HM. The amplitude of the dominating trend and the amplitude of the non-dominating trend are
Stocks grouped into the dominating trend are denoted as “dominating stocks”.
To characterize the price co-movement degrees for stocks in the whole market and in sector j, the co-movement degrees HM and Hj are computed as
Here, |market and |sector j represent the stocks in the whole market and in the j-th sector, respectively. represents the similarity in the signs of the returns for different stocks, and it is defined as the percentage of the dominating stocks; that is, . is the average total amplitude of the dominating stocks.
The co-movement degrees HM and Hj for the NYSE and HKSE indices are shown in Table 2.
2.4.3 Simulation results
Estimated from historical market data and investment reports, the buying or selling probability is
P=0.363 for the NYSE index and
P=0.317 for the HKSE index [
24]. With
HM and
Hj determined for the NYSE and HKSE indices, respectively, the model produces the time series
of each stock. The schematic diagram of the simulation procedure is displayed in Fig. 4(b).
To characterize the spatial structure, one may compute the equal-time cross-correlation matrix
[
71,
65], where
represents the average over time
t, and
measures the correlation between the returns of the
i-th and
j-th stocks. The distribution of the eigenvalues is displayed for the NYSE and HKSE indices in Fig. 4, and the bulk of the distribution and three largest eigenvalues from the simulation are in agreement with those from the empirical data.
The first, second, and third largest eigenvalues of C are denoted by λ0, λ1, and λ2, respectively. λ0 represents the market mode, that is, the price co-movement of the entire market, and the components of the corresponding eigenvector is rather uniform for all stocks. Other large eigenvalues stand for the sector modes, and the eigenvector of these eigenvalues is dominated by the stocks in a certain sector.
The empirical result of the NYSE index is displayed in Fig. 5(a). The eigenvectors of
λ1 and
λ2 are dominated by sector
and sector
, respectively, with the components significantly larger than those in other sectors. These features are reproduced in our simulation, and the results are shown in Fig. 5(b). For the HKSE index, the eigenvectors of
λ1 and
λ2 are respectively dominated by sector
and sector
, and these features are also obtained [
24]. From the simulated returns, we also observe volatility clustering.
3 Big data and agent-based modeling
Information is a leading factor in complex financial systems. In the past years, however, it has been difficult to quantify the effect of external information on financial systems due to lack of data. Our understanding of external information and its controlling effect in agent-based modeling is rather limited [
27-
30]. Fortunately, massive new data sources have resulted from human interactions with the internet in recent years. Therefore, we propose a novel paradigm by combining big-data analysis with agent-based modeling [
51].
3.1 Information driving forces
Internet query data cannot only reflect the arrival of news but also provide a proxy measurement of the information gathering process of traders before their trading decisions. We collect weekly Google search volumes and corresponding historical market data for 108 components of the S&P 500. In this section, we define an information driving force and analyze how it drives the complex financial system.
The states of external information, that is, Google search volume
for the
k-th stock, may be complicated [
35,
39]. As a first approach, we simplify the information states to two states as follows:
Here, is the mean value of . Traders are more influenced by the external information at and less at . The auto-correlation function of the time series is defined as
where
[
21]. For each stock, the auto-correlation functions of
,
, and
are computed and averaged over
k. As displayed in Fig. 6(a), the average auto-correlation functions of
and
exhibit a power-law-like behavior in a certain period of time. This is similar to that of
. On the other hand, all three curves start deviating from the power law at about
t=26 weeks, which could be considered as the correlating time
τ.
To study how external information influences the trading behavior of traders, we calculate the moving time averages of the trading volumes in different information states. Here, we adopt the correlating time τ of the Google search volumes as the length of the moving time window. Denoting the moving time averages of the trading volumes at and by and , respectively, one can simply compute
where represents the average over the time window . We then empirically define the information driving force for the k-th stock on time t as follows:
If
, that is,
, the traders trade more frequently at state
, and the external information does drive the market to be more active. The positive information driving forces reflect the information gathering process of the traders before their trading decisions. If
, that is,
, the traders trade less frequently at state
, and the market is not driven to be more active. The negative information driving forces may be related to ambiguous or uncertain information that does not play a key role in trading behavior. As displayed in Fig. 6(b), the probability distribution of
is obviously asymmetric with a heavier positive tail. This result indicates that external information usually drives the market to be more active, which is consistent with the previous empirical findings for internet query data or news [
32,
35].
To study the information driving forces in different market states, we compute the average information driving forces, and , for the bull and bear markets, respectively. Thus, their difference is defined as
where is the mean value of for all different t and i. The result is ; that is, the information driving forces in the bear market are stronger than those in the bull market. The asymmetric information driving forces in the bull and bear markets indicate that traders are more sensitive in the bear market.
3.2 Agent-based model driven by information driving forces
3.2.1 Model framework
As an application, we propose an agent-based model driven by the information driving force. We consider a stock market composed of N agents, in which there is only one stock, and each agent operates one share every day. On day t, after all the agents have made their trading decision according to Eq. (2), we can calculate the price return according to Eq. (4). We still assume , but the trading probability of the i-th agent, , evolves with time.
The information driving force of the i-th agent in this section is denoted by , which is distinguished from the empirically-defined information driving force of the k-th stock in Section 3.1. We assume that induces a dynamic fluctuation of the trading probability,
where
is the initial value of
, and
E is the identity matrix. In our model, we set
to ensure the time average of the trading probabilities for the
i-th agent
, where
[
20]. Here,
is the mean value of information driving forces
.
3.2.2 Information states
As stated in Section 3.1, there are two information states for the market, that is, and , and the information driving force plays an important role only at state . Here, we omit the subscript k of , as the difference between different stocks is not discussed in our model. The initial information state is randomly set to be or . Then, the information state will flip between and , with an average transition probability pt. On average, an information state will persist for . Then, we assume , where τ is the correlating time of the Google search volume for the S&P 500 components.
For simplicity, we only consider the positive information driving forces, since the negative ones are not dominant. In Section 3.1, the probability distribution of the empirically-defined information driving forces is fitted with the exponential function , with . We suppose that of different i obeys the same distribution. Therefore, the simplest form of should be
where the stochastic variable obeys the distribution , and is the state of the i-th agent. For each time t, we set the states for a dominating percentage of the agents to be and those for others to be .
To describe the asymmetric trading behavior of agents in the bull and bear markets, we complete the form of as
where a is the asymmetric coefficient, and is the weighted return defined in Eq. (4). We assume that the asymmetric coefficient . Here, is the difference between the empirically-defined information driving forces in the bull and bear markets, which is computed from Eq. (27) in Section 3.1.
The herding behavior can be explained by the information dispersion [
53,
73]. The agents behave similarly because they are exposed to the same information. Here, we assume that the agents with positive information driving forces
are divided into clusters. The average number of agents in each cluster
should be related to the information driving force, and we set
.
3.2.3 Simulation results
With the number of agents set to be , we perform the numerical simulation and obtain the return time series .
Our model reproduces the statistical features of real stock markets. For instance, the simulation is compared with the daily price returns of the S&P 500 components. To reduce the fluctuations, the calculations for the empirical data are averaged over all stocks. The probability distribution functions
of the absolute values of returns are displayed in Fig. 7(a), and empirical fat tails are observed. The volatility clustering is characterized by the auto-correlation function of volatilities [
3], which is defined in Eq. (26). As shown in the inset of figure Fig. 7(a),
from the simulation is in agreement with that from the empirical data.
To describe how past returns affect future volatilities, we compute the return-volatility correlation function defined in Eq. (12). As displayed in Fig. 7(b), from our simulation is consistent with that from empirical data.
4 Summary
We first review several agent-based models and new approaches to determine the key model parameters from historical market data. Based on the agents’ behaviors with heterogeneous personal preferences and interactions, these models are successful in explaining the microscopic origination of the temporal and spatial correlations of financial markets. More specifically, asymmetric trading and asymmetric herding are introduced to agent-based modeling to understand the leverage and anti-leverage effects. The asymmetric trading preference in volatile and stable markets is proposed to explain the nonlocal return-volatility correlation. Finally, an agent-based model with multi-level herding is constructed to simulate the sector structure.
We then present a novel paradigm combining big-data analysis with agent-based modeling. From internet query and stock market data, we extract the information driving forces and develop an agent-based model to simulate the dynamic behaviors of complex financial systems. The key parameters of the model are determined from the statistical properties of the information driving forces. Our results provide a better understanding of the controlling effect of the information driving forces on complex financial systems. The ideology of the information driving force may be applied to agent-based modeling of other open complex systems.
Higher Education Press and Springer-Verlag Berlin Heidelberg 2017