A detailed heterogeneous agent model for a single asset financial market with trading via an order book

We present an agent based model of a single asset financial market that is capable of replicating most of the non-trivial statistical properties observed in real financial markets, generically referred to as stylized facts. In our model agents employ strategies inspired on those used in real markets, and a realistic trade mechanism based on a double auction order book. We study the role of the distinct types of trader on the return statistics: specifically, correlation properties (or lack thereof), volatility clustering, heavy tails, and the degree to which the distribution can be described by a log-normal. Further, by introducing the practice of “profit taking”, our model is also capable of replicating the stylized fact related to an asymmetry in the distribution of losses and gains.


Introduction
In the past five decades a great number of time series of prices of various financial markets have become available and have been subjected to analysis to characterize their statistical properties [1][2][3][4][5]. From the study of these time series, a set of statistical properties common to many different markets, time periods and instruments, have been identified. The universality of these properties is of interest because the size, the participants and the events that affect the changes of price (returns) in a certain market may differ enormously from those that affect another. Yet, these investigations show that the variations in prices indeed share non trivial statistical properties, generically called stylized facts. In this work we present and study a model of a financial market and its participants which reproduces these stylized facts.
The majority of approaches used today to model financial markets fall into one of two categories: statistical models adjusted to fit the history of past prices and Dynamic Stochastic General Equilibrium (DSGE) models. The first kind of models are able to produce reasonable representations and volatility forecasts of financial systems [6] as long as the statistical properties of the prices with which they were calibrated do not change by a large margin. The second kind of models assume a "representative agent" for each of the participant sectors in the financial system, each of these agents attempting to their utility [7]. To avoid creating deterministic dynamics without periods of depression or growth, DSGE models use exogenous stochastic a1111111111 a1111111111 a1111111111 a1111111111 a1111111111 for relatively long times. This behavior arises from the fact that the returns have a tendency to "agglomerate in time" in groups of similar magnitude but unpredictable sign [4].
Heavy tailed distribution of returns: The distributions of price changes in real financial time series do not have a normal distribution [4,36,37]. Instead, the distribution is characterized by having large positive values of the kurtosis (for instance, the kurtosis for the Standard & Poor's index measured over time intervals of 5 minutes has been reported to have a value of κ % 16 [38]). Further, studies of the complementary cumulative distribution of returns have shown that it behaves approximately as a power law with an exponent β 2 [2,4] [35,36].
Asymmetry in the distribution of returns: In addition to being heavy tailed, it has observed that in many markets, large negative returns are more frequent than large positive returns. This asymmetry is behind the negative skewness in the returns distribution which has been reported in empirical studies [2].
Log-normal distribution of volatilities: The probability distribution of the volatility of individual firm shares and of indexes, defined as the average of the absolute returns over a time window, is well approximated by a log-normal distribution in its central part, while its tail is well adjusted by a power law with exponent μ % 3 [39].
In the next section we present a detailed discussion of the agent based model we propose. The paper continues with a section in which we present the results obtained in simulations of the model and we focus on the stylized facts listed above, comparing the behavior of the model with representative empirical data. We also study the effect of varying the relative populations of agents as well as the parameters that control the practice of profit taking by the technical agents in the system. We end with a section of concluding remarks and perspectives.

General aspects
The model represents a financial market in which N agents trade a single asset through a double auction order book in which the standing orders are registered until executed. In the model we only consider market and limit orders [40] of unit volume.
Like in actual financial markets, in the model, the population of agents is divided into two different sub-populations, with each sub-population employing one of two basic trading strategies: fundamental analysis -by which a "fundamental price" p f is estimated, and then the traders attempt to take advantage of the deviations between p f and its present trading price P t -; or technical analysis -by which the trader tries to identify and exploit trends in the price time series-.
These two types of strategies are representative of the main strategies used in real life trading and were first introduced in the Lux-Marchesi (LM) model [41]. The effects of these strategies on the dynamics of the price are opposed: while fundamental agents tend to stabilize the prices around the average value of their fundamental prices, technical agents tend to create periods of violent price changes.
The parameters controlling the behavior of each agent are assigned at the beginning of each simulation, and even if two agents belong to the same group (fundamental or technical) the difference in the values of their controlling parameters will generate different "personalities" within each strategy.
We make time run in discrete units corresponding to simulation steps and on each simulation step, each fundamental agent will engage in trading with a probability p active while technical agents will be active when they observe a favorable trend or when they can obtain a high immediate profit, as will be explained later.
In our system, every agent is assigned unlimited credit, and, in contrast to [28], short selling is allowed. These two liberties are meant to ensure that an agent is able to engage in trading whenever it becomes active, thus providing the market with enough liquidity.
Although the model we propose includes the main components of the Lux-Marchesi [41] and the Chiarella C, Iori G and Perelló J [28] models, there are important differences in the way in which we designed both the agents and the market environment. Of central importance is the fact that in our model the process of price formation is directly governed by the demand and supply provided by the agents and, as in Chiarella C, Iori G and Perelló J [28], all the transactions are mediated through an order book. Another difference is the fact that by assigning different parameters, we include heterogeneity within each strategy. Further, in our model the only sources of "exogenous" randomness are, on one hand, the entry times of the fundamental agents; and on the other, the time of arrival and nature of the news in the system. The news elicit randomly distributed reactions from the fundamental agents, each of which estimates its own changes in the fundamental price and may adjust it if it differs too much from the prices at which other agents are bidding. This contrasts with Lux-Marchesi and Chiarella C, Iori G and Perelló J [28] in which a unique fundamental price performing a geometric random walk is assumed. Finally, while the details in the precise behaviors of our technical and fundamental agents differ from those of other models, we also include the possibility that agents can engage in profit taking, as happens in real markets.

Types of agents
1.2.1 Technical agents. As mentioned above, technical agents employ "technical analysis" in an attempt to predict the future behavior of the price time series with the purpose of exploiting the knowledge of that future behavior.
In our model technical agents utilize a technique used in real life called Moving Average-Oscillator (MAO) [33], which consists of a pair of moving averages with different window sizes: a long period average called the slow moving average, and a short period average aptly called the fast moving average. The fast moving average is intended to capture the tendency of the price movements in a short term while the slow moving average has the purpose of capturing the long term trend. When the fast average crosses the slow one from above, the MAO strategy suggests that this is a "signal to sell", since the prices show a short term tendency to fall below the long term trend captured by the slow moving average. Similarly, a "signal to buy" occurs when the fast moving average crosses the slow one from below, since this can be interpreted as the prices having a short time tendency to rise above the long term trend.
We employ the MAO indicator in our model because while it is very simple and easy to implement, it is representative of the plethora of technical analysis tools and it is widely used in real markets [42].
In our model we use MAO indicators that differ in the window sizes of the two averages which compose them. For each of these indicators there is a population of technical agents following its evolution over time and engaging in trading as a result of the signals that the indicator generates. Further, when an indicator generates a signal to either a buy or sell, each technical agent following that particular indicator waits a particular time t wait before entering the action suggested by the signal. This waiting time between the moment in which the signal is generated and the moment in which an agent enters its order is meant to allow the price time series to move in the direction predicted by the indicator. If the agents were to immediately enter their orders after they received a signal, they would not take advantage of the rise or fall in prices that the trends point to. The waiting time t wait of each technical agent is drawn from a uniform distribution in the interval [0, t max ], and assigned to each agent from the beginning of the simulation.
A consequence of the way in which the MAO indicator is constructed, is that the technical agents should have perfectly alternating order flows, with a sell order following a previously entered buy order and vice-versa. This alternation arises from the fact that the MAO indicator generates signals when the two moving averages cross each other and for any of the two directions of crossing: the fast average crossing the slow one from below or from above, the next direction will be necessarily of the opposite kind.
There is, however, another mechanism which compels a technical agent to engage in trading, aside from following the technical indicator. This mechanism is profit taking and it basically consists in selling the asset when the price is sufficiently high with respect to the price at which the last unit was bought, irrespective of whether the MAO indicator generates a sell signal or not, thus providing the agent with an immediate profit. This is implemented as follows, when a technical agent enters an order to the book while following the indicator, that agent registers the price at which the order was executed in a variable called P signal . If the price of the asset P t deviates from P signal by more than a factor γ, the agent will proceed to enter a new sell order; i.e. if after following a buy signal and entering the corresponding buy order to the order book the price of the asset is greater than (1 + γ)P signal , then the agent will place a sell market order, securing in this way an immediate profit. Fig 2 shows how profit taking is carried out in our model.
The profit taking mechanism is introduced in our model because it is a common practice in real financial markets and, as we will see, it turns out to have a strong effect on the return . This is a common technical indicator which is formed by two moving averages of different window sizes that are constantly observed. The moving average with the largest window size is called fast moving average and the one with the smallest window is called slow moving average. When the fast moving average crosses the slow one from below, a signal to buy is generated; conversely, when the fast moving average crosses the slow from above, a signal to sell is generated. statistics. Finally, technical agents in our model act almost immediately after receiving a signal from their technical indicator and decide whether to buy o sell only regarding the present price of the asset. Thus, only market orders will be issued by this type of agent, any consideration of the value of the asset used for establishing a target price at which to enter limit orders is left to the fundamental agents.

Fundamental agents.
A fundamental analysis trading strategy is based on two basic premises: the first one being that every asset has an intrinsic "fundamental price" p f , and the second one, that in the short run, this fundamental price may be incorrectly estimated by the market participants but that in the long run, the market will correctly value the asset and its price will eventually reach the fundamental price p f . An agent following a strategy of this kind will therefore buy an asset when the price at which it is being traded is below his estimation of its fundamental price p f and will sell the asset when its price is above p f . In this way a person following a fundamental strategy will take advantage of the differences between the prices at which the asset is traded over time and the fundamental price; until the asset finally reaches said fundamental price.
When a fundamental agent becomes active, there are three available actions that this agent can engage in: either to buy a unit of the asset, to sell it (even short sell) or to abstain from either. The decision of whether to buy, sell or abstain from participating will depend on the position of the agent's fundamental price p f relative to the price of the nearest best order (best ask or best bid).
If p f > B sell , where B sell is the price of the best ask, the agent will proceed to buy since there are agents willing to sell for less than what the agent considers to be the correct price. Similarly if p f < B buy , where B buy is the price of the best buy, the agent will proceed to sell since there are agents willing to buy offering more than the correct price. If neither of these two conditions is fulfilled, i.e. if B sell > p f > B buy then there will be no competitive offers, since the lowest price at which the agent could buy a unit of the asset is higher than p f , and the highest price at which it If after observing a signal to buy, the prices rise enough (in our case this is defined as the moment at which j1 À P t P signal j exceeds a parameter γ), the technical agent will proceed to enter a sell market order. This practice is commonly used by traders to insure an immediate profit. could sell a unit is lower than p f . Thus, when this condition arises the agent will abstain from participating in the market.
When an agent decides to buy or sell, the decision to do so by entering a limit or a market order will depend on the distance between p f and the price of the nearest best order. Specifically, if the agent decides to buy, it will do so by emitting a market buy order when its fundamental price is above the price of the best sell offer by more than a certain threshold χ market , i.e. when p f > B sell (1 + χ market ), and it will emit a limit buy order when p f is below this threshold. Similarly, when the agent decides to sell, it will do so by emitting a market sell order if its p f is below the best buy offer by more than the threshold χ market , i.e. when p f < B sell (1 − χ market ), otherwise it will emit a limit sell order. Just like every other parameter defining the behavior of a fundamental agents, every agent is assigned an individual threshold χ market from the beginning. Fig 3 shows this decision making algorithm.
On the occasions in which a fundamental agent decides to enter a limit order, the actual price of the order is extracted from a shifted symmetric exponential distribution of the form: where μ spread is the average price of the best orders: m spread ¼ 1 2 ðB sell þ B buy Þ. By assigning the prices of limit orders in this way, they will have a greater tendency to cluster around μ spread which is a representative measure of the central price at which the market participants are valuing the asset. This behavior is intended to reflect the situation in which the prices are not good enough to enter a market order, so the fundamental agents will proceed to bargain with limit orders at prices that will be close to the central price in the market.
In real life, p f is determined by each fundamental trader, and then adjusted as time goes by, according to the appearance of news concerning the well being of whatever underlies the asset. To include this feature of fundamental analysis in our model, we introduce a flow of news modeled as a sequence of IID random variables z t taken from a normal distribution with mean μ news and variance σ news . The time intervals betwen succesive news are taken from a Poisson In (a) we show the conditions that lead to a fundamental agent to introduce a market order: if the fundamental price p f is higher by more than a threshold χ market (specific to each trader) with respect to the price of the nearest best order, the agent will proceed to enter a market order. Otherwise, the agent will proceed to enter a limit order (b). In the figure the orders would be "buy" orders as the agent's fundamental price lies above the best ask. distribution. Here, z t represents the mean value by which the news will change the fundamental prices of the asset. When, in the context of our model, news are issued at a given time t, each fundamental agent adjusts its fundamental price from p f (t) to p f (t) + Δp f (t) where Δp f (t) is again extracted from a normal distribution with mean z t and variance σ Δp f as illustrated in Fig 4. Thus, the majority of fundamental agents will change their prices accordingly with the sign of z t , however, depending on the magnitude of the news, some agents may even extract a Δp f with an opposite sign to z t . This diversity of response to a news item attempts to reflect the possibility of diverse interpretations of the information by the fundamental agents. The fundamental price of each agent is chosen from a uniform distribution at the beginning of a simulation.
Finally, although a fundamental agent bases its trading strategy in the differences between its fundamental price and the prices at which the market values the asset, if too large a difference is present, the agent will try to get closer to the central market price μ spread . This feature is meant to capture the attention that a fundamental agent pays to the opinions of the whole population of agents, which constitutes a mild manner of "herding behavior". If the valuation of the fundamental price that an agent has is too far from the price at which it is being traded, the agent will move its fundamental price closer to the central price μ spread . This can be interpreted as a precautionary move by the agent since such a big difference between p f and μ spread could point to information that was not incorporated in the determination of his fundamental price, or that an ineffective incorporation of the available information was made.
To determine when the difference between p f and μ spread is "too big", each agent compares this difference with a threshold χ opinion , if at the time a fundamental agent becomes active, such agent observes that Then the agent will adjust its price to get closer to μ spread in the following way: Thus, the agent will get as close to μ spread as the maximum tolerance (χ opinion ) between its opinion and the opinion of the population (μ spread ) allows.

Results
In this section we present the results obtained in various simulations. Although these results correspond to a particular set of values for the parameters, reasonable changes in the values of these parameters generate the same qualitative properties in the statistics of the model. It is of critical importance for the stability of the system to have a flow of limit orders (liquidity) capable of filling the gaps that are created when market orders enter the order book. To achieve this, the parameters that govern the flow of limit and market orders emitted by the agents must not give rise to bursts of market orders with a volume so large that one side of the order book is emptied. It is in this sense that we speak above of reasonable changes in the values of the parameters. Thus, for example, if we were to allow greater volumes of market orders to be placed within shorter time windows, say, by including a larger number of technical agents in a simulation, then, the parameters that affect the input of limit orders must be chosen accordingly, in such a way that the fundamental agents have enough time to restore the liquidity consumed by the increased number of market orders. Thus, we calibrated the model to achieve  We model news as a sequence of IID Gaussian random variables. When a realization of this sequence, representing news being issued, occurs, the fundamental prices of each agent are adjusted from p f to p f + Δ p f with Δ p f extracted from another normal distribution whose mean is equal to the value of the current news. In this way when highly positive news arrive, the majority of fundamental price changes will be positive; conversely, when highly negative news arrive, most price changes will also be negative.
doi:10.1371/journal.pone.0170766.g004 stability in the simulations and to reproduce the statistical properties of the returns observed in real life and did not consider calibrating the model to reproduce the order book stylized facts [36] Chiarella C, Iori G and Perelló J did in their work [28].
Unless otherwise stated, the following results were obtained with a population of 1000 fundamental agents and 1500 technical agents divided into two groups of 750 agents with technical indicators made of moving averages with window sizes of 4000 and 2000 time steps for one group and 2000 and 1000 time steps for the other. The other parameter values used for this run are shown in Table 1.
As is frequently the case for many financial models, some of the parameters defined in our model may not have a clear connection to observables in real life, and even when observables similar to the parameters in our model exist, attempting to estimate their values is somewhat ambiguous. Thus, we chose values which allowed the simulations to run in a stable manner and that generated statistical properties similar to those observed in real markets. Interestingly, the model is rather robust and produces similar relevant results for a wide range of parameter values. The values of the parameters we employed for the results we present below are therefore, just an election among many different elections we made within the range of useful parameter values.
We begin by showing the time series corresponding to the prices and logarithmic returns, defined as r(t) = log(P t /P t−τ ), for a given lag τ, generated by our model. These are shown in Figs 5 and 6(a) respectively. The blue bars in Fig 6(a) signal the time steps in which technical agents were active. The bursts of greater volatility coincide with the activity of the technical agents while the times in which only fundamental agents were active (trading) present lower volatility.
In Fig 7 we show the auto-correlation function of the returns, the blue line corresponds to the returns calculated time step by time step. In the inset we show the auto-correlation function for returns calculated every 50 steps, in both cases it can be seen that the auto-correlation is essentially zero for any value of the lag. It is interesting to note that the phenomenon know as "bid-ask bounce" can be observed in the returns generated by our simulations. This phenomenon consists in the presence of negative values of the auto-correlation function at very short lags and it is attributed to the fact that most transactions take place near the best ask or best bid and tend to bounce between these two values [2]. In Fig 8(a) we present the comparison between the auto-correlation of the returns (blue line) and the auto-correlation of the absolute value of the returns (red line). We observe that the auto-correlation function of the absolute returns remains positive over a long time interval, and that it decays slowly to zero. Fig 8(b) illustrates the same auto-correlation functions for a representative company listed in the Standard & Poor's 500. Fig 9(a) shows the distribution function of returns from our model. This distribution shows heavier tails than a normal distribution with the same mean and standard deviation and it is possible to observe that the left tail is heavier than the right one. For comparison, Fig 9(b) illustrates the distribution function of returns for a representative company listed in the Standard & Poor's 500. Fig 10(a) shows the cumulative complementary distribution of positive and negative returns, highlighting the asymmetry between losses and gains. The tail of the distribution of negative price changes is significantly heavier than the distribution of positive changes, a fact that is consistent with the negative skewness displayed by the returns distribution. Fig 10(b) illustrates the corresponding distributions for a representative company listed in the Standard & Poor's 500. In addition to the asymmetry, it can be seen in Fig 10(b) that the tails of the distribution of returns seem to follow power law behavior. To test how well a power law fits the data, we used the python package "powerlaw" [44]. Figs 11(a) and 11(b), 12(a) and 12(b) and 13(a) and 13(b) show fits for three different values of the parameter γ. As can be seen in the figures, both tails of the distribution are rather well described by power laws, although the values for the exponents are not around 3, which is the average tail index reported in [45] and [37] (however see [46]. Nevertheless, some of the values we obtain correspond to those measured in the returns time series of some companies, examples of which can be seen in Fig 14(a)  and 14(b).
The goodness of fit tests performed by the "powerlaw" package throw as a result the loglikelihood ratio R between two different candidate distributions. In this test R > 0 (respectively R < 0) when the first distribution is more (less) likely to describe the data than the second distribution [47]. To assess how much the sign of R was affected by the statistical fluctuations, the significance p, gives the probability of measuring a given value of R under the assumption that its real value is close to zero. A small value of p means that it is unlikely that the measured value of R is a product of the fluctuations, and, as a consequence, that its sign can be trusted as an indicator of which distribution provides a better fit for the data. The average values of R and p for simulations with different values of γ are presented in Table 2. For each value of γ in the table an ensemble of 50 simulations was run and the mean values of the loglikelihood for the left tail (<R − >) and right tail (<R + >) as well as the significance values <p − > and <p + > are presented. Table 3 shows the mean loglikelihood ratios and significance values measured in the empirical data. From the empirical data set it can be seen that although the ratios point to a power law as the best fit when compared to a lognormal distribution, the significance values are again high enough (>0.10) to make inconclusive the test. Similarly, in the data set generated from the simulations, the significance values are too high to ascertain whether a powerlaw distribution is a better fit than a lognormal. Nevertheless, the power law fits seem to be a very good There are essentially no correlations for any value of the lag, except for a negative correlation that lasts for a few steps at the beginning. This phenomenon is also observed in real returns series and has been called bid-ask bounce [2]. The main figure corresponds to the autocorrelation function of the returns calculated every time step and the inset figure to the returns calculated every 50 steps. description of the behavior in both tails of the distribution for all three cases of γ, which span the range from very frequent to very scarce engagement in profit taking.
In Fig 15(a) we present the distribution of volatilities measured as the average of the absolute value of returns |r(t)| over a time window T = nΔt, i.e. For the present result we took values of n = 30 and Δt = 1 time steps. The distribution of volatilities is not well described by a log-normal distribution, however, the central part of the distribution may be approximated by one [39]. On the other hand, when we remove the technical agents from the simulation, the volatilities are remarkably well described by a log-normal distribution as shown in Fig 16, which corresponds to a run with the same parameter values described in Table 1 without technical agents.
To assess how well a lognormal distribution fits the volatilities, we performed a Kolmogorov-Smirnov test on the empirical data and on four different sets of data generated with our model. The p-values obtained from these tests are presented in Table 4. Even in the case with γ = 0.0025 which generated data which clearly deviates from a lognormal distribution at the tails, the average p-value is still high enough to make the rejection of the lognormal hypothesis difficult. The values obtained with the model are very similar to the value of the average p-value measured from the empirical data, which is at 0.47.
This similarity in the central part of the volatility distributions in the scenarios with and without technical agents, along with a similar result obtained by Schmitt T, Schäfer R, Münnix M and Guhr T [16] with their model, in which the agents place orders with exponentially distributed volumes, is of interest since the flows of orders are very different in both cases (see Fig 17(a) and 17(b)), yet, the majority of the volatilities can be described by log-normal distributions. This result suggests that the order book mitigates in some sense, the variations in the shape of the incoming order "signal", in such a way that the variations in price (the volatilities) are not strongly affected by changes in the distribution of orders placed into the book. In Fig 18 we plot the values of the average skewness of an ensemble of 50 simulations (for every point in the plot) as a function of the parameter γ. As explained above, this parameter controls how often the population of technical agents engage in profit taking. In the framework of our model, this behavior is the cause of the asymmetry between losses and gains in the distribution of returns, since by enanging in profit taking, the population of technical agents creates large falls in the price of the asset.
The mean skewness we measured in the empirical data obtained from QuantQuote [43] has a value of −0.33; close to the minimum average skewness obtained in our model with the technical agents population engaging frequently in profit taking at γ = 0.0025. The number of companies with a skewness within the interval [−0.5, 0] is 199, which represents 39.8% of the companies listed in the S&P500.
In Fig 19 we present another test that relates the asymmetry of the distribution of returns to the practice of profit taking. In this figure we present the differences between the exponents of the power law fits for both the positive tail and the absolute value of the negative tail of the distribution of returns for several ensembles of 50 simulations in which we varied the parameter γ.
As can be seen in Fig 19, [48]. The kurtosis shows an increase with the number of technical agents, which strongly suggests that they are responsible for the deviations from normal behavior observed in the distribution of returns. Empirically, the kurtosis measured on the various companies listed in the S&P500 span a wide range of values, with some companies having a kurtosis higher than 100. With our model, we were able to produce kurtosises as high as 7 when the population of technical agents was almost twice the size of the population of fundamental agents. Unfortunately, using higher ratios without compromising the stability of the simulations requires a much larger total population of agents which is beyond our computational capacities.

Conclusion
In this work we studied an agent based model of a single asset financial market with agents employing simple heuristic rules, which is capable of replicating the stylized facts reported in the literature. As in the LM model [41], we divided the population of agents into two groups according to the type of trading strategy they use: fundamental agents and technical agents. Further, we added heterogeneity within each group by varying the values of the parameters that control each agent's behavior. Our aim was to create a model whose agents behaved realistically, as in the LM model, but with equally realistic market structures, namely, trading via a limit order book. We find, in accordance with previous models, that when the population of agents include technical agents, the returns present volatility clustering and a heavy tailed distribution. Further, we found that essentially no autocorrelation of the returns was present for any configuration of the populations. In addition to these main stylized facts, we find that when we allow the population of technical agents to engage in profit taking, the distribution of returns displays negative skewness and an asymmetry between losses and gains appears. By varying the frequency with which technical agents engage in profit taking, we can generate It can be seen in (a) that while the distribution of returns is not well described by a lognormal distribution, the central region is qualitatively similar to one, but the right tail is considerably heavier. Data obtained from Yahoo Finance. doi:10.1371/journal.pone.0170766.g015 return distributions with varying degrees of separation in the tails. This dependence of the skewness over the frequency of profit taking suggests that this practice may be one of the causes of the appearance of the asymmetry in real financial markets.
Regarding the distribution of volatilities we find that only its central part is qualitatively similar to a lognormal distribution when technical agents are included in the population. If, on the other hand, we only include fundamental agents, the volatilities are remarkably well described by a lognormal distribution. The similarity of the volatility distributions in both scenarios, at least in the central part, suggests that its shape may not be strongly dependent on the detailed properties of the flow of incoming orders, since this flow varies significantly when technical agents are inserted in the population as compared with a population comprised entirely of fundamental agents.
We accompany our results with empirical data from real financial series chosen to illustrate the various stylized facts reproduced by our model.
In its present state, the model represents a single asset market, however, it is simple enough to be extended in several ways. For instance, an interesting extension to the model would be to increase the number of assets in the market and to limit the credit available to each agent. By  doing this, the well being of the different "companies" associated to the different assets could become correlated depending on the shifts of the demand for each asset. Thus, we could inquire into the nature of these correlations, and how they are related to the composition of the population of agents. Another interesting modification would be the introduction of sequences of catastrophic news. The model will allow us to study how fast and in which way the market recovers to states observed previous to the arrival of the catastrophic news, if it recovers at all, and if the composition of the population affects this recovery.