New approaches in agent-based modeling of complex financial systems
aa r X i v : . [ q -f i n . S T ] M a r New approaches in agent-based modeling of complex financialsystems
March 21, 2017
T. T. Chen , , B. Zheng , , ∗ , Y. Li , , X. F. Jiang , Department of Physics, Zhejiang University, Hangzhou 310027, P.R. China Collaborative Innovation Center of Advanced Microstructures, Nanjing 210093, P.R. China ∗ Corresponding authors. E-mail: ∗ [email protected] Abstract
Agent-based modeling is a powerful simulation technique to understand the collective behaviorand microscopic interaction in complex financial systems. Recently, the concept for determining thekey parameters of the agent-based models from empirical data instead of setting them artificially wassuggested. We first review several agent-based models and the new approaches to determine the keymodel parameters from historical market data. Based on the agents’ behaviors with heterogenouspersonal preferences and interactions, these models are successful to explain the microscopic origi-nation of the temporal and spatial correlations of the financial markets. We then present a novelparadigm combining the big-data analysis with the agent-based modeling. Specifically, from internetquery and stock market data, we extract the information driving forces, and develop an agent-basedmodel to simulate the dynamic behaviors of the complex financial systems.
Complex financial systems typically have many-body interactions. The interactions of multiple agentsinduce various collective phenomena, such as the abnormal distributions, temporal correlations, andsector structures [1, 2, 3, 4, 5, 6, 7, 8, 9]. The complex financial systems are also substantiallyinfluenced by the external information that may, for example, drive the systems to non-stationarystates, larger fluctuations or extreme events [10, 11, 12, 13, 14, 15, 16, 17].Complex financial systems are important examples of open complex systems. Standard financesupposes that investors have complete rationality, but the progress of behavioral finance and experi-mental fiance shows that investors in the real life have behavioral and emotional differences [18, 19].To be more specific, agents who are not fully rational may have different personal preferences andinteract with each other in financial markets [20, 21, 22, 23, 24, 25, 26, 9].Information is a leading factors in complex financial systems. However, our understanding ofexternal information and its controlling effect in the agent-based modeling is rather limited [27, 28,29, 30]. In recent years, exploring the scientific impact of online big-data has attracted much attentionof researchers from different fields. The massive new data sources resulting from human interactionswith the internet offer a better understanding for the profound influence of external information oncomplex financial systems [31, 32, 33, 34, 35, 36, 37, 38, 39]. gent-based modeling is a powerful simulation technique to understand the collective behaviorin complex financial systems [40, 41, 42, 43, 44, 45]. More recently, the concept for determining thekey parameters of the agent-based models from empirical data instead of setting them artificially wassuggested [20]. Similar concept has also been applied to the order-driven models, which were firstproposed by Mike and Farmer [46] and improved by Gu and Zhou [47, 48, 49, 50]. In this familyof order-driven models, the parameters of order submissions and order cancellations are determinedusing real order book data. For comparison, the agent-based models focus more on the behaviorsof agents [40, 41, 42, 43, 44, 45], while the order-driven models are mainly intended to explore thedynamics of the order flows [46, 47, 48, 49, 50]. In section 2, we review several agent-based models thatare based on the agents’ behaviors with heterogenous personal preferences and interactions. Thesemodels explore the microscopic origination of the temporal and spatial correlations of the financialmarkets [21, 24, 9]. In section 3, we present a novel paradigm combining the big-data analysis withthe agent-based modeling [51]. From the view of physicists, the dynamic behavior and community structure of complex financialsystems 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 spatialcorrelations [21, 24, 9]. These models are microscopic herding models, in which the agents arelinked with each other and trade in groups, and in particular, contain new approaches to multi-agentinteractions.
The stock price on day t is denoted as Y ( t ), and the logarithmic price return is R ( t ) = ln[ Y ( t ) /Y ( t − r ( t ) is introduced, r ( t ) = [ R ( t ) − h R ( t ) i ] /σ, (1)where h· · · i represents the average over time t , and σ = p h R ( t ) i − h R ( t ) i is the standard deviationof R ( t ). In stock markets, the information for investors is highly incomplete, therefore an agent’sdecision of buy , sell or hold is assumed to be random. In these models, there is only one stock andthere are N agents, and each operates one share every day. On day t , each agent i makes a tradingdecision φ i ( t ), φ i ( t ) = − buy , sell or hold decisions are denoted as P buy ( t ), P sell ( t ) and P hold ( t ),respectively. The price return R ( t ) is defined by the difference of the demand and supply of the stock, R ( t ) = N X i =1 φ i ( t ) . (3)For simplicity, the volatility is defined as the absolute return | R ( t ) | . Other definitions yield similarresults.The investment horizon is introduced since agents’ decision is based on the previous stock perfor-mance of different time horizons [21, 24, 9]. It has been found that the relative portion γ i of agentswith an i -days investment horizon follows a power-law decay, γ i ∝ i − η with η = 1 .
12 [20]. The aximum investment horizon is denoted as M . To describe the integrated investment basis of allagents, a weighted average return R ′ ( t ) is introduced, R ′ ( t ) = k · M X i =1 " γ i i − X j =0 R ( t − j ) , (4)where k is a proportional coefficient. According to Ref. [52], the investment horizons of investorsrange from a few days to several months. For M between 50 and 500, the results from simulationsremain robust.In complex financial systems, herding is one of the collective behaviors, which arises when investorsimitate the decision of others rather than follow their own belief and judgement. In other words, theinvestors cluster into groups when making decisions[53, 54]. Here a herding degree D ( t ) is introducedto quantify the clustering degree of the herding behavior, D ( t ) = n A ( t ) /N, (5)where n A ( t ) is the average number of agents in each cluster on day t . The negative and positive return-volatility correlations, i.e., the so-called leverage and anti-leverageeffects, are particularly important for the understanding of the price dynamics [1, 6, 55, 56]. Althoughvarious macroscopic models have been proposed to describe the return-volatility correlation, it isvery important to understand the correlations from the microscopic level. To study the microscopicorigination of the return-volatility correlation in financial markets, two novel microscopic mechanisms,i.e., investors’ asymmetric trading and herding in bull and bear markets, are recently introduced inthe agent-based modeling [21].
1. Two important behavior of investors(i) Asymmetric trading.
An investor’s willingness to trade is affected by the previous pricereturns, leading the trading probability to be distinct in bull and bear markets. The model thusassumes dynamic probabilities for buying and selling, but with P buy ( t ) = P sell ( t ). As the tradingprobability P trade ( t ) = P buy ( t ) + P sell ( t ), its average over time is set to be h P trade ( t ) i = 2 p . We adoptthe value of p estimated in Ref. [20], p = 0 . R ′ ( t ) >
0, and bearish if R ′ ( t ) <
0. The investors’ asymmetric trading in bull and bear marketsgives rise to the distinction between P trade ( t + 1) | R ′ ( t ) > and P trade ( t + 1) | R ′ ( t ) < . Thus, P trade ( t + 1)should take the form P trade ( t + 1) = 2 p · α R ′ ( t ) > P trade ( t + 1) = 2 p R ′ ( t ) = 0 P trade ( t + 1) = 2 p · β R ′ ( t ) < . (6)Here α and β are asymmetric factors, and h P trade ( t ) i = 2 p requires α + β = 2, i.e., α and β are notindependent. (ii) Asymmetric herding. Herding, as one of the collective behavior in financial markets,describes the fact that investors form cluster when making decisions, and these clusters can be large[53, 54]. Actually, 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 averagenumber of agents in each cluster n A ( t + 1) = | R ′ ( t ) | . Hence the herding degree on day t + 1 is D ( t + 1) = | R ′ ( t ) | /N. (7) his herding degree is symmetric for R ′ ( t ) > R ′ ( t ) <
0. However, investors’ herding behaviorin bull and bear markets are asymmetric. Thus D ( t + 1) should be redefined to be D ( t + 1) = | R ′ ( t ) − ∆ R | /N. (8)Here ∆ R is the degree of asymmetry. Everyday, the agents in a cluster make a same trading decision,i.e., buy , sell or hold with a same probability P buy , P sell or P hold .
2. Determination of α and ∆ R Six representative stock-market indices are collected, i.e., the 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 ofthe average trading volumes for the bull markets and the bear ones is V + /V − = P trade ( t + 1) | R ′ ( t ) > P trade ( t + 1) | R ′ ( t ) < = α/β. (9)Together with the condition α + β = 2, α is determined from V + /V − for the six representative stockmarket indices, as shown in Table 1.From empirical analysis, the herding degrees of bull and bear stock-markets are not equal, i.e., d bull = d bear . To quantize this asymmetry, a shifting ∆ r is introduced such that d bull [ r ′ ( t )] = d bear [ r ′ ( t )] with r ′ ( t ) = r ( t ) + ∆ r . From this definition, ∆ r is derived to be∆ r = 12 [ d bear ( r ( t )) − d bull ( r ( t ))] . (10)Here the herding degrees of bull markets ( r ( t ) >
0) and bear markets ( r ( t ) <
0) are defined as theaverage | r ( t ) | with the weight V ( t ), i.e., (cid:26) d bull [ r ( t )] = P t,r ( t ) > V ( t ) · r ( t ) / P t,r ( t ) > V ( t ) d bear [ r ( t )] = P t,r ( t ) < V ( t ) · | r ( t ) | / P t,r ( t ) < V ( t ) . (11)Then the shifting to the time series R ( t ), which equalize the herding degree D ( t +1) = | R ′ ( t ) − ∆ R | /N in bull markets ( R ′ ( t ) >
0) and bear markets ( R ′ ( t ) <
0) is similarly computed. Table 1 shows thevalues of ∆ r and ∆ R for different indices.
3. Simulation results
With α and ∆ R determined for each index, the model produces the time series of returns R ( t ).To describe how past returns affect future volatilities, the return-volatility correlation function L ( t )is defined, L ( t ) = h r ( t ′ ) · | r ( t ′ + t ) | i /Z, (12)with Z = h| r ( t ′ ) | i [61]. Here h· · · i represents the average over time t ′ . As displayed in Fig. 1, L ( t )calculated with the empirical data of the S&P 500 Index shows negative values up to at least 15 Table 1:
The values of α , ∆ r and ∆ R for the six indices. ∆ R is computed from the linear relationbetween ∆ r and ∆ R for all these indices. Index α ∆ r ∆ R S&P 500 1 . ± .
01 0 . ± .
007 3Shanghai 1 . ± . − . ± . − . ± .
01 0 . ± .
005 2FTSE 100 0 . ± .
01 0 . ± .
003 2Hangseng 1 . ± .
02 0 . ± .
003 2DAX 0 . ± .
02 0 . ± .
002 1 ays, and this is the well-known leverage effect [61, 1, 6]. On the other hand, L ( t ) for the ShanghaiIndex remains positive for about 10 days. That is the so-called anti-leverage effect [6, 55]. Thereturn-volatility correlation function produced in the model is in agreement with that calculatedfrom empirical data on amplitude and duration for both the S&P 500 and Shanghai indices. This isthe first result that the leverage and anti-leverage effects are simulated with a microscopic model. Asdisplayed in Fig. 2, L ( t ) for the simulations is also in agreement with that for the the Nikkei, FTSE100, HKSE and DAX indices. Figure 1: The return-volatility correlation functions for the S&P 500 and Shanghai indices, and for thecorresponding simulations. The S&P 500 and Shanghai indices are simulated with ( α, ∆ R ) = (1 . ,
3) and( α, ∆ R ) = (1 . , − L ( t ) = c · exp ( − t/τ ). As shown in Fig. 4 and Fig. 5 of Ref. [21], the model also produces the volatility clustering andthe fat-tail distribution of returns [21]. The hurst exponent of A ( t ) is calculated to be 0 .
79, whichalso indicates the long-range correlation of volatilities [62]. The auto-correlation function of returnsfluctuates around zero. The power-law exponent of the simulated returns is estimated to be 2 . The problem 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-returncorrelation [9]. Strikingly, the correlation is found to be non-zero, with an amplitude of a few percentand a duration of over two weeks. This result provides compelling evidence that past volatilitiesnonlocal in time affect future returns. Alternatively, this phenomenon could be also understood asthe non-stationary dynamic effect of the complex financial systems.To study the microscopic origin of the nonlocal volatility-return correlation, an agent-based modelis constructed [9], in which a novel mechanism, i.e., the asymmetric trading preference in volatile andstable markets, is introduced.In financial markets, the market behavior of buying and selling are not always in balance [67].Hence, P buy and P sell are not always equal to each other. They are affected by previous volatilities,and the more volatile the market is, the more P buy differs from P sell . α, ∆ R ) = (1 . , . , . ,
2) and (1 . , L ( t ) = c · exp ( − t/τ ). For an agent with an i -days investment horizon, the average volatility over previous i days is takeninto account, which is defined as v i ( t ) = 1 i i X j =1 v ( t − j + 1) . (13)The background volatility is considered to be v M ( t ) with M being the maximum investment horizon.On day t , the agent with an i -days investment horizon estimates the volatility of the market bycomparing v i ( t ) with v M ( t ). Therefore, the integrated perspective of all agents on the recent marketvolatility is defined as ξ ( t ) = 1 v M ( t ) M X i =1 γ i v i ( t ) . (14)Thus, the probabilities of buying and selling are assumed to be (cid:26) P buy ( t + 1) = p [ c · ξ ( t ) + (1 − c )] P sell ( t + 1) = 2 p − P buy ( t + 1) . (15)Here the parameter c measures the degree of agents’ asymmetric trading preference in volatile andstable markets. Compared with the model reviewed in Sec. 2.2, c is the only additional parameter. Inprinciple, c could be determined from the trade and quote data of stock markets. Unfortunately, thedata are currently not available to us. Thus the question how to determine c from the historical marketdata remains open. Anyway, with this model, it is possible to simulate the non-zero volatility-returncorrelation nonlocal in time [9]. .4 Agent-based model with multi-level herding The spatial structure of the stock markets is explored through the cross-correlations of individualstocks. With the random matrix theory (RMT), for examples, communities can be identified, whichare usually associated with business sectors in stock markets [68, 69, 70, 71, 72, 15, 7]. To simulate thesector structure with the agent-based model, we newly introduce the multi-level herding mechanism[24].
1. Multi-level herding.
In the model, there are N agents, n stocks and n sec sectors. Eachsector contains n/n sec 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 R k ( t ). We assume thatthe agents’ herding behavior comprises the herding at stock, sector and market levels. The schematicdiagram of the multi-level herding is displayed in Fig. 3(a). Market
M-groupsM-herdingS-groupsS-herdingI-groupsI-herdingAgents
Stock1 Stock2 Stock n -1 Stock n Sector 1 Sector n sec Previous R i ( t ) R i ’ ( t ) Multi-levelHerding
M-groupsbuy, sell or hold R i ( t +1) a b Figure 3: The schematic diagram of (a) the multi-level herding; (b) the procedure of simulation. (i) Herding at stock level. The agents in each individual stock first cluster into groups, which arecalled I-groups. The herding degree D I quantifies the herding behavior at this level. On day t , theherding degree for the k -th stock is D Ik ( t ) = | R ′ k ( t − | /N k . (16)In the k -th stock, the number of I-groups is 1 /D Ik ( t ), and the agents randomly join in one of theI-groups. After the herding at stock level, the number of I-groups in the j -th sector and in the wholemarket are, respectively, denoted by N Ij ( t ) and N IM ( t ), N Ij ( t ) = P k ∈ j [1 /D Ik ( t )] N IM ( t ) = P k [1 /D Ik ( t )] . (17)Here k ∈ j represents the stock k in sector j .(ii) Herding at sector level. The stocks in a same sector share the characteristics of the sector.At this level, agents’ herding behavior is driven by the price co-movement of the sector, i.e., theprices of stocks in a sector tend to rise and fall simultaneously. Thus the I-groups in a same sectorwould further form larger groups, which are called S-groups. H M and H j 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 n · ( H j − H M ), which represents the pureprice co-movement of the sector. Therefore the herding degree is D Sj ( t ) = n · ( H j − H M ) /N Ij ( t ) . (18) n sector j , the number of S-groups is 1 /D Sj ( t ), and each I-group joins in one of the S-groups.(iii) Herding at 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 wholemarket, and thus cluster into larger groups. These groups are called M-groups. For the S-groups insector j , the herding degree at market level is D Mj ( t ) = n · H M /N Mj ( t ) , (19)and the number of M-groups is 1 /D Mj ( t ). The total number of M-groups in the market is themaximum of 1 /D Mj ( t ) for different j . With all M-groups numbered, an S-group in sector j joins inone of the first 1 /D Mj ( t ) M-groups.In the formation of S-groups, the I-groups in a same stock tend not to join in a same S-group,otherwise these I-groups would have gathered together during the herding at stock level. Similarly,in the formation of M-groups, the S-groups in a same sector tend not to join in a same M-group.After the herding for the three levels, all agents cluster into M-groups. The agents in a same M-group make a same trading decision φ i ( t ) with a same probability. The same as the previous models[20, 21], the buying and selling probabilities are equal, i.e., P buy = P sell = P , thus P hold = 1 − P .Here P is the buying or selling probability of an M-group, which can be calculated from the dailytrading probability p for each agent and the average number of agents in an M-group [24]. The returnof the k -th stock is defined as R k ( t ) = P i ∈ k φ i ( t ) . Here i ∈ k represents the agent i in stock k .
2. Determination of H M and H j . On each day t , according to the sign of r k ( t ), the stocks aregrouped into two market trends, i.e., the rising and falling. The amplitudes of the rising and fallingtrends on day t are defined as v + ( t ) and v − ( t ), respectively, (cid:26) v + ( t ) = P i,r i ( t ) > r i ( t ) /n s v − ( t ) = P i,r i ( t ) < r i ( t ) /n s (20)Here n s is the number of stocks in a sector, and n s = n in the calculation of H M . The amplitude v d ( t ) of the dominating trend and the amplitude v n ( t ) of the non-dominating one are (cid:26) v d ( t ) = max { v + ( t ) , v − ( t ) } v n ( t ) = min { v + ( t ) , v − ( t ) } (21)The stocks grouped into the dominating trend are denoted as the “dominating stocks”.To characterize the price co-movement degrees for stocks in the whole market and in sector j , theco-movement degree H M and H j are computed, ( H M = h ζ ( t ) i · (cid:10) v d ( t ) − v n ( t ) (cid:11)(cid:12)(cid:12) market H j = h ζ ( t ) i · (cid:10) v d ( t ) − v n ( t ) (cid:11)(cid:12)(cid:12) sector j . (22)where | market and | sector j represent the stocks in the whole market and in the j -th sector, respectively. ζ ( t ) represents the similarity in the signs of the returns for different stocks, and it is defined asthe percentage of the dominating stocks, i.e., ζ ( t ) = n d ( t ) /n s . (cid:10) v d ( t ) − v n ( t ) (cid:11) is the average totalamplitude of the “dominating stocks”.The co-movement degree H M and H j for the NYSE and HKSE are shown in Table 2. Table 2: The values of parameters H M and H j for the NYSE and HKSE. H M H H H H H NYSE 0.363 0.491 0.414 0.438 0.431 0.546HKSE 0.306 0.426 0.406 0.364 0.361 0.340 . Simulation results. Estimated from the historical market data and investment reports, thebuying or selling probability is P = 0 .
363 for the NYSE and P = 0 .
317 for the HKSE [24]. With H M and H j determined for the NYSE and HKSE respectively, the model produces the time series R k ( t )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 C ij = h r i ( t ) r j ( t ) i [71, 65], where h· · · i represents the average over time t , and C ij measures thecorrelation between the returns of the i -th and j -th stocks. The distribution of the eigenvalues isdisplayed for the NYSE and HKSE in Fig. 4, and the bulk of the distribution and the three largesteigenvalues from the simulation are in agreement with those from the empirical data. NYSE gSimulation
Eigenvalue
P( ) HKSE gSimulation
P( )
P( )
Figure 4: The probability distribution of the eigenvalues of the cross-correlation matrix C for the NYSEand HKSE, and for the corresponding simulations. The inset shows the three largest eigenvalue for theNYSE and HKSE, and for the corresponding simulations. The first, second and third largest eigenvalues of C are denoted by λ , λ and λ , respectively. λ represents the market mode, i.e., the price co-movement of the entire market, and the components ofthe corresponding eigenvector is rather uniform for all stocks. Other large eigenvalues stand for thesector modes, and the eigenvector of these eigenvalues is dominated by the stocks in a certain sector.The empirical result of the NYSE is displayed in Fig. 5(a). The eigenvectors of λ and λ aredominated by sector (5) and sector (1) respectively, with the components significantly larger thanthose in other sectors. These features are reproduced in our simulation, and the results are shown inFig. 5(b). For the HKSE, the eigenvectors of λ and λ are respectively dominated by sector (1) andsector (2), and these features are also obtained [24]. From the simulated returns, we also observe thevolatility clustering. Information is one of the leading factors in complex financial systems. In the past years, however,it is difficult to quantify the effect of the external information on the financial systems, due to thelack of data. Our understanding of the external information and its controlling effect in the agent-based modeling is rather limited [27, 28, 29, 30]. Fortunately, massive new data sources are resulted | u i ( λ ) | (cid:0)(cid:0) .1 (cid:0) .2 | u i ( λ ) | (cid:0) (cid:0) (cid:0) (cid:0) (cid:0) (cid:0) Stock (i) (cid:0)(cid:0) .1 (cid:0) .2 | u i ( λ ) | (1) (2) (3) (4) (5) NYSE (cid:0)(cid:0) .1 (cid:0) .2 | u i ( λ ) | (cid:0)(cid:0) .1 (cid:0) .2 | u i ( λ ) | (cid:0) (cid:0) (cid:0) (cid:0) (cid:0) (cid:0) Stock (i) (cid:0)(cid:0) .1 (cid:0) .2 | u i ( λ ) | (1) (2) (3) (4) (5) Simulation a b
Figure 5: The absolute values of the eigenvector components u i ( λ ) corresponding to the three largesteigenvalues for the cross-correlation matrix C calculated from (a) the empirical data in the NYSE; (b) thesimulated returns for the NYSE. Stocks are arranged according to business sectors separated by dashedlines. (1): Basic Materials; (2): Consumer Goods; (3): Industrial Goods; (4): Services; (5): Utility. from human interactions with the internet in recent years. Therefore, we propose a novel paradigmcombining the big-data analysis with the agent-based modeling [51]. The internet query data can not only reflect the arrival of news, but also provide a proxy measurementof the information gathering process of the traders before their trading decisions. We collect theweekly Google search volumes, and the corresponding historical market data for 108 components ofthe S&P 500. In this section, we define an information driving force and analyze how it drives thecomplex financial system.The states of the external information, i.e., the Google search volume G k ( t ) for the k -th stock,may be complicated [35, 39]. As a first approach, we simplify the information states to two states,i.e., S k ( t ) = (cid:26) G k ( t ) > ¯ G k G k ( t ) ≤ ¯ G k (23)Here ¯ G k is the mean value of G k ( t ). The traders are more influenced by the external information at S k ( t ) = 1, while less at S k ( t ) = 0. The auto-correlation function of a time series r ( t ′ ) is defined as A ( t ) = [ h| r ( t ′ ) || r ( t + t ′ ) |i − h| r ( t ′ |i ] /A , (24)where A = h| r ( t ′ ) | i − h| r ( t ′ ) |i [21]. For each stock, the auto-correlation functions of G k ( t ′ ), S k ( t ′ )and V k ( t ′ ) are computed and averaged over k . As displayed in Fig. 6(a), the average auto-correlationfunctions of G k ( t ′ ) and S k ( t ′ ) exhibit a power-law-like behavior in a certain period of time. This issimilar to that of V k ( t ′ ). On the other hand, all the three curves start deviating from the power lawat about t = 26 weeks, which could be considered as the correlating time τ .To study how the external information influences the trading behavior of the traders, we calculatethe moving time averages of the trading volumes in different information states. Here we adopt thecorrelating time τ of the Google search volumes as the length of the moving time window. Denotingthe moving time averages of the trading volumes at S k ( t ′ ) = 1 and S k ( t ′ ) = 0 by V k ( t ) and V k ( t )respectively, one can simply compute V k ( t ) = h V k ( t ′ ) i τ | S k ( t )=1 ,V k ( t ) = h V k ( t ′ ) i τ | S k ( t )=0 , (25) t (week) t (week) A(t)
A(t) F -4 -3 -2 -1 P (F) ~ ~ (a) (b)
Figure 6: (a) The average auto-correlation functions of the Google search volumes, trading volumes andthe information states of the S&P 500 components. A power-law fit is given by the dashed line. Asshown in the inset, the curve is fitted with an exponential law A ( t ) = c exp( − t/τ ) with τ = 26. (b) Theprobability distribution of the information driving forces for the S&P 500 components. An exponentialfit P ( ˜ F k ) = a exp( − b ˜ F k ) with b = 3 . F k ( t ) > F k ( t ) <
0, i.e., P ( ˜ F k ) = a exp( b ˜ F k ) with b = 10 . where h· · ·i τ represents the average over the time window t ′ ∈ ( t, t + τ ). We then empirically definethe information driving force for the k -th stock on time t ˜ F k ( t ) = V k ( t ) /V k ( t ) − . (26)If ˜ F k ( t ) >
0, i.e., V k ( t ) > V k ( t ), the traders trade more frequently at the state S k ( t ) = 1, and theexternal information does drive the market to be more active. The positive information driving forcesreflect the information gathering process of the traders before their trading decisions. If ˜ F k ( t ) < V k ( t ) < V k ( t ), the traders trade less frequently at the state S k ( t ) = 1, and the market is notdriven to be more active. The negative information driving forces may be related to the ambiguousor uncertain information which does not play a key role in the trading behavior. As displayed inFig. 6(b), the probability distribution of ˜ F k ( t ) is obviously asymmetric with a heavier positive tail.This result indicates that the external information usually drives the market to be more active, whichis consistent with the previous empirical findings for the internet query data or news [35, 32].To study the information driving forces in different market states, we compute the average infor-mation driving forces ˜ F bear and ˜ F bull for the bull and bear markets respectively. Thus their differenceis defined as ∆ ˜ F = ( ˜ F bear − ˜ F bull ) / h ˜ F i , (27)where h ˜ F i is the mean value of ˜ F k ( t ) for all different t and i . The result is ∆ ˜ F = 0 .
4, i.e., the infor-mation driving forces in the bear market are stronger than that in the bull market. The asymmetricinformation driving forces in the bull market and bear market indicate that traders are more sensitivein the bear market.
1. Model framework.
As an application, we propose an agent-based model driven by the informa-tion driving force. We consider a stock market composed of N agents, in which there is only one stock, nd each agent operates one share every day. On day t , after all the agents have made their tradingdecision φ i ( t ) according to Eq. ( ?? ), we can calculate the price return according to Eq. (4). We stillassume P buyi ( t ) = P selli ( t ), but the trading probability of the i -th agent P i ( t ) = P buyi ( t ) + P selli ( t )evolves with time.The information driving force of the i -th agent in this section is denoted by F i ( t ), which isdistinguished from the empirically-defined information driving force ˜ F k ( t ) of the k -th stock in section3.1. We assume that F i ( t ) induces a dynamic fluctuation of the trading probability, P i ( t ) = E (1 + F i ( t )) P (0) , (28)where P (0) is the initial value of P ( t ), and E is the identity matrix. In our model, we set P (0) =2 p/ (1 + ¯ F ) to ensure the time average of the trading probabilities for i -th agent h P i ( t ) i = 2 p , where p = 0 . F is the mean value of information driving forces F i ( t ).
2. Information states.
As stated in section 3.1, there are two information states for the market,i.e., S ( t ) = 1 and S ( t ) = 0, and the information driving force plays an important role only at thestate S ( t ) = 1. Here we omit the subscript k of S k ( t ), for the difference between different stocks is notdiscussed in our model. The initial information state is randomly set to be S ( t ) = 1 or S ( t ) = 0. Thenthe information state will flip between S ( t ) = 1 and S ( t ) = 0 with an average transition probability p t . On average, an information state will persist for 1 /p t . Then we assume p t = 1 /τ , where τ is thecorrelating 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 onesare not dominating. In section 3.1, the probability distribution of the empirically-defined informationdriving forces are fitted with the exponential function P rob ( ˜ F ) ∼ exp( − b ˜ F ) with b = 3 .
5. Wesuppose that F i ( t ) of different i obeys the same distribution. Therefore, the simplest form of F i ( t )should be F i ( t ) = s i ( t ) y ( t ) , (29)where the stochastic variable y ( t ) obeys the distribution P rob ( y ), and s i ( t ) is the state of the i -thagent. Each time t , we set the states for a dominating percentage of the agents to be s i ( t ) = S ( t ),and the states for the others to be s i ( t ) = 1 − S ( t ).To describe the asymmetric trading behavior of agents in the bull and bear markets, we completethe form of F i ( t ), F i ( t ) = s i ( t ) y ( t )[1 + a · sgn ( R ′ ( t ))] , (30)where a is the asymmetric coefficient, and R ′ ( t ) is the weighted return defined in Eq. (4). We assumethat the asymmetric coefficient a = ∆ ˜ F /
2. Here ∆ ˜ F is the difference of the empirically-definedinformation driving forces in the bull and bear markets, which is computed from Eq. (27) in section3.1.The herding behavior can be explained by the information dispersion [53, 73]. The agents behavesimilarly because they are exposed to the same information. Here we assume that the agents with pos-itive information driving forces F i ( t ) are divided into clusters. The average number of agents in eachcluster n ( t ) should be related to the information driving force, and we set n ( t ) = p − t Σ Ni =1 F i ( t ) /N .
3. Simulation results.
With the number of agents set to be N = 10 , we perform the numericalsimulation and obtain the return time series R ( t ).Our model reproduces the statistical features of the real stock markets. For instance, the simula-tion 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 func-tions P ( | r ( t ) | ) of the absolute values of returns are displayed in Fig. 7(a), and the empirical fat tailsare observed. The volatility clustering is characterized by the auto-correlation function of volatilities[3], which is defined in Eq. (24). As shown in the inset of figure Fig. 7(a), A ( t ) from the simulationis in agreement with that from the empirical data. .1 1 10 |r| -3 -2 -1 SimulationEmpirical data -4 -2 A(t) SimulationEmpirical
P(|r|)
20 40 60 t (day) -0.3-0.2-0.100.1
L(t)
SimulationEmpirical data
Figure 7: Comparison of the S&P 500 components and the simulations: (a) The probability distributionfunctions of the absolute values of returns. The auto-correlation functions of volatilities are displayed inthe inset. (b) The return-volatility correlation functions.
To describe how past returns affect future volatilities, we compute the return-volatility correlationfunction L ( t ) defined in Eq. (12). As displayed in Fig. 7(b), L ( t ) from our simulation is consistentwith that from empirical data. We first review several agent-based models and the new approaches to determine the key modelparameters from historical market data. Based on the agents’ behaviors with heterogenous personalpreferences and interactions, these models are successful to explain the microscopic origination of thetemporal and spatial correlations of the financial markets. More specifically, the asymmetric tradingand asymmetric herding are introduced to the agent-based modeling to understand the leverage andanti-leverage effects. The asymmetric trading preference in volatile and stable markets is proposed toexplain the non-local return-volatility correlation. Finally, an agent-based model with the multi-levelherding is constructed to simulate the sector structure.We then present a novel paradigm combining the big-data analysis with the agent-based modeling.From internet query and stock market data, we extract the information driving forces, and developan agent-based model to simulate the dynamic behaviors of the complex financial systems. The keyparameters of the model are determined from the statistical properties of the information drivingforces. Our results provide a better understanding of the controlling effect of the information drivingforce on the complex financial system. The ideology of the information driving force may be appliedto the agent-based modeling of other open complex systems.
Acknowledgements:
This work was supported in part by NNSF of China under Grant Nos.11375149 and 11505099.
References [1] F. Black. Studies of stock price volatility changes. Alexandria, 1976. Proceedings of the 1976Meetings of the American Statistical Association, Business and Economical Statistics Section,pp.177-181.[2] R.N. Mantegna and H.E. Stanley. Scaling behavior in the dynamics of an economic index.
Nature , 376:46, 1995.
3] P. Gopikrishnan, V. Plerou, L.A.N. Amaral, M. Meyer and H.E. Stanley. Scaling of the distri-bution of fluctuations of financial market indices.
Phys. Rev. E , 60:5305, 1999.[4] Y. Liu, P. Gopikrishnan, P. Cizeau, M. Meyer, C.K. Peng and H.E. Stanley. Statistical propertiesof the volatility of price fluctuation.
Phys. Rev. E , 60:1390, 1999.[5] X. Gabaix, P. Gopikrishnan, V. Plerou and H.E. Stanley. A theory of power-law distributionsin financial market fluctuations.
Nature , 423:267, 2003.[6] T. Qiu, B. Zheng, F. Ren and S. Trimper. Return-volatility correlation in financial dynamics.
Phys. Rev. E , 73:65103, 2006.[7] X.F. Jiang, T.T. Chen and B. Zheng. Structure of local interactions in complex financial dy-namics.
Sci. Rep. , 4:5321, 2014.[8] B. Zheng, X.F. Jiang and P.Y. Ni. A mini-review on econophysics: Comparative study of chineseand western financial markets.
Chin. Phys. B , 23:78903, 2014.[9] L. Tan, B. Zheng, J.J. Chen and X.F. Jiang. How volatilities nonlocal in time affect the pricedynamics in complex financial systems.
PloS One , 10:118399, 2015.[10] T. Preis, J.J. Schneider and H.E. Stanley. Switching processes in financial markets.
Proc. Natl.Acad. Sci. , 108:7674, 2011.[11] B. Podobnik, A. Valentinˇciˇc, D. Horvati´c and H.E. Stanley. Asymmetric l´evy flight in financialratios.
Proc. Nati. Acad. Sci. , 108:17883, 2011.[12] W. Li, F.Z. Wang, S. Havlin and H.E. Stanley. Financial factor influence on scaling and memoryof trading volume in stock market.
Phys. Rev. E , 84:46112, 2011.[13] M. Tumminello, F. Lillo, J. Piilo and R.N. Mantegna. Identification of clusters of investors fromtheir real trading activity in a financial market.
New J. Phys. , 14:13041, 2012.[14] M.C. M¨unnix, T. Shimada, R. Sch¨afer, F. Leyvraz, T.H. Seligman, T. Guhr and H.E. Stanley.Identifying states of a financial market.
Sci. Rep. , 2:644, 2012.[15] X.F. Jiang and B. Zheng. Anti-correlation and subsector structure in financial systems.
EPL ,97:48006, 2012.[16] X.F. Jiang, T.T. Chen and B. Zheng. Time-reversal asymmetry in financial systems.
PhysicaA , 392:5369, 2013.[17] Y. Yura, H. Takayasu, D. Sornette and M. Takayasu. Financial brownian particle in the layeredorder-book fluid and fluctuation-dissipation relations.
Phys. Rev. Lett. , 112:98703, 2014.[18] L. Koonce. Inefficient markets: An introduction to behavioral finance, by andrei schleifer.
Journalof Institutional & Theoretical Economics Jite , 158.2:369–374(6), 2002.[19] H. Jo and D.M. Kim. Recent development of behavioral finance.
International Journal ofBusiness Research , 8:2, 2008.[20] L. Feng, B. Li, B. Podobnik, T. Preis and H.E. Stanley. Linking agent-based models andstochastic models of financial markets.
Proc. Natl. Acad. Sci. , 109:8388, 2012.[21] J.J. Chen, B. Zheng and L. Tan. Agent-based model with asymmetric trading and herding forcomplex financial systems.
PloS One , 8:79531, 2013.[22] V. Gontis and A. Kononovicius. Consentaneous agent-based and stochastic model of the financialmarkets.
PloS One , 9:102201, 2014.[23] Y. Shapira, Y. Berman and E.B. Jacob. Modelling the short term herding behaviour of stockmarkets.
New J. Phys. , 16:53040, 2014.[24] J.J. Chen, B. Zheng and L. Tan. Agent-based model with multi-level herding for complexfinancial systems.
Sci. Rep. , 5:8399, 2015.
25] T. Kaizoji, M. Leiss, A. Saichev and D. Sornette. Super-exponential endogenous bubbles inan equilibrium model of fundamentalist and chartist traders.
J. Econ. Behav. Organ. , 112:289,2015.[26] R. Savona1, M. Soumare and J.V. Andersen. Financial symmetry and moods in the market.
PloS One , 10:118224, 2015.[27] E. Samanidou, E. Zschischang, D. Stauffer and T. Lux. Agent-based models of financial markets.
Rep. Prog. Phys. , 70:409, 2007.[28] R.N. Mantegna and J. Kertsz. Focus on statistical physics modeling in economics and finance.
New J. Phys. , 13:25011, 2011.[29] A. Chakraborti, I.M. Toke, M. Patriarca and F. Abergel. Econophysics review: II. Agent-basedmodels.
Quant. Finance , 11:1013, 2011.[30] D. Sornette. Physics and financial economics (1776-2014): puzzles, ising and agent-based models.
Rep. Prog. Phys. , 77:62001, 2014.[31] T. Preis, H.S. Moat, H.E. Stanley and S.R. Bishop. Quantifying the advantage of looking forward.
Sci. Rep. , 2:350, 2012.[32] I. Bordino, S. Battiston, G. Caldarelli, M. Cristelli, A. Ukkonen and I. Weber. Web searchqueries can predict stock market volumes.
PloS One , 7:40014, 2012.[33] T. Preis, H.S. Moat and H.E. Stanley. Quantifying trading behavior in financial markets usinggoogle trends.
Sci. Rep. , 3:1684, 2013.[34] H.S. Moat, C. Curme, A. Avakian, D.Y. Kenett, H.E. Stanley and T. Preis. Quantifyingwikipedia usage patterns before stock market moves.
Sci. Rep. , 3:1801, 2013.[35] R. Hisano, D. Sornette, T. Mizuno, T. Ohnishi and T. Watanabe. High quality topic extractionfrom business news explains abnormal financial market volatility.
PloS One , 8:64846, 2013.[36] L. Kristoufek. Can google trends search queries contribute to risk diversification.
Sci. Rep. ,3:2713, 2013.[37] T. Noguchi, N. Stewart, C.Y. Olivola, H.S. Moat and T. Preis. Characterizing the time-perspective of nations with search engine query data.
PloS One , 9:95209, 2014.[38] C. Curme, T. Preis., H.E. Stanley and H.S. Moat. Quantifying the semantics of search behaviorbefore stock market moves.
Proc. Nati. Acad. Sci , 111:11600, 2014.[39] F. Lillo, S. Micciche, M. Tumminello, J. Piilo and R.N. Mantegna. How news affects the tradingbehaviour of different categories of the investors in a financial market.
Quant. Finance , 15:213,2015.[40] I. Giardina, J.P. Bouchaud and M. M´ezard. Microscopic models for long ranged volatility cor-relations.
Physica A , 299:28, 2001.[41] E. Bonabeau. Agent-based modeling: methods and techniques for simulating human systems.
Proc. Nati. Acad. Sci , 99:7280, 2002.[42] T. P. Evans and H. Kelley. Multi-scale analysis of a household level agent-based model oflandcover change.
J. Environ. Manage. , 72:57, 2004.[43] F. Ren, B. Zheng, T. Qiu and S. Trimper. Minority games with score-dependent and agent-dependent payoffs.
Phys. Rev. E , 74:041111, 2006.[44] J.D. Farmer and D. Foley. The economy needs agent-based modelling.
Nature , 460:685, 2009.[45] F. Schweitzer, G. Fagiolo, D. Sornette, F.V. Redondo, A. Vespignani and D.R. White. Economicnetworks: The new challenges.
Science , 325:422, 2009.
46] S. Mike and J.D. Farmer. An empirical behavioral model of liquidity and volatility.
Journal ofJ. Economic Dynamics Control , 32:200, 2008.[47] G.F. Gu and W.X. Zhou. On the probability distribution of stock returns in the mike-farmermodel.
European Physical Journal B , 67:585, 2009.[48] G.F. Gu and W.X. Zhou. Emergence of long memory in stock volatility from a modified mike-farmer model.
EPL , 48002:86, 2009.[49] H. Meng, F. Ren, G.F. Gu, X. Xiong, Y.J. Zhang, W.X. Zhou and W. Zhang. Effects of longmemory in the order submission process on the properties of recurrence intervals of large pricefluctuations.
EPL , 98:38003, 2012.[50] J. Zhou, G.F. Gu, Z.Q. Jiang, X. Xiong, W. Zhang and W.X. Zhou. Computational experi-ments successfully predict the emergence of autocorrelations in ultra-high-frequency stock re-turns.
Computational Economics , in press:http://dx.doi.org/10.1007/s10614–016–9612–1, 2016.[51] T. T. Chen, B. Zheng and Y. Li. Information driving forces and agent-based modelling. submittedfor publication .[52] L. Menkhoff. The use of technical analysis by fund managers: international evidence.
Journalof Banking & Finance , 34:2573, 2010.[53] V.M. Eguiluz and M.G. Zimmermann. Transmission of information and herd behavior: Anapplication to financial markets.
Phys. Rev. Lett. , 85:5659, 2000.[54] D.Y. Kenett, Y. Shapira, A. Madi, S.B. Zabary, G. Gershgoren and E.B. Jacob. Index cohesiveforce analysis reveals that the US market became prone to systemic collapses since 2002.
PLoSone , 6:19378, 2011.[55] J. Shen and B. Zheng. On return-volatility correlation in financial dynamics.
Europhys. Lett. ,88:28003, 2009.[56] B.J. Park. Asymmetric herding as a source of asymmetric return volatility.
Journal of Banking& Finance , 35:2657, 2011.[57] K.A. Kim and J.R. Nofsinger. Institutional herding, business groups, and economic regimes:evidence from Japan.
The Journal of Business , 78:213, 2005.[58] A. Walter and F.M. Weber. Herding in the German mutual fund industry.
European FinancialManagement , 12:375, 2006.[59] R. Cont and J.P. Bouchaud. Herd behavior and aggregate fluctuations in financial markets.
Macroeconomic Dyn. , 4:170, 2000.[60] N. Blasco, P. Corredor and S. Ferreruela. Does herding affect volatility? implications for thespanish stock market.
Quantitative Finance , 12:311, 2012.[61] J.P. Bouchaud, A. Matacz and M. Potters. Leverage effect in financial markets: The retardedvolatility model.
Phys. Rev. Lett. , 87:228701, 2001.[62] Y.H. Shao, G.F. Gu, Z.Q. Jiang, W.X. Zhou and D. Sornette. Comparing the performance offa, dfa and dma using different synthetic long-range correlated time series.
Scientific Reports ,2:5225, 2012.[63] P. Gopikrishnan, M. Meyer, L.A.N. Amaral and H.E. Stanley. Inverse cubic law for the distri-bution of stock price variations.
Eur. Phys. J. B , 3:139, 1998.[64] G.F. Gu, W. Chen and W.X. Zhou. Empirical distributions of chinese stock returns at differentmicroscopic timescales.
Physica A , 387:495, 2008.[65] V. Plerou, P. Gopikrishnan, L.A.N. Amaral, M. Meyer and H.E. Stanley. Scaling of the distri-bution of price fluctuations of individual companies.
Phys. Rev. E , 60:6519, 1999.
66] G.H. Mu and W.X. Zhou. Tests of nonuniversality of the stock return distributions in an emergingmarket.
Physical Review E , 82:66103, 2010.[67] V. Plerou, P. Gopikrishnan and H.E. Stanley. Two-phase behaviour of financial markets.
Nature ,421:130, 2003.[68] V. Plerou, P. Gopikrishnan, X. Gabaix and H.E. Stanley. Quantifying stock-price response todemand fluctuations.
Phys. Rev. , 66:27104, 2002.[69] A. Utsugi, K. Ino and M. Oshikawa. Random matrix theory analysis of cross correlations infinancial markets.
Phys. Rev. , 70:26110, 2004.[70] R.K. Pan and S. Sinha. Self-organization of price fluctuation distribution in evolving markets.
Europhys. Lett. , 77:58004, 2007.[71] J. Shen and B. Zheng. Cross-correlation in financial dynamics.
Europhys. Lett. , 86:48005, 2009.[72] B. Podobnik, D. Wang, D. Horvatic, I. Grosse and H.E. Stanley. Time-lag cross-correlations incollective phenomena.
EPL , 90:68001, 2010.[73] L. Corazzini and B. Greiner. Herding, social preferences and (non-)conformity.
EconomicsLetters , 97:74, 2007., 97:74, 2007.