## New Research In

### Physical Sciences

### Social Sciences

#### Featured Portals

#### Articles by Topic

### Biological Sciences

#### Featured Portals

#### Articles by Topic

- Agricultural Sciences
- Anthropology
- Applied Biological Sciences
- Biochemistry
- Biophysics and Computational Biology
- Cell Biology
- Developmental Biology
- Ecology
- Environmental Sciences
- Evolution
- Genetics
- Immunology and Inflammation
- Medical Sciences
- Microbiology
- Neuroscience
- Pharmacology
- Physiology
- Plant Biology
- Population Biology
- Psychological and Cognitive Sciences
- Sustainability Science
- Systems Biology

# Linking agent-based models and stochastic models of financial markets

Contributed by H. Eugene Stanley, March 29, 2012 (sent for review December 6, 2011)

## Abstract

It is well-known that financial asset returns exhibit fat-tailed distributions and long-term memory. These empirical features are the main objectives of modeling efforts using (i) stochastic processes to quantitatively reproduce these features and (ii) agent-based simulations to understand the underlying microscopic interactions. After reviewing selected empirical and theoretical evidence documenting the behavior of traders, we construct an agent-based model to quantitatively demonstrate that “fat” tails in return distributions arise when traders share similar technical trading strategies and decisions. Extending our behavioral model to a stochastic model, we derive and explain a set of quantitative scaling relations of long-term memory from the empirical behavior of individual market participants. Our analysis provides a behavioral interpretation of the long-term memory of absolute and squared price returns: They are directly linked to the way investors evaluate their investments by applying technical strategies at different investment horizons, and this quantitative relationship is in agreement with empirical findings. Our approach provides a possible behavioral explanation for stochastic models for financial systems in general and provides a method to parameterize such models from market data rather than from statistical fitting.

Modeling price returns has become a central topic in the study of financial markets due to its key role in financial theory and its practical utility. Following models by Engle and Bollerslev (1, 2), many stochastic models have been proposed based on statistical studies of financial data to accurately reproduce price dynamics. In contrast to this stochastic approach, economists and physicists using the tools of statistical mechanics have adopted a bottom-up approach to simulate the same macroscopic regularity of price changes, with a focus on the behavior of individual market participants (3⇓⇓⇓⇓⇓⇓–10). Although the second so-called agent-based approach has provided a qualitative understanding of price mechanisms, it has not yet achieved sufficient quantitative accuracy to be widely accepted by practitioners.

Here, we combine the agent-based approach with the stochastic process approach and propose a model based on the empirically proven behavior of individual market participants that quantitatively reproduces fat-tailed return distributions and long-term memory properties (11⇓⇓–14).

## Empirical and Theoretical Market Behaviors

We start by arguing that technical traders (usually agents seeking arbitrage opportunities and make their trading decisions based on price patterns) contribute much more to the dynamics of daily stock prices *S*_{t} (or log price *s*_{t} ≡ ln(*S*_{t})) than fundamentalists (who attempt to determine the fundamental values of stocks). Although fundamentalists hold a majority of the stocks, they trade infrequently (see *SI Appendix*, Fig. S6). In contrast, technical traders contribute most of the trading activities (15) by trading their minority holdings more frequently than fundamentalists. Market surveys (16⇓–18) also provide clear evidence of the prevalence of technical analysis. We consider here only technical traders, assuming that fundamentalists contribute only to market noise. Our study is of the empirical data recorded prior to 2006 and ignores the effect of high frequency trading (HFT) that has become significant only in the past 5 y. We propose a behavioral agent-based model that is in agreement with the following empirical evidence:

Random trading decisions made by agents on a daily basis.

*n*_{0}technical traders use different trading strategies, hence their decisions to buy, sell, or hold a position appear to be random. A trading decision is made daily because empirical studies report the lack of intraday trading persistence in empirical trading data (19). Market survey (16) also shows that fund managers put very little emphasis on intraday tradings. We estimate the probability*p*of having daily trade empirically from trading volumes.Price returns. The price return

*r*_{t}≡*s*_{t}-*s*_{t-1}is controlled by the imbalance*d*_{t}between the demand and the supply of stocks—the difference in the number of buy and sell trades each day. The excess in total demand or supply moves the price up or down, where the largest*r*_{t}occurs when all traders act in unison, when they all either buy or sell their stocks. We assume this relationship between price change*r*_{t}and*d*_{t}to be linear each day, as supported by empirical findings (20, 21).Centralized interaction mechanism of returns on technical strategies. For technical traders, an important input parameter in their strategies is past price movement (22, 23). Consequently, prices and orders reflect a main interaction mechanism between agents. In many agent-based models, the interaction strength between agents need to be adjusted with agent population size (5, 24, 25) or interaction structure (26) to sustain “fat” tails in return distributions. Here we propose a centralized interaction mechanism (price change) among agents so that the strength of interaction grows with agent population and is unaffected by interaction structure.

