{'fraction_non_alphanumeric': 0.027904391328515844, 'fraction_numerical': 0.005262182694089309, 'mean_word_length': 5.259800510322431, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Agent-based models in financial market studies

In this manuscript, we summarize prior research on the agent-based modeling of financial markets. While extensive research related to agent-based modeling has been done in various economic disciplines, we focus mainly on the evolution of the models and their applications to financial markets. A large number of studies have adopted agent-based modeling methodologies to explain various empirical findings in financial markets. Our summary shows the benefits of using such modeling to account for various financial market phenomena. We confirm that small changes in initial parameter values can lead to relatively large fluctuations through the financial markets that can be viewed as complex or chaotic systems. This also means that financial markets become volatile due to small unexpected changes in the parameters of the models that describe the market.


Introduction
Serving probably the best example of chaotic dynamics, the global financial system is among the most complex systems ever created by humanity. It consists of multiple interacting autonomous agents (elements) and emergent rules of engagement: the agents normally have heterogeneous goals, interaction rules, and decision-making strategies. The interactions among different agents generate global system dynamics toward an equilibrium or disequilibrium in the prices of various assets.
The majority of analytical tools used to explore financial markets apply general equilibrium theory in the representative agent framework. Within this framework, each agent is assumed to optimize his/her objective function with full rationality and knowledge. A major underlying tenet of this modeling philosophy is that studying every Agent-based models in financial market studies single element is sufficient to understand the system as a whole. 5 While this attempt is able to derive analytical solutions for subsequent analysis, it frequently fails to account successfully for stylized facts, especially in financial markets. This is largely because various models in this framework heavily rely on many unrealistic assumptions, such as market clearing, market convergence to equilibrium prices, perfect information, and rationality, while ignoring the emergent characteristics of agents' interactions and their diverse strategies. Failure to take into account heterogeneity and interaction among agents in the market suggests that this field still lacks a sound micro-level foundation, as well as the unimaginable results of their interactions.
Since it was first developed in the late 1940s, the bottom-up approach known as agent-based modeling (ABM) 6 has provided a more convincing theoretical framework than the prior top-down approaches used in general equilibrium analysis. In an agentbased model (ABM), agents' behaviors are both autonomous and heterogeneous: each agent is able to follow his/her own rules, and interacts with all others autonomously within a designated space that provides the unique information required to analyze the system. 7 Due to the incorporation of these properties, as observed in real financial markets, ABMs successfully link the micro-level rules of investors' behavior with the macrobehavior of asset prices in real markets [1], [2].
ABM provides many benefits in exploring financial market dynamics. 8 First, ABM shows that agents' behavior is artificially intelligent, thereby avoiding the inaccuracy of mathematical equations derived under the general equilibrium theory. Second, the use of ABM makes it easy to manipulate the behavior of an agent as well as environmental parameters. Consequently, one basic model can spin off variant models through this manipulation. Third, observers can not only capture emergent systemic traits and phenomena but also identify the threshold of the model in the ABM setting, because the interaction of agents inevitably generates a unique and chaotic system as time passes.
Such benefits of simplicity, flexibility, and emergence help ABM explore new venues of economic research, especially in dynamic markets with asymmetric information, learning, and uncertainty. If combined, however, they pose particularly daunting technical challenges in terms of computational feasibility and practicality. Remarkable advances in computing technology and accumulation of the real-market data since the 5 Reductionism is the basis of modern scientific analysis; it implies that reducing one element to another can help us better understand the behavior of a whole system. 6 We use 'ABM' to refer to agent-based modeling or an agent-based model, depending on the context. 7 ABMs recognize each agent as an autonomous interacting unit in the system. As such, a clear definition of the designated space for each individual is essential for the workings of the model because it provides the information about the agent's location, neighborhood of mobility, and breadth of interaction with other agents. As demonstrated by the El Farol problem for the stock market, the location of an agent when its action is implemented provides pivotal information that can be used to select other agents with whom it will interact. 8 See, among many others, Schelling, who investigates relations among micromotives and macrobehavior [3], and El Farol's bar model [4], [5].

Agent-based models in financial market studies
1990s has increasingly facilitated the design, computation, and verification of ABMs that aim to assess the effects of the actions and interactions of autonomous agents on the system as a whole.
There exist challenges as well. ABM still remains complicated in most cases, making it difficult to find significant parameters governing agents' unique behaviors. Furthermore, the inherent complexity of this method might lead to a lack of analytical solutions. ABM also brings about new and untested algorithms, relatively weak fundamental assumptions, and likely omissions of important parameters. Therefore, careful design of an ABM is critical for overcoming potential weaknesses.
In this article, we summarize the papers that apply ABMs to financial markets in various settings, and account for market construction, agents' action rules and their dynamic evolution derived from the respective models.

Agent-based stock market
The theory of Rational Expectations (RE), initially proposed by Muth (Econometrica, 1961) and later popularized by Lucas, is one of the most influential theoretical frameworks used to solve most macroeconomic problems. However, not only does it unrealistically postulate that every agent behaves in the same optimal way, but its fundamental assumptions, such as complete information, perfect rationality, and common expectations, are too strong in most cases. It is, in large part, due to the complexity of the reality, say, in the stock market, that the theory tackles to explain. A more realistic analytical setting with bounded rationality, heterogeneity, and adaptiveness at the agent level can be provided only after relaxing the underlying assumptions of the RE and designing a platform for a number of single interacting agents, as is done in Schelling's works [3], [6], [7].
Palmer et al. [8] provide an ABM of the stock market where independent adaptive agents buy and sell shares of stocks. Those agents select or generate investment rules after observing the outcomes of the mental models adopted in each previous time step. Their model is designed to have each agent endowed with a set of condition-action rules that consists of three parts: a condition under which the agent actions are triggered; the action of either buying or selling; and the strength of the optimizing action to increase an agent's wealth. Each agent can adapt to a new environment, such as a changed price or dividend stream, by choosing a share of each stock. Genetic algorithm (GA) infuses evolutionary rules such as mutation, crossover and selection into the designated actions. This model successfully generates dynamic and non-equilibrium features, such as bubbles, crashes, wide wealth distribution, and higher volatility, which are rarely seen in a typical RE model.
This framework postulates that heterogeneous agents adopt inductive reasoning and form their expectations based on their guesses about others' expectations. Based on this framework, Arthur et al. [1] propose a theory of asset pricing with heterogeneous agents whose expectations are continually revised to adapt to the market created by their Agent-based models in financial market studies aggregate expectations, and explore how such a market would work and how it would react to price assets. They also provide carefully-controlled numerical experiments to investigate the equilibrium implications of their model. Specifically, the market resulting from their experiments confirms both the efficient market academic view and the traders' view each is valid under different regimes. That is, efficient market views and traders' views based on "market psychology" can both be verified in a market with inductively rational traders.
The key ingredients mentioned above, such as bounded rationality, heterogeneity, and adaptiveness (even though they seem simple) are still widely used as a basis on which to build ABMs to describe an economic system and to reveal available market making structure [9], [10], [11]. LeBaron [9], instead of focusing on learning speed, emphasizes length of memory as the major dimension of heterogeneity. Using a more standard, empirically calibrated economic structure with fewer parameters, LeBaron shows that short-memory traders could significantly contribute to the magnification of volatility and thus are essential to characterize market dynamics. The results in his paper are consistent with previous studies of the relationship between short-memory traders and market volatility.
Pastore [10] proposes an information-based artificial stock market with heterogeneous agents. Stock prices are formed by propagation of information among the interacting agents, who are subject to budget restraints and market feedback. The artificial stock market in his paper successfully replicates the stylized facts of real financial markets under various conditions, highlighting the role of information. Ponta et al. [11] propose a multi-asset, agent-based financial market which consists of zero-intelligence agents (ZIA) with finite financial resources. 9 In this model, agents follow a random allocation strategy with finite financial resources. The stock market in this framework is shown to produce stylized facts such as volatility clustering, and fat-tailed distribution and mean reversion of returns.

Sentiment effect
How do investors react to one another's sentiments (other traders' moods)? Weidlich proposes several, now-well known, ABMs [13], [14] to describe opinion-formation among agents. In his model, agents have the choice of voicing either one of the two opinions: optimistic or pessimistic. They change their beliefs continuously according to a Poisson process that formalizes switches between the optimistic and pessimistic groups from one moment to another. The corresponding transition rates, ω ↑ and ω ↓ , are assumed to have exponential functions: 9 According to [12] they have no intelligence, do not seek or maximize profits, nor do they observe, remember, or learn.

