EconBase
← Back to paper

Simulation of Stylized Facts in Agent-Based Computational Economic Market Models

Extracted main text — title through conclusion, appendix excluded. This is what our citation measures are computed over, published so the extraction can be checked by eye.

37,266 characters · 9 sections · 48 citation commands

Rendered from LaTeX for readability, not typeset faithfully. Citation keys are highlighted; maths is left as source; figures, tables and equation environments are summarised rather than reproduced; unrecognised commands are greyed out so nothing is silently dropped. Email addresses are removed.

Simulation of Stylized Facts in Agent-Based Computational Economic Market Models

abstractWe study the qualitative and quantitative appearance of stylized facts in several agent-based computational economic market (ABCEM) models. We perform our simulations with the SABCEMM (Simulator for Agent-Based Computational Economic Market Models) tool recently introduced by the authors SABCEMM. \textcolor{black}{Furthermore, we present novel ABCEM models created by recombining existing models and study them with respect to stylized facts as well. This can be efficiently performed by the SABCEMM tool thanks to its object-oriented software design.} The code is available on GitHub SABCEMMgithub, such that all results can be reproduced by the reader.\\ {Keywords: agent-based models, Monte-Carlo simulations, economic market models, stylized facts, SABCEMM, finite size effects, simulator}

Introduction

\textcolor{black}{ Stylized facts are commonly accepted as persistent empirical pattern in financial data. Probably, the first documented stylized fact is the inequality of income discovered by Pareto in 1897 pareto1897cours. Subsequently, there have been made more statistical observations by Fama and Mandelbrot in the 1960s mandelbrot1997variation, brada1966letter, FamaPhd, namely, the non-Gaussian and fat tail behavior of the stock return distribution and volatility clustering. The non-Gaussian behavior can be conveniently studied with the help of a quantile-quantile plot or the excess kurtosis (see appendix definition (ref)). The tail behavior of an empirical distribution is frequently derived by the Hill estimator (see appendix definition (ref)). Volatility clustering describes the existence of a positive auto-correlation for squared and absolute stock returns and absence of auto-correlation for raw returns (see appendix definition (ref)). Nowadays, there have been documented more than 30 stylized facts chen2012agent, lux2008stochastic. For a comprehensive overview of stylized facts, we refer to cont2001empirical, ehrentreich2007agent, campbell1997econometrics, pagan1996econometrics, lux2008stochastic. \\[2em] Standard models in financial literature, such as the capital asset pricing model sharpe1964capital, lintner1965security, are build on the efficient market hypothesis by Fama fama1965behavior. Unfortunately, several stylized facts cannot be explained by the efficient market hypothesis and their origin remain unknown pagan1996econometrics, cowan2002heterogenous, maldarella2012kinetic. In the past decades, agent-based computational economic market (ABCEM) models have become a powerful tool in order to generate artificial financial data which feature stylized facts. The common goal of many ABCEM models is to shed light on the creation of stylized facts.\\[2em] ABCEM models consider heterogeneous interacting agents which are studied by means of Monte-Carlo simulations. In contrast to classical financial market models, they share many similarities with interacting particle systems from physics sornette2014physics, zschischang2001some, lux2008applications. Many ABCEM models are able to replicate the most prominent stylized facts of financial markets and are consequently able to provide sufficient conditions for the creation of those. Examples indicate that behavioral aspects of financial investors play an important role in the creation of stylized facts cross2005threshold, lux2008stochastic, chen2012agent. Further prominent agent-based models are kirman1993ants, cont2000herd, lux1999scaling, brock1997rational. The evident drawback of this computational approach is that all results are based on numerical experiments only. Furthermore, this ansatz only constitutes the sufficient conditions for the generation of stylized facts but does not indicate the necessary ones. \\[2em] Regarding the simulation of agent-based economic market models, there are two major issues present. First, it has been documented that the appearance of stylized facts are due to finite-size effects as discussed in egenter1999finite, zschischang2001some, challet2002, kohl1997influence, hellthaler1996influence. In order to exclude such numerical artifacts, it is of major importance to simulate ABCEM models with a large number of agents, which is a computationally expansive undertaking. Secondly, it is difficult to carry out an objective comparison between different ABCEM models, since the models are implemented in different languages and simulated on different hardware. Besides, we experienced difficulties while reproducing the results published in literature. This may well be due to the sensitivity of ABCEM models to their parameters and due to sometimes incomplete information in publications regarding details of the implementation, such as initial values of model quantities. \\[2em] Therefore, we intend to reproduce established results of multiple models on an identical software architecture to permit an objective comparison. {In particular, we investigate the Levy-Levy-Solomon (LLS) model levy1994microscopic, the Cross model cross2005threshold and the Franke-Westerhoff model franke2012structural regarding their long time behavior or their finite size effects.}\\ Finally, we create novel ABCEM models and study them with respect to stylized facts. These new models are built out of well known building blocks, such as a specific market mechanisms or agent designs of other ABCEM models. This approach allows the study of the interplay of different modeling aspects on the creation of stylized facts. \\[2em] For our simulations, we utilize the recently introduced open source SABCEMM simulator SABCEMM available on GitHub SABCEMMgithub. There are two major reasons for that choice: First, the SABCEMM simulator is efficient in the sense that it is allows for simulating ABCEM models with up to several million agents on a standard notebook. Secondly, the simulator is build on the idea of building blocks such as market mechanisms or agent designs and thus supports the easy recombination of building blocks of different models as easily as plugging together pieces of a puzzle.}\\[2em] The outline of the paper is as follows: In section (ref) we give a short introduction to the SABCEMM simulator. Then we present the simulation results of each model with respect to the reproducibility of the most prominent stylized facts, namely fat-tails, absence of auto-correlation and volatility clustering. Furthermore, we create new models out of existing building blocks of known ABCEM models. Finally, we test these new models with respect to stylized facts. We finish this paper with a short conclusions of this work.