Opinion convergence due to price changes. This is the unique mechanism that distinguishes our model from other models. It specifies the collective behavior of technical traders. Duffy et al. (27) found that agents learn from each other and tend to adopt the strategy that gives the most payoff. Given the price patterns at any point in time, a few most profitable technical strategies dominate the market because every technical trader wants to maximize his/her profit by using the most profitable strategy copied from each other (The most profitable strategy would become less profitable when most agents adopt it, and a new profitable strategy emerges from the new price trends; soon agents will flock to the new profitable strategy until it is no longer profitable. This is similar to the regime switching phenomenon in various agent-based models.). On the other hand, the individual strategies used by different technical traders differ in their parameterizations of the buy/sell time, amount of risk tolerated, or portfolio composition (15). So when the input signal—the previous price change

*r*_{t-1}—is small, every agent acts independently. When the input signal is large, the agents act more in concert, irrespective of their differences in trading strategies. During the spreading panic of market crashes, for example, most agents sell their stocks (and market makers are likely to make losses in such circumstances). This supports the empirical finding that large price swings occur when the preponderance of trades have the same buy/sell decision indicated in the findings by Gabaix X. et al. (28).

## Behavioral Model and Results

Based on the items of evidence (i)–(iv) listed above we construct a three-step behavioral model:

Step 1. Based on evidence (i), we assume

*n*_{0}agents, each of equal size 1. Each day, a trading decision*ψ*_{i}(*t*) is made by each agent*i*,Step 2. Based on evidence (ii), we define price change

*r*_{t}to be proportional to the aggregate demand*d*_{t}, i.e., the difference in the number of agents willing to buy and sell, [1]Trading volume is equal to the total number of trades in this case because every agent has the same trading size of 1. Hence daily trading volume*N*_{t}is defined as [2]and*k*is the sensitivity of price change with respect to*d*_{t}. We set*k*to 1 because a choice for*k*does not affect the statistical properties. Note that, according to Step 1, maximum (minimum)*d*_{t}means that all agents are in collective mode when they behave the same, all of them either buy or sell stocks.Step 3. Based on evidence (iii) and (iv), at day

*t*+ 1 each agent’s opinion is randomly distributed into each of the*c*_{t+1}opinion groups where [3]in which all agents comprising the same opinion group execute the same action (buy, sell, or hold) with the same probability*p*as in Step 1. Because 1 ≤*c*_{t+1}≤*n*_{0}, Eq.**3**implies (a) when the previous return is maximum, |*r*_{t}|_{max}=*n*_{0}(everyone buys/sells), there is only one trading opinion among the agents; (b) when the previous return is minimum (see*SI Appendix*, Section 5), there are*n*_{0}opinions and every agent acts independently of one another. We use*ω*= 1 in most of our simulations because it produces results that are numerically close to empirical findings. The case of*ω*= 1 corresponds to |*r*_{t}|_{min}= 1, and there is only one more buy/sell order than sell/buy order. The result with different*ω*is presented in the end of this section. When market noise is considered, , where denotes the normal (Gaussian) distribution and quantifies market noise due to external news events.

To obtain an empirical value for daily trading probability *p*, we choose 309 companies from the Standard and Poor’s 500 index traded over the 10-y period 1997–2006. Only 309 of the 500 total stocks were consistently listed during the entire 10-y period, and they are the ones we choose. We define the trading velocity *V* of an agent as the total number of shares he/she trades in a year, divided by the number of shares, he/she owns on average over a year [4]

From the Compustat database, we divide the total number of shares traded on the market by the number of outstanding shares of each stock and obtain the average yearly trading velocity, *V*, for these stocks through the 10-y period. Thus we obtain, [5]where the value of *V* varies from 1.3 to 1.9 throughout the 10 y. Note that *V* > 1 means that, on average, each stock changes its owner more than once during a year. From the data documented by Yahoo! Finance, we assume that institutional owners are fundamentalists and that the rest of the traders are predominantly technical traders. The percentage of outstanding shares held by institutional owners is usually higher than 60%, and the average value is 83% (*SI Appendix*, Fig. S6*A*).

Assuming institutional owners are fundamentalists with investment (trading) horizons longer than 1 y (they trade less frequently than once a year), we calculate the value of *p* as follows. We let the average yearly trading velocity of fundamentalists be *V*_{f}, then the average yearly trading velocity of technical traders *V*_{c} is [6]Because there are about 250 trading days in a year, we calculate the daily trading probability *p* [7]