Agent-based models in financial market studies
where ν is a scale parameter that determines the transition frequency. U works as a threshold to change agents' belief.
Lux [15] investigates the influence of sentiment on asset returns. In his model, sentiment is classified into two different regimes: short-term and medium-term. This makes it possible to construct a stochastic ABM of opinion-formation with explicit social interactions. Using the model which incorporates returns as a representative environment parameter, he shows that there is a significant influence of sentiment on returns of the DAX. Results in the paper confirm the effect on market returns of strong social interaction in short-run sentiment. Even though there is an abrupt short-run sentiment change, medium-term sentiment moves more slowly.
Lux's ABM [15] has the following ingredients: 1) agents' actions and attributes describe short-and medium-term sentiment; and 2) the environment has prices and returns for the stock market, i.e., Deutscher Aktienindex (DAX). There exists no explicit equilibrium in the model, where fluctuations in returns and sentiment are observed during the whole sample period. Numerical maximum likelihood approaches taken from Lux's previous work [16] are used to estimate the parameters of the model.
While a series of ABM simulations finds evidence of strong social interactions in short-term sentiment, social influences on medium-run sentiment tend to become moderated. Previous research using vector autoregressive (VAR) models is consistent with Lux's ABM. This implies that simple macroscopic equation modeling can be replaced effectively with a full microscopic Markov process that is based only on agents' actions.