The SABCEMM Simulator

The recently introduced open source simulator SABCEMM SABCEMM is designed especially for large-scale simulations of ABCEM models. \textcolor{black}{This simulator implements an object oriented design leveraging a generalized structure of ABCEM models as defined in SABCEMM. The implementations of the individual ABCEM building blocks are well-separated and the ABCEM model is assembled from the building blocks via an XML-based configuration file. Hence, the evaluation of an ABCEM model using a different building block, such as the market mechanism, requires only a change of the configuration file. If the changed building block does not already exist only this single block has to be implemented. In the following, we present the main conceptual ideas behind the simulator. \\ \\ SABCEMM is well suited for any economic market model which consists of at least one agent and one market mechanism.} An agent is an investor who has a supply of or demand for a certain good or asset, which is traded at the market. The market mechanism determines the price from the demand and supply of all market participants. More precisely, we differentiate between the so called price adjustment process and the excess demand calculator. The latter one aggregates the supply and demand of all market participants (agents) to a single quantity, the excess demand. The former one represents the method of how the market price is fixed based on this excess demand. A schematic picture, which illustrates the presented ideas is shown in Figure (ref).

figure[figure omitted — 191 chars of source]

The concept of an environment has been first introduced by the authors in SABCEMM. An environment represents possible additional coupling between the agents. Probably, the most famous example for an environment is herding, which is frequently used in ABCEM models. We emphasize that such an environment is not mandatory. For a rigorous mathematical definition of the meta-model which is the foundation of the SABCEMM simulator and a detailed discussion of technical details and computational aspects of SABCEMM, we refer to SABCEMM.

Validation and Novel Tests for Known ABCEM Models

\textcolor{black}{In this section we present simulations of the Cross, LLS and Franke-Westerhoff models.} We discuss each model separately and demonstrate the advantages of our simulation framework. We study the behavior of the LLS and Cross models for large numbers of agents to investigate if the models exhibit finite-size effects. Furthermore, we study several model variants of the Franke-Westerhoff model with respect to common stylized facts. We emphasize that we provide all necessary information to reproduce the results. To allow for reproducibility, we define the implemented models in detail and present all parameter values and initial states for each model in the appendix (ref). We ran our simulations on an Intel Xeon 64 bit architecture. The input files for all simulations can be found on the GitHub repository of the SABCEMM source code SABCEMMgithub. Additionally, our simulation data is available as a data publication DataS, DataSet2.\\ \\ We provide a short introduction to each model and discuss the appearance of stylized facts for each model separately. For a detailed definition of the implemented models and parameter settings we refer to appendix (ref).

Cross Model