Because fundamentalists have an investment horizon longer than 1 y, *V*_{f} < 1 (see Eq. **4**). We arbitrarily set *V*_{f} to be 0.2, 0.4, 0.6, 0.8, and estimate the corresponding values of *p* as 0.0174, 0.0154, 0.0134, 0.0115, respectively. For (*V*_{f},*p*) = (0.4,0.0154), we find that approximately 80% of the trading volume is contributed by technical traders.

We compare the simulation results from our behavioral model (Steps 1, 2, and 3) with those obtained for the empirical set of stocks comprising the S&P 500 index. For the cumulative distribution (CDF) of both absolute returns and number of trades. Fig. 1 shows that the model reproduces the empirical data in both the central region and the tails. In particular, both model and empirical distributions have power-law tails (*P*(|*r*_{t}| > *x*) ∼ *x*^{-ξr},*P*(*n*_{t} > *x*) ∼ *x*^{-ξn}) (13, 29⇓–31) where the power-law exponents *ξ*_{r} and *ξ*_{n} that we obtain for the empirical data by applying the Hill’s estimator are in agreement with the ones obtained for empirical data (32).

It is worth noting that with different values of *ω* in Eq. **3**, the tail exponent *ξ*_{r} for the absolute return distribution varies as shown in Table 1. We find that *ω* = 1 gives the tail exponent *ξ*_{r} that is closest to empirical finding (see *SI Appendix*, Section 5 for the implication of different values in *ω*).

Overall, we are able to generate power-law distributions in both returns and number of trades in agreement with empirical data. The fact that we are able to capture the trends in the two highly correlated quantities (33) implies a very plausible mechanism underlying our model. Furthermore, the tail exponent *ξ*_{r} is invariant with respect to different values of agent population size *n*_{0} and fundamentalists’ investment horizon *V*_{f} (Table 2 and *SI Appendix*, Section 1). In particular, the insensitivity of the result to the number of agents *n*_{0} distinguishes this model to most other agent-based models (34, 35).

## Extension to Stochastic Model

Next we study the underlying stochastic process of our behavioral model (Step 1 to Step 3). The mechanism of opinion convergence under price changes is incorporated into a mathematical form for an analytical understanding. Step 3 in our behavioral model indicates that the daily price change is not deterministic, where its variance is related to total number of opinion groups *c*_{t}, which is determined directly by previous return *r*_{t-1}. On average, each opinion group has |*r*_{t-1}| agents, and we have [8]Because *σ*_{t} presents the standard deviation of price change *r*_{t}, we can model price change as *r*_{t} = *σ*_{t}*η*_{t}, where *η*_{t+1} is a random variable with zero mean and unit variance, and its distribution is determined by Step 3. For simplicity, we use a normal distribution for *η*_{t}, although we find that other distributions, such as *t*-distribution, give similar results in our analysis (*SI Appendix*, Section 4).

Again we note that the variance in Eq. **8** is not constant but is time dependent, and time-dependent variances are commonly found in a variety of empirical outputs where phenomena are ranging from finance to physiology (2, 36). They are widely modeled with the Autoregressive Conditional Heteroskedasticity (ARCH) process (1). Here we provide a possible explanation for the ARCH effect found in financial data in terms of the behavior of technical traders—larger previous price change *r*_{t-1} brings traders’ opinions closer to each other, resulting in large subsequent price fluctuations. Theoretical analysis on Eq. **8** leads to the fat-tailed return distributions (*SI Appendix*, Section 2) ubiquitously observed in real data, and in our case a power-law tail. Previous works have generated ARCH effect from other mechanisms that is different from our model (37).

The time-dependent variance of Eq. **8** defined by the most recent price change *r*_{t-1} is therefore based on short memory in the previous *r*_{t}. To this end, we further extend our behavioral model with two more items of empirical evidence:

Technical strategies are applied at different return intervals. In contrast to the simplistic realization in our behavioral model (Step 1 to Step 3) in which technical traders make their decisions only upon the most recent daily returns (see Eq.

**8**and Step 3), market survey (16) indicates that technical strategies in practice are applied at different investment horizons ranging from 1 d to more than 1 y. This finding implies that agents calibrate their technical strategies based on returns of different time horizons, i.e., how stock preformed during the last day, week, month, up to year, or even longer. Most technical strategies are focused on short-term returns of a few days, and fewer are focused at yearly returns according to the survey (16).Increasing trading activity in volatile market conditions. Agents tend to trade more after large price movements. Different technical strategies set different thresholds on prices to trigger trading decisions (38), so large price fluctuations are likely to trigger more trades. Hence the probability of daily trade