How do agents herd?
Herd behavior was first observed in ant colonies by entomologists. Kirman [17] develops a simple, but mathematically sophisticated, ABM to analyze and adapt ants' "recruiting" behavior to explain agents' herding behavior in financial markets. Ants have two identical food sources: 1) they first exploit one food source more intensively than the other; and then 2) they switch to the other source from time to time. As opposed to the scientists' prediction that the feeding level would settle on an equilibrium point where the ants would consume equal amounts from each source, ants' herding behavior leads to a situation in which the remaining amounts of food at the two sources stay severely lopsided in a ratio of around 80:20 over time. Kirman [17] demonstrates that this result arises from interactions between identical individuals. 10 The similarity between ant societies and financial markets, in terms of herding, allowed Kirman [17] to apply a multi-agent concept to the dynamics in financial markets. This concept defines the probabilities that one agent will follow another agent's opinion ('herding') and that agents will change their decisions on their own ('self-conversion'). These processes of herding and conversion are intrinsically dynamic: 1) they involve Agent-based models in financial market studies agents making different choices; and 2) agents recruit other agents to their choice by several means. Kirman [17] made an excellent contribution to the foundations for subsequent studies on this subject by illuminating the ways in which economic agents interact with one another actively.
Herding is known to be a key source of endogenous fluctuations in asset prices. For the past several decades, finance academics have considered herding behavior in ABMs, trying to fit ABMs to stylized statistical features salient in empirical data [18], [19], [20]. Kirman [21] presents microeconomic behavioral models with interacting agents, in which the forecasts and trades of agents are influenced by other agents in the market. These models provide a theoretical foundation for the long-memory characteristics of agents' market perspectives. A series of studies by Kirman propose a novel explanation for bubbles in asset prices; bubble-like features could result from herding behavior and switching between opinions.
Alfarano et al. [22] investigate the effects of agents' behaviors on the stylized facts of asset returns in DAX and gold markets. Traditionally, the efficient market hypothesis (EMH) has explained the herding effects on the asset returns through the news arrival process. Alfarano et al. develop an asymmetric herding model with asymmetric transition probabilities that correspond to biased herding in a speculative market. Many behavioral finance studies have seen these effects as a universal pattern of interactions in the markets. That is to say, stylized facts, such as fat-tails and volatility clustering, emerge from traders' interactions.
Alfarano et al. [22] also suggest that the tail shape of the financial returns is determined by structural variables for agents' interactions, i.e., herding behavior and autonomous switching propensity. In a system with two different types of agents, namely, 'fundamentalists' and noise' traders, 11 the probability of finding a specific agent type becomes stabilized as opinion forms. Among the environmental parameters linking the agents and the market, the price is the key to identifying speculative market behavior. Alfarano's work designs agent's actions based on Kirman's work [17], assuming that the market dynamics follow a Markov jump process in continuous time.