This section presents results for the Cross model which is inspired by the Ising model ising1925beitrag from physics. In the Cross model, each agent is characterized by his position, long $\sigma_i=+1$ or short $\sigma_i=-1$ in the market, respectively. Their investment propensity is determined by two tensions: one related to rational agent behavior and the other to irrational agent behavior. They both mimic the role of temperature in the Ising model. The irrational agent behavior takes into account the herding propensity of financial investors. The price process is driven through the change of the excess demand and is additionally perturbed by white noise. The authors Cross et al. show that their model can replicate the most prominent stylized facts of financial markets, namely fat-tails, uncorrelated price returns and volatility clustering. For further modeling details, we refer to cross2005threshold, cross2007stylized.\\ \\ In our simulations, we obtain the same qualitative results as presented in cross2005threshold, cross2007stylized. As Figure (ref) reveals, the price dynamic is influenced heavily by the evolution of the excess demand over time. Furthermore, the absence of auto-correlation in raw price returns can be verified by Figure (ref). In addition, Figure (ref) reveals the fat-tail in asset returns. By adding the heteroskedasticity parameter $\theta$, one couples the noise with the excess demand. This leads to volatility clustering as we can see in Figure (ref). A detailed introduction of the model can be found in appendix (ref).

figure[figure omitted — 681 chars of source]
figure[figure omitted — 731 chars of source]
figure[figure omitted — 1,013 chars of source]

\paragraph{Finite Size Effects}

In cross2007stylized the authors claim that their model has no finite size effects. Despite of their claim, all their simulations are performed with 100 agents only. In order to verify their statement, we analyze the model with different numbers of up to five million agents. We ran our simulations with $10,000$ time steps in order to have a sufficiently large sample size. Our simulations support the findings of Cross et al. (see (ref)). Hence, the qualitative behaviour of the Cross model is insensitive to the number of agents, be it $100$ or five million agents.

LLS Model

In this section, we present results for the LLS model which is one of the earliest and most influential econophysical ABCEM models. In addition, the LLS model is an example of a model assuming a rational market, i.e. \textcolor{black}{the price equilibrates at each time step and the excess demand tends to zero} (compare (ref)). For further details we refer to SABCEMM. Note that the LLS model is subject to critical discussions in literature zschischang2001some. We discuss these crucial findings in detail in this section.\\ \\ The LLS model considers the wealth evolution of the financial agents. Every agent has to decide in each time step which fraction of wealth he wants to invest in stocks with the remaining wealth being invested in a safe bond. The investment decision is determined by a utility maximization. For modeling details we refer to levy1994microscopic, levy1995microscopic, levy1996complex, levy2000microscopic.\\ \\ We define the model and parameter sets in detail in appendix (ref), which is the identical choice as in the earlier studies levy1995microscopic, levy1996complex. We consider only one type of financial agent. Figure (ref) shows the simulation in the case of noise and no noise added to the investment decision for an agent with fixed memory span of $m=15$. We observe that the noise leads to oscillatory behavior, which coincides with earlier findings in levy1995microscopic. Figure (ref) shows results for three types of agents with different memory spans $m_1=10,\ m_2=141,\ m_3=256$. The results are qualitatively identical to the results in levy1996complex.

figure[figure omitted — 324 chars of source]
figure[figure omitted — 280 chars of source]

\paragraph{Finite Size Effects} It was discovered earlier that the LLS model exhibits finite size effects zschischang2001some. In our simulations, we identify two different kinds of effects caused by a different number of agents. Our simulations are conducted first with 99 agents and then with 999 agents. First, the qq-plot of the logarithmic stock return of both simulations depicted in Figure (ref) clearly shows that the number of agents has a tremendous effect on the tail behavior. Secondly, Levy at al. levy1996complex claimed that the investor group with the maximum memory becomes the dominant one, meaning they own the maximum amount of wealth. In our simulations, the wealth evolution of different agent groups changes with varying number of agent, as the Figures (ref) and (ref) reveal. Thus, we can conclude that the qualitative output of the model changes with respect to the number of agent, which is an undesirable model characteristic.

figure[figure omitted — 419 chars of source]
figure[figure omitted — 638 chars of source]

\paragraph{Discussion of Model Behavior} The simulation in Figure (ref) reveals that the deterministic model is characterized by a constant investment proportion. The optimal investment proportion is always located at the boundaries $\gamma\in \{0.01, 0.99\}$, determined through the initialization of the return history. This is an absolutely reasonable result, thus the wealth evolution in the original LLS model levy1994microscopic is linear

align[align omitted — 137 chars of source]

and the chosen logarithmic utility function is monotonically increasing. In fact, additive noise on the optimal solutions leads to oscillatory behavior. Thus, the investors change between the two possible extreme investments of being fully invested in stocks or bonds. We point out that the noise level is crucial in order to obtain this oscillatory behavior. Figure (ref) illustrates the model output for different noise levels.