*p*is directly related to past returns. Because a large proportion of technical strategies is applied with short investment horizons, price changes from previous days have larger impact on*p*than price changes from past year.

The survey on US market (16) allows us to estimate the relative proportion of technical analysis applied at different investment horizons. Precisely, agents having investment horizon *i* days are affected by price change in the past *i* days, and the relative portion of such traders is characterized by *α*_{i}. Fig. 2 illustrates this plot, and we find that the curve follows a power-law decay with exponent *d* = 1.12, i.e., *α*_{i} ∝ *i*^{-d}. As different agents look at returns over time scales of differing lengths, their trading opinions are affected by the past returns of history longer than one day, so is the convergence of their collective opinions. Agents having investment horizon *i* days are affected by price difference in the past *i* days, and the relative portion of such traders are characterized by *α*_{i}. Hence the convergence of opinions is not only affected by the previous day’s return but also the price difference of longer durations. Therefore Eq. **3** is better written as [9]where *M* is the maximum investment horizon for which technical analysis is applied, and *α*_{i} is the proportion of agents focusing on investment horizon *i* and it decays with *i* as *α*_{i} ∝ *i*^{-d} as in Fig. 2. When *M* = 1, Eq. **9** is identical to Eq. **3**, which is the scenario for homogeneous investment horizon of 1 d. |*s*_{t} - *s*_{t-i}| is used as a simplified information content for technical traders with investment horizon *i*. Because there can be at least one opinion group, this boundary condition requires . From Eq. **9**, Eq. **8** is transformed into [10]where and .

Note that Eq. **10** can be also intuitively derived. Because by *α*_{i} we denote the proportion of agents observing the price change in the past *i* days, the price change |*s*_{t} - *s*_{t-i}| contributes to the overall opinion convergence with a weight *α*_{i}. Even without knowing the exact contribution of |*s*_{t} - *s*_{t-i}| in the overall opinion convergence, by taking its first order effect with weight *α*_{i}, we would have the functional form of Eq. **10**.

To take into account the effect of increasing trading activity when market is more volatile, we assume that traders place technical thresholds based on returns of different horizons, and that the proportion of traders with different horizons is determined by the same survey results reported in ref. (16). Similar to the construction of cluster formation in Eq. **9**, we define the time-dependent probability of trading as *p*_{t+1} ≈ *p*_{0} + *α*^{′}Σ_{t}. By *p*_{0} we denote the base trading activity (largely due to fundamentalists) and *α*^{′}Σ_{t} is the additional trade due to threshold crossing by technical traders. Therefore we transform Eq. **10** to The first term is very small compared to the second term because technical traders dominate trading activities. Hence, we can ignore the first constant term and focus on the second quadratic term. Therefore, the previous equation transforms to [11]Constant *A* is a scaling parameter defining the average size of returns, and *B* characterizes the relative portion of trades accomplished by technical traders (due to crossing the thresholds) vs. background trading activities (mostly by fundamentalists). Eq. **11** has similar functional form as *σ*_{t+1} in the fractional integrated processes (39). However, there are some differences in a way how past returns are used in *σ*_{t+1}—whereas in fractional integrated process *σ*_{t+1} depends on past daily returns, in Eq. **11** we use absolute values of past aggregate returns. Precisely, the absolute values of past daily, weekly, and monthly returns, to mention a few. Parke (40) has demonstrated how heterogeneous error durations among traders could result in fractional integration, and here we explicitly and quantitatively provide a behavioral interpretation of the long memory in absolute returns. The decaying dependence of standard deviation *σ*_{t+1} on past aggregate returns of different durations in Eq. **11** is a direct outcome of agents applying technical strategies at different investment horizons. We find this dependence to decay as a power law, and the power-law exponent *d* is calculated from empirical observations (16).

## Analytical and Simulated Results

In general, the long memory in returns can be demonstrated by analyzing auto-correlation functions (ACF). We find that the ACFs of both absolute and squared returns (*ρ*_{ℓ} and ) decay as power laws with *ℓ*, i.e., *ρ*_{ℓ}(|*r*_{t}|,|*r*_{t-ℓ}|) ∝ *ℓ*^{-γ1} and , where we obtain the scaling relations (*SI Appendix*, Section 2) similar to phase transitions in statistical mechanics, [12]

Whereas Ding et al. have shown that correlations in |*r*_{t}| decay more slowly than correlations in (41), we, instead, show quantitative scaling relations that have been derived and explained by the behavior of individual market participants (characterized by *d*). Empirical verification with the stock components of Dow Jones Indices in Fig. 3 confirms the validity of the scaling relation of Eq. **12**.