Evolution as learning
According to LeBaron [23], GA can model learning behavior in many agent-based financial markets. From the modeling technique perspective, it serves as an improvement to some traditional learning frameworks such as a Bayesian learning model. Agents interact constantly to learn new information and update their strategies. In spite of its conceptual appeal, however, a GA is quite complex to build. Using the concept of a simple stock market in Section 2, LeBaron et al. [24] replicate salient time series features in real markets, such as fundamental and technical predictability, volatility persistence, and leptokurtosis. Agents' beliefs tend to be consistent with what the environmental Agent-based models in financial market studies parameters suggest; these essentially represent aggregate level data. The environment is the world they directly construct, so LeBaron et al. use the environmental information that appears significant in the time series data in formulating the forecasting rules. When the learning speed slows down, agents learn homogeneously, which manifests the importance of forecast horizons.
Time horizon is incorporated into ABM to model learning in financial markets in [25]. Lux's model then investigates the evolutionary features of a market populated with both long-and short-horizon investors. The results uncover a plausible mechanism for real-market dynamics and can be summarized as follows: the selection pressure for long-horizon agents to overcome the high-frequency fluctuations appears to be weak. Short-horizon agents act as volatility generators, preventing the longer-horizon agents from getting a foothold in the market. The market containing different types of traders, who generate the various time series features observed in real markets.
Other ABM studies in this area have tried to combine two forms of learning (active and passive) in a single framework [26], [27]. LeBaron [28] compares the relative strengths and weaknesses of these two forms of learning. 'Active' agents are defined as those who choose strategies based on their well-defined objective functions, so that they move their wealth into the strategies that performed well in the past. Active learning moves at reasonable speeds and may better match observed behavior. However, active learning is hard to model and generates noise in financial time series. Passive agents keep their strategies fixed no matter how poorly these are doing. Passive learning is easy to model, but does not necessarily converge to utility maximization.
The temporal evolution of wealth is considered in [29]. This utilizes the former (established) concept of learning, which consists of passive and active stances. There are three features of agents that survive in the market. A 'buy and hold' strategy controls a large fraction of wealth. High-gain learners mainly adopt adaptive and fundamental strategies. All the strategies put a heavy weight on the recent past in terms of volatility estimates, which may lead to market instabilities.

ABMs and stochastic models
Lux and Marchesi [30] develop a stochastic multi-agent model of a financial market with the aim of understanding the origin of scaling laws in finance. There has been considerable effort made to introduce stochastic components into ABMs to account for empirical facts and explore interaction mechanisms in financial markets. Their model has three categories of agents: fundamentalists, optimistic noise traders, and pessimistic noise traders. The interactions among agents are then incorporated into the model: noise traders exchange opinions via their interactions. There are also switches between noise traders and fundamentalists, and the exponential function is used to describe the transition probabilities for switches.
Price changes are modeled by imbalances between demand and supply. Relative changes in fundamental values (input) are assumed to be independent Gaussian random