figure[figure omitted — 286 chars of source]

Nevertheless Figure (ref) seems to indicate chaotic price behavior. The previous simulations (see (ref)) clearly reveal finite size effects. In our simulations we obtain that also in the noisy case approximately $90\%$ of the investment decisions (pre-noise) are located at the boundaries. Mathematically this is an unsatisfying result since in the expansive optimization process in useless in $90\%$ of the cases. Thus, we may conclude that the LLS model exhibits several undesirable model characteristics.

Franke-Westerhoff Model

In this section, we consider the Franke-Westerhoff model as discussed in franke2012structural. Earlier model variants can be found in franke2009validation, franke2011estimation. The model studies the evolution of two groups of traders, one group with a chartist strategy and the other with a fundamental strategy. This evolution can be interpreted in the sense of the meta-model introduced in SABCEMM as the evolution of two representative agents. In each time step, a fraction of the traders adapts their investment strategy by a switching process based on socio-economic factors. These factors are for example a comparison of the agents' estimated wealth or a herding mechanism. The logarithmic stock price is then driven by the aggregate excess demand of both groups. As a distinct feature of the Franke-Westerhoff model, they employ the concept of structural stochastic volatility as introduced in franke2009validation. This means that the demand of chartist and fundamentalist has a stochastic component which takes into account heterogeneity within agent groups and uncertain events. Furthermore, the variance of these random terms differ between both investor groups. \\ \\ The second distinct feature of the Franke-Westerhoff model is the possibility to choose between two well known switching mechanism. The discrete choice approch (DCA) introduced by Brock and Hommes brock1997rational or the transition probability approach (TPA) introduced by Weidlich and Haag weidlich2012concepts and Lux lux1995herd. \\ \\ The authors have shown in several publications franke2009validation, franke2011estimation, franke2012structural that their model fits the statistical features of real financial markets such as volatility clustering or fat-tails of stock returns extremely well. Furthermore, they have even employed the method of simulated moments franke2009applying in order to fit their model parameters to original financial data. \\ \\ First, we present the simulations of the Franke-Westerhoff model with discrete choice approach and the behavioral factors herding (H), predisposition (P) and misalignment (M). This model choice can be conveniently abbreviated by DCA-HPM. Figure (ref) shows a plot of the auto-correlation function of raw and absolute logarithmic returns. The auto-correlation of raw returns is approximately zero which indicates absence of auto-correlation. In comparison to the raw returns, we obtain a slow algebraic decay in the case of absolute returns. This is known as volatility clustering. In addition, the quantile-quantile plot indicates fat-tails for the logarithmic stock returns.

figure[figure omitted — 634 chars of source]

As a second aspect, we investigate the impact of both switching mechanisms. We have simulated the HPM case for the DCA and TPA approach. Figure (ref) reveals that the mean fraction of chartists is slightly larger in the DCA approach than in the TPA method (see table (ref) as well). Furthermore, Figure (ref) shows that the fractions of chartist in the DCA case are much more volatile. We have used the same random number seed in both simulations. Qualitatively, the results of both switching mechanisms do not differ. As presented by Franke and Westerhoff in franke2011estimation we run a model contest as well. We have averaged our simulation over 200 runs. Table (ref) depicts the different values for the excess kurtosis and the hill estimator of logarithmic returns and the average fractions of chartists. We do not obtain a model which significantly dominates all other choices with respect to reproducing stylized facts. Finally, we have conducted a test in order to study the long time behavior of the model. In fact, Figure (ref) depicts that there is no qualitative change in the evolution of prices in the long run.

figure[figure omitted — 436 chars of source]
figure[figure omitted — 291 chars of source]
table[table omitted — 932 chars of source]

Novel ABCEM Models

In this section, we demonstrate the flexibility of the SABCEMM simulator by creating new models and adding new features to the Cross model. More precisely, we consider the Cross agents in combination with new market mechanisms. We can show that the precise form of the market mechanism can have a direct impact on the appearance of stylized facts. In addition, we modify the Cross agents by adding a wealth evolution to each agent and study the statistical properties of the wealth evolution.

\paragraph{Wealth Evolution}