The behavioral understanding of our stochastic process Eq. **11** allows us to perform simulations in which every parameter is based on empirical calibration rather than on conventional statistical estimation. In Eq. **10** we replace the upper limit of *M* in the summation by 500 trading days, which corresponds to ≈2 years of investment horizon as implied by the survey (16). We set *d* = 1.2, in agreement with empirical finding (16). From the empirical trading volume fluctuations and unconditional variance of price changes, we estimate *A* = 0.002 and *B* = 0.05 (*SI Appendix*, Section 3). Therefore we obtain . In Fig. 4 we compare the simulation results with the results for S&P 500 index. We demonstrate that the ACF of absolute and squared returns—for both simulations and the S&P 500 index—fulfill our scaling relations of Eq. **12** with *γ*_{1,simulation} = 0.40, *γ*_{2,simulation} = 0.53; *γ*_{1,S&P500} = 0.44, and *γ*_{2,S&P500} = 0.7.

Eq. **11** reflects the long-term memory of empirical data accurately while still being a stationary process (*SI Appendix*, Section 3) in contrast to many other power-law decaying processes (2, 39). In addition, the behavioral picture of Eq. **11** explains the origin of long-term memory through heterogeneous investment horizons of different technical traders based on empirical evidence.

## Summary

Starting from the empirical behavior of agents, we construct an agent-based model that quantitatively explains the fat tails and long-term memory phenomena of financial time series without suffering from finite-size effects (35). The agent-based model and the derived stochastic model differ in construction but share the same mechanism of opinion convergence among technical traders. Whereas the agent-based model singles out the dominant market mechanism, the stochastic model allows a detailed analytical study. Both approaches allow their parameter values to be retrieved from market data with clear behavioral interpretations, thus allowing an in-depth study of this highly complex system of financial market.

The universality of various empirical features implies a dominant mechanism underlying market dynamics. Here we propose that this mechanism is driven by the use of technical analysis by market participants. In particular, past price fluctuations can directly induce convergence or divergence of agents’ trading decisions, which in turn give rise to the “ARCH effect” in empirical findings. Additionally, the heterogeneity in agents’ investment horizons gives rise to long-term memory in volatility.

## ACKNOWLEDGMENTS

We thank F. Pammolli, J. Cherian, and Y. Chen for discussions and suggestions. The work has been partially supported by the Grant R-144-000-285-646 from the National University of Singapore, the German Research Foundation through Grant PR 1305/1-1, the Ministry of Science of Croatia, the Keck Foundation Future Initiatives Program, Defense Threat Reduction Agency, and the National Science Foundation Grants PHY-0855453, CMMI-1125290, CHE-0911389, and CHE-0908218.

## Footnotes

- ↵
^{1}To whom correspondence may be addressed. E-mail: g0801896{at}nus.edu.sg, phylibw{at}nus.edu.sg, or hes{at}bu.edu.

Author contributions: L.F., B.L., B.P., T.P., and H.E.S. designed research; L.F., B.L., B.P., T.P., and H.E.S. performed research; L.F., B.L., B.P., T.P., and H.E.S. contributed new reagents/analytic tools; L.F., B.L., B.P., T.P., and H.E.S. analyzed data; and L.F., B.L., B.P., T.P., and H.E.S. wrote the paper.

The authors declare no conflict of interest.

This article contains supporting information online at www.pnas.org/lookup/suppl/doi:10.1073/pnas.1205013109/-/DCSupplemental.

## References

- ↵
- ↵
- ↵
- ↵
- ↵
- Cont R,
- Bouchaud JP

- ↵
- ↵
- ↵
- ↵
- ↵
- Hommes CH

- ↵
- ↵
- ↵
- ↵
- ↵
- Brown B

- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- Bouchaud JP,
- Farmer JD,
- Lillo F

- ↵
- ↵
- ↵
- ↵
- ↵
- Lux T

- ↵
- ↵
- ↵
- ↵
- Podobnik B,
- Valentincic A,
- Horvatic D,
- Stanley HE

- ↵
- Podobnik B,
- Horvatic D,
- Petersen AM,
- Urosevic B,
- Stanley HE

- ↵
- ↵
- Podobnik B,
- Horvatic D,
- Petersen AM,
- Stanley HE

- ↵
- ↵
- ↵
- ↵
- ↵
- Cont R

- ↵
- ↵
- ↵

## Citation Manager Formats

### More Articles of This Classification

### Physical Sciences

### Applied Physical Sciences

### Social Sciences

### Related Content

- No related articles found.

### Cited by...

- No citing articles found.