Agent-based models in financial market studies
variables, but the time series of returns (output) shows volatility clustering instead of normal distribution. The scaling behavior 12 of financial prices confirmed in the complex systems research results from the output [31]. More specifically, it arises from the interaction among market participants, rather than similar scaling in the input signal of fundamental values implied by the EMH.
In Feng et al.'s work [32], ABM is combined with stochastic approaches to capture statistical features of price dynamics. They construct a behavioral ABM in which price changes bring about a convergence in technical traders' opinions. The model also introduces different investment horizons for technical strategies and a technical threshold based on the returns over different horizons. Surprisingly, the model does not suffer from finite-size effects. The results demonstrate that technical traders' collective behavior contributes to fat-tails in return distributions. Feng et al. conjecture that long-term memory originates from the heterogeneous (investment) horizons of technical traders.
The bottom-up framework of ABMs is applied to look into deterministic and stochastic features. While all traders, in a stochastic buy model, 'buy' a random stock a fraction of the time with a deterministic 'buy' decision, they sell a random stock a fraction of the time with a deterministic 'sell' decision in a stochastic sell model. Comparing phase diagrams of three different markets (a dead market (phase I), a booming market (phase II), and a jammed market (phase III) as shown in Figure  1), Lye et al. [33] find that the primary impact of stochasticity is to eliminate the dead market phase as the region occupied by the dead market phase in the phase diagram decreases with the level of stochasticity.
The concept of the stochastic model is also linked to understanding returns in financial markets. It is well described in the work of Gontis and Kononovicius [34], which relates microscopic ABM to macroscopic phenomenological modeling, combining exogenous noise with the stochastic dynamics of agents by defining joint endogenous and exogenous volatilities. They uncover the origin of power-law (i.e., scaling behavior) in both developed and emerging markets. There also exists an interesting extension: an interacting epidemic system (a so-called S-I-R model 13 ) is incorporated into an ABM of a stock market [36]. Its objective is to explore fluctuating prices in the financial system. Simulation results well match the statistical properties in real stock markets, verifying the suitability of ABM for financial market modeling.

Financial fragility
To check for financial fragility, an ABM of heterogeneous interacting firms and banks is considered; this naturally gives rise to complex dynamics [37], [38]. Heterogeneity is represented by different balance sheet conditions and firm sizes. The simulation results 12 This is an important index to measure the magnitude of collective/herding behavior in the market. 13 The model labels has three compartments: S, number of susceptible; I, number of infectious; and R, number recovered [35].  [33] fit surprisingly well a range of empirical facts related to complex industrial dynamics, as observed in U.S. firms.
In the goods market, the model in [37], [38] assumes a supply-driven economy, where products are demanded at a stochastic price. In the credit market, one monopolistic bank allocates credit to each firm according to its loan and collateral sizes. The interaction between firms and bank equity may generate a domino effect, making it possible to explain how large aggregate fluctuations can result from small idiosyncratic shocks.
Labor-saving technological innovation and the firm size-wage relationship are introduced to establish and account for a link between power-law shifts and business cycle theory [39]. That the technological level and productivity improvement depend not only on R&D investment but also on imitation provides a clear incentive to imitate other firms. They also show that power-law drifts are a consequence of changes in firms' capital accumulation behavior, which originates from technological progress and the wage-firm size relationship.
An ABM model is also used to reveal the power-law distribution of firm size [40]. The power-law distribution is a key to generating the Laplace distribution of growth rates. Large fluctuations in average output are observed even in response to small Agent-based models in financial market studies aggregate shocks, which are due to the power-law distribution of firms' sizes. This is also applied to other features, such as business fluctuations.
Future studies may well extend the model by incorporating other factors, e.g., aggregate demand, various degrees of market power, policy variables and learning processes. Market here may refer to goods or credit markets.

Concluding remarks
We summarize prior studies on ABM of financial markets from the perspective of model applicability and historical evolution. In particular, we highlight several key features of ABMs, how target markets are constructed and how their dynamic evolutions are characterized in their models.
First, we see that small changes in initial parameters in agents could lead to relatively large perturbations throughout the financial markets, i.e., 'complexity emergence.' This remains true even though the definitions of agents' actions are varied across the models. It is, indeed, now known that the financial markets could become volatile due to any unexpected small changes. Second, our survey confirms various benefits of using ABMs to account for financial market phenomena. In particular, we corroborate from their results that ABMs allow us to better understand how the market dynamically evolves to the equilibrium or drifts away from it and thus how asset bubbles are created.
Overall, ABM clearly has a number of benefits a simulation tool to show emergent behaviors (so-called 'macrobehavior from micromotives'), evolution dynamics, and consistent fit with real-market data. Our review summarizes those aspects as explored in the studies discussed here.