We consider the original Cross model as defined in appendix (ref). We add a wealth evolution of the type $$ w_{i}(t_{k+1}) = w_i(t_k)+ \Delta t\ \left[(1-\gamma)\ r + \gamma \frac{S(t_k)-S(t_{k-1})}{\Delta t\ S(t_k)}\right] w_i(t_k), $$ to each Cross agent $i=1,...,N$. The positive constant $r>0$ denotes the interest rate and $\gamma\in (0,1)$ a fixed fraction of stock investments for all agents. The goal is to study the influence of the non-Gaussian return distribution on the wealth distribution. \textcolor{black}{We have plotted the empirical wealth distribution in Figure (ref).} With increasing $\gamma$, we obtain an increasing excess kurtosis of the wealth distribution. In fact, the excess kurtosis approaches the excess kurtosis of the stock price, which is approximately 6. The results averaged over 100 runs are shown in Figure (ref). \textcolor{black}{ The qq-plot in Figure (ref) clearly shows the asymmetrically fat-tail behavior of the wealth distribution for a fixed $\gamma=1$. Thus, the tails of the wealth distributions are fat for positive values and slim for negative values. This behavior reveals that the tail behavior is translated from the price distribution to the wealth distribution and heavily depends on the investment fraction $\gamma$. }

figure[figure omitted — 346 chars of source]
figure[figure omitted — 333 chars of source]
figure[figure omitted — 304 chars of source]

For future research, we could generalize the microscopic excess demand of the Cross agents by adding a wealth dependency. This would lead to an additional coupling between wealth and stock price behavior.

\paragraph{SDE Discretization} In this section, we again consider the Cross agents, but we change the clearance mechanism. We set the pricing rule to be $$ S(t_{k+1}) = S(t_k)+ \Delta t\ F_{Cross}(t_k,S, ED) + \sqrt{\Delta t}\ S(t_k)\ (1+ \theta\ | ED(t_k) |)\ \eta,\quad \eta\sim \mathcal{N}(0,1). $$ We choose the Euler-Maruyama discretization of the SDE: $$ dS = F_{Cross}(S,ED)\ dt + S\ (1+\theta\ | ED|)\ dW, $$ where $W$ is a Wiener process and the SDE should be interpreted in the It\^{o} sense. For our first simulation, we set the drift operator $F$ to read: $$ F_{Cross}^1(t,S,ED) := S(t)\ \frac{d}{dt} ED(t). $$ As the Figures (ref) and (ref) reveal, the behavior of this model is identical to the original Cross model. Thus, we have obtained a pricing rule which is a proper time discretization of a time continuous model.

figure[figure omitted — 318 chars of source]
figure[figure omitted — 486 chars of source]

In a second test we set the drift coefficient to $$ F^2_{Cross}(t,S, ED) := S(t)\ ED(t). $$ We study the different impact of the two models on the stock price behavior. Our studies reveal that the the choice $F^2_{Cross}$ leads to Gaussian price behavior. We measured this using the excess kurtosis, which we averaged over $100$ runs (see table (ref)). This is an interesting result, since it reveals the great influence of the drift coefficient on the stock price behavior.

table[table omitted — 456 chars of source]

Conclusion

\textcolor{black}{ We have presented various simulation results using the recently introduced simulator SABCEMM. We have provided a brief introduction to the SABCEMM software. Afterwards, we have carried out several simulations of the LLS model, Cross model and Franke-Westerhoff model. In order to verify that the Cross model is not prone to finite size effects, we ran simulations of up to several million agents. We utilized the well-separated, modular design of SABCEMM, allowing for the recombination of building blocks, to create novel ABCEM models by simply interchanging the market mechanism.\\ \\ For the previously published ABCEM models, our results and the obtained stylized facts coincide with the findings in literature. The extended numerical studies such as simulations with many agents or long time simulations have supported the validity of these well-known models.\\ The study of the new ABCEM models based on the agent design of the Cross model has revealed several novel insights. Our studies have shown that the fat-tail property of the stock return influences the tail of the wealth distribution.} Interestingly, the fraction of investments in the stock return determines the size of the tail. Hence, the more money is invested in stocks the more prominent is the tail in the wealth distribution. Furthermore, we have seen that the choice of the market mechanism heavily influences the fat-tail property of the stock return data. We conclude that the precise form of the market mechanism is of eminent importance in order to generate realistic stock price data. \\ \\ These observations lead us to the conclusions that the combination of further building blocks may help to find the origins of stylized facts and to understand the mechanism which create them.

Acknowledgement

Torsten Trimborn gratefully acknowledges support by the Hans-Böckler-Stiftung and the RWTH Aachen University Start-Up grant. The work was partially funded by the Excellence Initiative of the German federal and state governments.\\