Loss Aversion, Adaptive Beliefs, and Asset Pricing Dynamics

We study asset pricing dynamics in artificial financial markets model. The financial market is populated with agents following two heterogeneous trading beliefs, the technical and the fundamental prediction rules. Agents switch between trading rules with respect to their past performance. The agents are loss averse over asset price fluctuations. Loss aversion behaviour depends on the past performance of the trading strategies in terms of an evolutionary fitness measure. We propose a novel application of the prospect theory to agent-based modelling, and by simulation, the effect of evolutionary fitness measure on adaptive belief system is investigated. For comparison, we study pricing dynamics of a financial market populated with chartists perceive losses and gains symmetrically. One of our contributions is validating the agent-based models using real financial data of the Egyptian Stock Exchange. We find that our framework can explain important stylized facts in financial time series, such as random walk price behaviour, bubbles and crashes, fat-tailed return distributions, power-law tails in the distribution of returns, excess volatility, volatility clustering, the absence of autocorrelation in raw returns, and the power-law autocorrelations in absolute returns. In addition to this, we find that loss aversion improves market quality and market stability.


Introduction
In 1987, the Wall Street Stock Market faced a severe financial crisis.That crisis provoked economists to realize that traditional economic theories such as the theory of rational expectations and efficient market hypothesis cannot explain the emergent aggregate behaviour of real markets.In addition, classical economic theories suggest that financial markets are populated with rational agents and rationality is common knowledge to all agents.However, these assumptions lead to no trade theorems [1], which contradict the excessive trading volume observed in real financial markets.Moreover, the rational agent cannot survive in a heterogeneous world 1 .This observation motivated the researchers to use more advanced computational technique to better understand the behaviour of financial markets.
Therefore, the high trading activities in financial markets present evidence for the presence of heterogeneous predictions for asset prices.Heterogeneous agent models aim to relax the classical hypothesis of a representative agent and the rational expectations towards heterogeneous bounded rational agents [3].These models study the individual-based behaviour in markets populated with bounded rational, heterogeneous agents using simple heuristics and simple extrapolation methods.This approach seems to provide plausible results in generating a near-realistic financial time series [4] and replicating the so-called stylized facts of financial markets [5][6][7].Stylized facts represent a set of statistical properties common across many markets and time periods, such as bubbles and crashes, fat-tailed return distributions, uncorrelated returns, and volatility clustering.
Frankel and Froot [8], Taylor and Allen [9], and Menkhoff [10] conducted different questionnaire surveys to investigate the traders' main heuristics in order to model their behaviours.The studies revealed that traders rely on two trading philosophies, the technical and the fundamental analysis, to determine their trading strategies.According to chartists, the ones who believe that price trend will continue and follow technical analysis will try to maximize their profits by taking advantages of asset price fluctuations [11].Chartists compare the current price with the previous one; they buy (sell) when the asset price increases (decreases).On the other hand, fundamentalists, the ones who follow fundamental analysis, predict that the asset price will revert to 2 Advances in Decision Sciences its fundamental value [12].Therefore, fundamentals buy (sell) when the asset price decreases (increases) as compared to its fundamental value.
Financial markets are comprised of many traders with heterogeneous beliefs, attributes, and level of rationality [13].Traders face high uncertainty since they have to make expectations of future prices to submit their current orders.This uncertainty is due not only to the limited traders' ability to collect and process information, but also to the algorithmic complexity of the problem they face.Consequently, traders are continuously enforced to learn and adapt to highly dynamic environments.This adaptation causes the whole financial system to coevolve.Studying financial markets as adaptive evolutionary systems of heterogeneous agents is a completely different approach from that used in the traditional economic models [14].This encourages the use of agent-based modelling as the most suitable approach, as it provides more flexible tools to simulate the real world [15][16][17][18].This approach implies new challenges and opportunities for making policy as well as managing economic crisis.
Artificial financial markets are models developed using the agent-based modelling approach.The main aim of artificial financial markets is to understand the endogenous variables that cause aggregate behaviours and patterns to emerge at the macro level [4,[19][20][21][22][23].These artificial markets serve as test-beds for policy makers to explore the effect of different regulatory policies which improves the decision making process.Many of the market crashes can be limited by identifying the sensitive parameters that affect the financial market either directly or indirectly [24].In this paper, we propose an artificial financial market which is capable of generating realistic stock market dynamics.
Meanwhile, behavioural finance is a relatively new paradigm seeking to link behavioural and cognitive psychological theories with finance to understand the bounded rational decisions of financial traders.Since 1979, Kahneman and Tversky provoked the idea of the choice under uncertainty.They spent many years to study this concept by conducting surveys and collecting data about the traders' behaviour under uncertainty [25][26][27][28].Kahneman and Tversky propose that the outcomes of risky prospects are estimated by a value function.This function is mainly characterized by loss aversion; that is, the function is steeper in the negative than in the positive domain.This characteristic describes asymmetric S-shaped value function, which is concave above a reference point and convex below it.
Although the prospect theory has been developed since 1979; yet there is no clear definition of gains and losses and how to measure them.Also, there is no clear identification of the reference point.Accordingly, its application into financial markets framework is very challenging.The model proposed in this paper provides a novel application of the prospect theory, where agents recognize their gains and losses in terms of an evolutionary fitness measure.
Many studies have been developed to model the switching dynamics between fundamental analysis and technical analysis, such as [4,29,30].It is worth noting that deterministic agent-based financial market models, such as [31,32], are able to explain boom-bust cycles while stochastic models, such as [4,22,[33][34][35], can replicate more detailed stylized facts of financial markets.Unfortunately, few authors studied behavioural biases in their agent-based financial framework, such as [36][37][38][39].
In this paper, we explore the agent-based modelling as a tool for studying loss aversion behavioural bias introduced by the prospect theory.Our model contributes to behavioural finance research by linking the macro and the micro behaviours.This link is ignored in the classical models studied behavioural finance.To our knowledge, no research has been conducted to study the impact of loss aversion behavioural bias on the adaptive belief system and asset pricing dynamics, which is considered as our main contribution in the current work.
The rest of this paper is organized as follows.In Section 2, we introduce an agent-based financial market model in which the chartist traders are loss averse, along with the basic parameter settings and the model implementation.In Section 3, we investigate the extent to which our agent-based model is able to replicate the stylized facts of the Egyptian Stock Exchange.In addition, the results of a large Monte Carlo simulation we performed are presented.Finally, in Section 4, we summarize our main results and conclusions.

An Agent-Based Model under Loss Aversion
In this section we introduce an agent-based financial model populated with heterogeneous agents with loss aversion behavioural bias.At the beginning we discuss the model definition and assumptions.In Section 2.2, the detailed model is provided.Finally, the parameter settings are depicted in Section 2.3.

Model Definition and Assumptions.
The main assumptions of the proposed artificial financial market can be summarized as follows.
(i) There is only one risky asset to be traded.
(ii) There are two types of agents, the market maker and the traders.
(iii) In each time step ,  = 0, 1, . . ., , each trader decides on taking one of two alternative actions, either to submit orders or to abstain from the market.
(iv) If a trader chooses to submit an order, she/he can either follow technical or fundamental trading rule.It is assumed that, at time  = 0, the orders are submitted without knowing the asset price.It is also assumed that fundamental traders can calculate the fundamental values.
(v) Beliefs adaptation rule: the agents are bounded rational as they tend to choose the strategy performed well in the recent past and therefore display some kind of learning behaviour.It is assumed that the fitness of each trading strategy is available and publicly known by all agents.
(vi) The chartist agents are loss aversion so that they recognize losses more than twice recognizing their gains.Consequently, they consider a value function proposed by the prospect theory to evaluate the fitness of each trading strategy.
(vii) The fraction of traders following each strategy is determined via a discrete choice model.
(viii) The market maker correlates the orders and adjusts the asset price according to the net submitted orders.
It is assumed that the market maker is a risk neutral and settles the asset prices without intervention.
(ix) Agents in our market interact indirectly through their impact on price adjustment which affects the performance of the trading rules which in turn affects the agent decision to select trading strategy and so on.

Model Formulation.
The behaviour of the market maker is described as in Farmer and Joshi [34], where the price settlement is formulated as a log-linear price impact function.This function measures the relation between the quantity ordered (demand/supply) and the price of the asset.Thus, the log-price of the asset in period  + 1 is given by where  is a positive price settlement parameter,    and

𝑓 𝑡
are the orders submitted by chartists and fundamentalists, respectively, at time , and    and    are the weights of technical strategy and fundamental strategy, respectively, at time .In order to make our assumptions close to the real market, the noise terms   are added to catch any random factors affecting the price settlement process.It is assumed that   ,  = 1, 2, . . .,  are IID normally distributed random variables with mean zero and constant standard deviation   .
The goal of the technical analysis used by the chartists is to exploit the price changes [40].Orders exploiting technical trading rules at time  can be written as where  is a positive reaction parameter (also called extrapolating parameter) that capture the strength of agents' sensitivity to the price signals.The first term at the right-hand side of (2) represents the difference between current and last price, which indicates the exploitation of price changes.The second term captures additional random orders of technical trading rules.And   ,  = 1, 2, . . .,  are IID normally distributed random variables with mean zero and constant standard deviation   .Fundamental analysis assumes that prices will revert to their fundamental values in the short run [12].Orders generated by fundamental trading rules at time  can be formalized as where  is a reaction parameter (also called a reverting parameter) for the sensitivity of fundamentalists' excess demand to deviations of the price from the underlying fundamental value.  2 are log-fundamental values (or simply fundamental values) [31].  is introduced to capture additional random orders of fundamental trading rules.  ,  = 1, 2, . . .,  are IID normally distributed random variables with mean zero and constant standard deviation   .
The evolutionary part of the model, inspired by Brock and Hommes [32], depicts how beliefs are evolved over time.That is, how agents adapt their beliefs and switching between strategies.This part is mirrored in the fractions   = {   ,    ,  0  }, where  0  represents the fraction of inactive agents and    ,    are as indicated in (1), and the strategy weights add up to one.Fractions are updated according to evolutionary fitness measure (or attractiveness of the trading rules) which can be presented as follows: where    ,    , and  0  are the fitness measures of using chartist strategy, fundamental strategy, and no-trade strategy, respectively.The inactive traders submit zero orders, so they got zero attractiveness of taking such an action.The fitness measure of the other two trading rules, the technical and the fundamental analysis, depends on two components.The first term of the right-hand sides of (4) and ( 5) is the performance of the strategy rule in most recent time.Notice that orders submitted in period  − 2 are executed at the price declared in period  − 1.The gains or losses depend on the price declared in period .The second term of the right-hand sides of (4) and (5) represents agents' memory, where 0 ≤  ≤ 1 is the memory parameter that measures the speed of recognizing current myopic profits.For  = 0, agent has no memory, while for  = 1 they compute the fitness of the rule as a sum of all observed myopic profits.
While, in Westerhoff [22] model, agents symmetrically perceive gains and losses in terms of fitness, in our model we propose a realistic behavioural bias, so that chartists evaluate their strategy fitness in terms of a value function of gains and losses.The proposed value function implies that chartists recognize losses more than twice their recognition of gains.As our focus is to study loss aversion, we adopt the Tversky and Kahneman [27] and Benartzi and Thaler [41] piecewise linear value function proposed by the prospect theory.Accordingly, the value of the fitness of technical strategy is given by where  is the parameter of loss aversion that measures the relative sensitivity to gains and losses.However, setting  = 1 reduces the value function to V  =    ; we call this case lossneutral chartists.

Advances in Decision Sciences
Following Manski and McFadden [42], the market share of each strategy can be obtained by the discrete choice model 3 as follows: The higher attractive strategy will be chosen by the agents.The parameter , in (8), is called the intensity of choice and measures the sensitivity of mass of agents selecting the trading strategy with higher fitness measure.In such adaptive beliefs, financial market prices and fractions of trading strategies coevolve over time.

Basic Parameter Settings.
Model parameter settings are determined following Tversky and Kahneman [27], Winker and Gilli [43], Farmer and Joshi [34], and Westerhoff [22].The values of model parameters are chosen so that the model can mimic the dynamics of real financial markets.
The main idea behind choosing specific values of the parameters can be summarized as follows.The reaction parameters of technical and fundamental trading rules (multiplied by the price settlement parameter) are between zero and 0.1 for daily data.
To keep the autocorrelation 4 of raw returns 5 close to zero, parameters  and  are chosen as follows.The population of the chartists is matched with the population of the fundamentalists, so that the positive short-term autocorrelations induced by the chartists are cancelled by the negative shortterm autocorrelation of the fundamentalists.Therefore, the reaction parameters of technical and fundamental trading rules are set to be the same.
The value of   is assumed to be higher than   to reflect the level of noise associated with technical trading rule.The value of  is assumed to be near one, so the agents have good memory.Also, the value of  reflects the bounded rationality in choosing the trading rule with highest fitness measure.Finally, many experiments estimate loss aversion parameter to be in the neighbourhood of 2; that is, the utility of losses is twice as great as the utility of gains [27,41].Experimental estimation of  has been estimated by Tversky and Kahneman [28], such as  = 2.25.The values of model parameters are summarised in Table 1.In the following section we study the evolutionary dynamics of our proposed model.

Adaptive Beliefs and Asset Pricing Dynamics
In this section we discuss the dynamics of our model by simulation.In Section 3.1, we describe the simulation design.The extent to which our model is able to explain statistical properties of real financial markets is studied in Section 3.2.
In addition to this, the results obtained from the Monte Carlo analysis we performed are illustrated.Finally, we study the effect of loss aversion on the adaptive belief system and market quality.

Simulation Design.
To implement the proposed artificial financial market, we develop an agent-based simulation model using Netlogo platform.NetLogo provides an environment for simulating natural and social phenomena [45].It is particularly well suited for modelling complex systems evolving over time.At initialization, all parameters of the model are equal to the values defined in Table 1, and values of all variables   ,

and 𝐴
are set to zero.To implement our simulation framework, we follow the steps listed in Algorithm 1.We investigate the performance of 5000 simulation runs, each containing 4120 daily observations.In the following section, simulation results are displayed.

Simulation Results and Analyses.
Many researchers study the empirical behaviour of financial returns, and they find that most financial markets share the same statistical properties [5][6][7]46], such as (i) price bubbles and market crashes, (ii) random-walk price behaviour, (iii) fat-tailed return distributions, (iv) power-law tails, with a tail index somewhere in the regions 2-5, (v) excess volatility, (vi) volatility clustering, (vii) absence of autocorrelations in asset returns, and (viii) persistent long-range memory of volatility.
In the following, we explore the extent to which our model is capable to replicate these stylized facts.Also, to investigate the effect of loss aversion on the macro and micro dynamics of the artificial market, a benchmark case, where  = 1, is included in our analyses.To the rest of this section, the market populated with loss-neutral chartists, where  = 1, and the market populated with loss averse chartists, where  = 2.25, will be named MARKET1 and MARKET2, respectively.Moreover, the time series generated by MARKET1 and MARKET2 will be referred to as MOD1 and MOD2, respectively.
In the following, our exposition mainly rests on the behaviour of the stock index of Egypt (EGX 30).Its time series covers the period from January 1, 1998, to November 16, 2014, and consists of 4123 daily observations.The data was downloaded from the Egyptian Stock Exchange website 6 .We apply time series analysis and econometric measures using Excel and MatLab software.The main results were reported for both MARKET1 and MARKET2.Also, we perform large Monte Carlo simulations to check the robustness of our results.
Before we start a comprehensive Monte Carlo analysis, we will first explore a representative simulation run.The simulation run contains 4120 daily observations, mirroring a period of about 16 years.Figure 1 shows the evolution of (a) EGX 30 daily quotes along with the evolution of log-prices of (b) MOD1 and (c) MOD2, respectively.
Figure 1(a) illustrates the behaviour of EGX 30 daily quotes, which displays significant bubbles and crashes.For example, we observe strong price appreciations between May evaluate trading rules use (4), ( 5) and (6) ( 6) Calculate weights use (8) (10) Update price use (1) (11) end do (12) end loop Algorithm 1: Pseudocode for the proposed artificial financial market.  .A detailed history of financial crises can be found in Griffith-Jones et al. [47].
From Figure 1(c), we observe that prices fluctuate around their fundamental values.Our model is able to generate substantial bubbles and crashes.Between periods 1800 and 1880, for instance, the price began to drop sharply.Also, for example, between periods 3650 and 3800, we observe sharp price appreciations with stock prices deviating more than 50 percent from their fundamental values.It should not be overlooked that loss aversion contributes to market quality 8 by reducing distortion [48].In Figure 1(b), between periods 3650 and 3800, for instance, we observe the further amplifying price movements.Moreover, computing the distortion for the MOD2 (MOD1) reveals a value of 8.8 (11.4) percent.
Figure 2 displays daily returns of (a) the EGX 30, (b) the MOD1, and (c) the MOD2, respectively, over the same time horizon as in Figure 1.Note that Figure 2 shows another characteristic feature of stock market, which is excessive price volatility.Clearly, prices fluctuate strongly, and extreme returns of the EGX 30 reach up to ±18 percent.To measure volatility, we follow Guillaume et al. [46] and calculate the average absolute returns (vol = (1/) ∑  =1 |  |), which produce a value of 1.23 percent per day.As stated by Shiller [49], such volatility value is too large to be explained by fundamental crashes alone.However, these values of EGX 30 are considered to be much higher than other developed stock markets 9 ; this is in good agreement with results obtained from empirical data of developed and emerging financial markets [50].The distribution of emerging markets' returns exhibits fatter tails than that of developed markets, in which case the volatility is infinite as found by Mandelbrot [5] in his famous study of cotton prices.Figures 2(b) and 2(c) show the daily returns of the MOD1 and MOD2, respectively.Extreme returns reach up to ±17.4 for both cases.However, computing the average absolute returns for the MOD1 (MOD2) reveals a value of 1.5 (1.7) percent.Therefore, loss aversion behavioural bias seems to improve market quality through reducing excessive price volatility [48].Furthermore, Figure 2 displays another stylized fact of stock markets namely volatility clustering, where grey rectangles exemplify periods of high volatility.This fact is stated by Mandelbort [5] as both small and large fluctuations are clustered; that is, periods of high volatility alternate with periods of low volatility.This fact displays significant long memory effects in financial time series.
Another stylized fact concerns the distribution of returns and its fat tail feature.Figure 3  distributed returns with the same means and standard deviations (dashed lines).We observe that the distributions of empirical returns exhibit a higher concentration around the mean, thinner shoulders, and more probability mass in their tails.
A power law may give a useful approximation to the tail behaviour of empirical data, but there is no reason to anticipate that it will appear in every market.One way to investigate the power-law behaviour is suggested by Clauset et al. [51].Evidence for a power-law tails is presented in Figure 4.Here we plot, on a log-log scale, the complements of the cumulative distributions of normalized EGX 30, MOD1, and MOD2 returns, respectively.For comparison, the dashed lines give the complements of the cumulative distributions of the standard normal distributions.Now, the exponent  of the Pareto distribution for the tails is defined as Pr(|  | > ) ≈  − .Regression in logarithmic coordinates reveals an estimate of 2.45 for the MOD1 and an estimate of 2.39 for the MOD2; these figures are quite close to the estimate for the EGX 30 (2.37) and conclude that the tails decay at an exponential rate.Note that lower values for α imply fatter tails.Therefore, distribution of returns under loss aversion exhibits fatter tails than that under loss neutrality.This implies that our model is able to accurately replicate the real return time series.
To reduce computational efforts, we use the so-called Hill tail index estimator 10 [53] α , to estimate the tail index.Figure 5 displays the estimated values of α , for the smallest and largest  percent of the observations for (a) the EGX 30, (b) the MOD1, and (c) the MOD2, respectively.Regressions on the smallest (largest) 10 percent of the observations yield an estimate of 3.47 (3.92) for the EGX 30, an estimate of 2.86 (3.51) for the MOD1, and an estimate of 3.26 (2.89) for the MOD2.All results are in good overall agreement with a universal cubic law ( ≈ 3) as proposed in the relevant literature [54].
Figure 6 depicts the autocorrelation functions for raw and absolute returns for the first 100 lags, for (a) the EGX 30, (b) the MOD1, and (b) the MOD2, respectively.The dashed lines present 95 percent confidence bands according to the assumption of a white noise process.The EGX 30 raw returns show autocorrelation coefficients that are not significant for almost all lags except for the first lag.It is difficult to predict future trend of the EGX 30 returns.However, persistence in volatility can be observed from the autocorrelation functions of absolute returns, where autocorrelation coefficients are significant over 100 lags.
Note that Figures 6(b) and 6(c) illustrate the autocorrelation functions of raw and absolute returns for the MOD1 and the MOD2, respectively.The raw returns for both series display autocorrelation coefficients that are not significant over 100 lags.On the other hand, absolute returns show significant long memory effects for more than 60 lags.The significant positive autocorrelations in absolute returns provide a quantitative sign of the clustered volatility, where periods of high volatility are more likely to be followed by periods of high volatility.The price dynamics of our market closely resembles a random walk; this result is in good agreement with the stylized facts stated by Mandelbrot [5], Fama [6], and Cont [7].
Another astonishing fact of the stock markets is the selfsimilarity in the sense of Mandelbrot [55].A nonstationary stochastic process 11 (  ) ≥0 is said to be a self-similar if there exists  > 0 such that the processes (  ) ≥0 and (   1 ) ≥0 have the same distribution [56].Therefore, the distribution of   for any  can be fully determined by the distribution of  1 ;   () = Pr(   1 ≤ ) =  1 (/  ).Clearly, if the tail of   decays as a power law of , then  1 decays in the same The solid line in each panel presents a performed log-log regression on the largest 30 percent of the observations.The estimated exponent  (the slope of the linear regression) is 2.37 ± 0.026 for the EGX 30, 2.45 ± 0.021 for the MOD1, and 2.39 ± 0.02 for the MOD2.These are close to the results obtained for empirical financial data.
manner.One way to quantify the self-similarity property is to estimate the so-called scaling exponent (also called selfsimilarity parameter).Following Peng et al. [57], scaling exponents that quantify power-law autocorrelations are computed using detrended fluctuation analysis (DFA) 12 .Figure 7 displays the estimation of the scaling exponent for raw   and absolute  || returns for (a) the EGX 30, (b) the MOD1, and (c) the MOD2, respectively.Note linear relationship on a log-log scale between the average fluctuation () and the time scale, where  indicates the presence of scaling in all the time series at hand.A value of  = 0.5 corresponds to a white-noise process, while 0.5 <  < 1 indicates long-range power-law autocorrelations.Finally, 0 <  < 0.5 indicates that large and small changes of the time series are more likely to alternate.
The   yields a value of 0.49 for the MOD1 and a value of 0.43 for the MOD2, which are close to that of 0.57 for the EGX 30, which indicate white-noise processes.The scaling exponent  || reveals a value of 0.88 for the MOD1 and a value of 0.84 for the MOD2, which are in line with Figure 6: The autocorrelation functions of raw and absolute returns, respectively, for (a) the EGX 30, (b) the MOD1, and (c) the MOD2.From Panel (a), the EGX 30 raw returns show autocorrelation coefficients that are not significant for almost all lags except for the first lag.However, the absolute return time series reveal autocorrelation coefficients that are significant for up to 100 lags.In Panels (a) and (b), furthermore, the raw returns display autocorrelation coefficients that are not significant for up to 100 lags while the absolute returns show significant long memory effects for more than 60. that of 0.81 for the EGX 30, showing long-range power-law autocorrelations in absolute returns for the three time series under investigation.
Finally, Figure 8 depicts the dynamics of the adaptive belief system for (a) the MOD1 and (b) the MOD2, respectively.We observe the swings between the trading strategies, technical analysis (black region), fundamental analysis (grey region), and no-trade (white region); there is no particular strategy that dominates the others.The average weight of each strategy for the MOD2 (MOD1) is    ≈ 27 (33) percent,    ≈ 39 (37) percent, and  0  ≈ 34 (30) percent; these results indicate that loss aversion behavioural bias reduces fraction of agents in the chartist group.
Note the price appreciations between periods 3650 and 3800 in Figures 1(b) and 1(c) correspond to the same periods in Figures 8(a) and 8(b), respectively.We observe that chartist fractions in MARKET1 are much higher than that of MARKET2 which explain the further amplifying price movements.However, the ensuing destabilization is only temporary, as large deviations from the fundamental value are recognized as gain opportunities by fundamentalists whose actions then tend to stabilize the market.
To check the robustness of the MOD2 dynamics to different parameter settings, Figure 9 shows repetitions of simulation MOD2 with different parameter settings, using the same seeds of the random variables as in Figure 1.The four simulation runs are characterized by significant bubbles and crashes, volatility clustering, and endogenous competition between various trading strategies.We also observe periods of high volatility corresponding to the periods of large fractions of chartists in the market.
Summing up, features of the simulation run displayed in Figures 1-7 resemble the behaviour of the real data presented in the same figures remarkably well.Next, we check the robustness of these results by performing a comprehensive Monte Carlo analysis.Our analysis rests on 5000 simulation runs, each containing 4120 observations for the MOD1 and the MOD2.All simulation runs are based on the same parameter settings (presented in Table 1, except for ) with different seeds of the random variables.
Table 2 reports the mean, maximum, minimum, standard deviation, skewness, kurtosis, and Jarque-Bera (JB) 13 of the EGX 30 and estimates of the mean and the 5 percent, 25 percent, 50 percent, 75 percent, and 95 percent quantiles of these statistics for the MOD1 and the MOD2, respectively.Table 2 reveals, for instance, that estimates, for the MOD2, of the standard deviation hover between 0.020 percent and 0.026 percent in 90 percent of the cases.The reported standard deviation for the EGX 30 is quite close to these figures.However, estimates, for the MOD1, of the standard deviation hover between 0.021 percent and 0.027 percent in 90 percent of the cases, indicating larger degree of risk when the market is populated with loss-neutral chartists.
Note the estimates of the standardized third moment 14 , the skewness, for the MOD1 and the MOD2 indicate that only 25 percent of the cases are negatively skewed and this may due to the fatness of the return distribution.In addition, estimates of the mean and the quantiles of the kurtosis,  : Four repetitions of the simulation using different parameter values.Each set of the four panels shows from top to bottom the evolution of stock prices, the asset returns, and the market shares of chartists (black region), fundamentalists (grey region), and no-trade (white region), respectively.Table 2: Descriptive statistics.The table reports the mean, maximum, minimum, standard deviation, skewness, kurtosis, and Jarque-Bera (JB) of the EGX 30 and estimates of the mean and the 5 percent, 25 percent, 50 percent, 75 percent, and 95 percent quantiles of these statistics for the MOD1 and the MOD2, respectively.Computations are based on 5000 time series, each containing 4120 observations.the standardized fourth moment, are all greater than 3, which are higher than that of the normal distribution.However, the kurtosis of MOD2 is much higher than that for the MOD1, indicating fatter tail distributions of the returns under loss aversion than that under loss neutrality.Table 3 contains the Hill tail index estimators α for  ∈ {2.5, 5, 10} percent of the smallest (left-tail) and largest (right-tail) returns for the EGX 30 along with estimates of the mean, the 5 percent, 25 percent, 50 percent, 75 percent, and 95 percent quantiles of these statistics for the MOD1 and the MOD2, respectively.For the MOD2, average Hill tail-index estimates of the largest and smallest 10 percent observations are in line with those for the EGX 30.For instance, considering the smallest 5 percent of observations, estimates of the tail indices reveal values of 3.28 and 3.74 for the lower and upper quantile.These are in accordance with the reported value for the EGX 30 (3.32).In addition, taking the largest 5 percent of observations into account estimates of the tail indices equal 3.28 and 3.74 for the lower and upper quantile.The reported value for the EGX 30 (3.72) lies within this range.For the MOD1, however, the Hill tail index estimates are higher than those of the MOD2.For instance, taking the largest 5 percent of observations into account, we obtain tail indices equal to 3.31 and 3.80 for the lower and upper quantile.As stated before, lower values of the tail indices imply fatter tail.Therefore, we conclude that MOD2 generates realistic distribution of returns.

Series
To continue investigating the robustness of our results, Table 4 reports the autocorrelation function of raw returns AC   for lags  ∈ {1, 2, 3}, and the autocorrelation function of absolute returns AC  || for lags  ∈ {1, 20, 50, 100} for the EGX 30 along with estimates of the mean, the 5 percent, 25 || for lags  ∈ {1, 20, 50, 100} for the EGX 30 along with estimates of the mean, the 5 percent, 25 percent, 50 percent, 75 percent, and 95 percent quantiles of these statistics for the MOD1 and the MOD2, respectively.Computations are based on 5000 time series, each containing 4120 observations.

Series
Mean/quantile AC percent, 50 percent, 75 percent, and 95 percent quantiles of these statistics for the MOD1 and the MOD2, respectively.For the EGX 30, the correlation coefficient exhibits a high value on lag 1 of about 0.18, though the autocorrelation coefficients are not significant for the rest 100 lags.For the MOD1 and the MOD2, estimates of the autocorrelation coefficients AC   reveal that price increments are mainly uncorrelated.This is in accordance with most real financial markets, as future prices cannot be predicted [7].On the other hand, for the MOD2 (MOD1), autocorrelation coefficients AC  || show a median value of 0.28 (0.25) for the first lag, which is quite close to that of the EGX 30 (0.29).No significant difference between the autocorrelation coefficients for the MOD1 or the MOD2 has been detected.Now, we check the robustness of the scaling power law.Table 5 reports the scaling exponent of raw returns   and the scaling exponent of absolute returns  || for the EGX 30 along with estimates of the mean, the 5 percent, 25 percent, 50 percent, 75 percent, and 95 percent quantiles of these statistics for the MOD1 and the MOD2, respectively.For the MOD2 (MOD1)   is equal to 0.44 (0.44) and 0.51 (0.51) for the lower and upper quantile, which are close to that for the EGX 30 (0.57).This is in good agreement with absence of long memory in empirical financial returns and implies a small degree for predicting price changes.In addition, for the MOD2 (MOD1), estimates of  || , for instance, hover between 0.80 (0.79) and 0.93 (0.92) in 90 percent of the cases, which are close to the value reported for the EGX 30 (0.81).These values show persistent long-range autocorrelation in absolute return series.Also, no significant difference between the scaling exponents for the MOD1 or the MOD2 has been detected.
To summarize our results so far, the illustrated figures and the performed Monte Carlo analysis show that MARKET2 is able to generate return time series possessing detailed stylized facts of real financial data.These properties include fattailed return distributions, absence of autocorrelation in raw returns, persistent long memory of volatility, excess volatility, volatility clustering, and power-law tails.
We perform a Monte Carlo analysis to check the robustness of the MOD1 and the MOD2 evolutionary dynamics.Table 6 reports estimates of the mean and the 5 percent, 25 percent, 50 percent, 75 percent, and 95 percent quantiles of the volatility, the distortion, and strategy weights:    ,    , and  0  for the MOD1 and the MOD2, respectively.For the MOD2, the average volatility is equal to 1.60 percent, which is slightly higher than that of the EGX 30 (1.23 percent).Moreover, estimates of the distortion hover between 8.02 percent and 16.44 percent in 90 percent of the cases.These values indicate a substantial boom-bust cycles in almost all simulation runs.Generally speaking, all estimates of the mean and quantiles reveal that agents prefer to follow the fundamental analysis the most, then the no-trade strategy, and the technical analysis the least.Now, the impact of loss aversion on the fractions of agents within each strategy block deserves greater attention.Is the technical analysis least appealing due to the loss aversion behavioural bias?What is the effect of loss aversion on the adaptive belief system and on the pricing dynamics?To answer these questions we consider the benchmark case,  = 1, where chartists perceive losses and gains symmetrically.Table 6 reveals that the average volatility is equal to 1.70 percent, which is higher than that of the MOD2.Also, estimates of the distortion hover between 8.80 percent and 17.80 percent in 90 percent of the cases.The median of the market shares are    = 34 percent,    = 36 percent, and  0  = 31 percent.Therefore, on average, no trading strategy is preferred over the others.This implies that the agents in MARKET2 prefer to follow fundamental analysis more than technical analysis due to the loss aversion behavioural bias.In addition to this, the distortion and volatility in MARKET1 seem to be higher than MARKET2 due to the higher fractions of the chartists.Obviously, the market populated with lossaverse chartists is more stable and resembles real markets behaviour.

Conclusions
In 1979, Kahneman and Tversky proposed their famous psychological theory, the prospect theory, in order to understand the psychological motivations for traders' behaviours.The prospect theory considers loss aversion as one of the main behavioural biases that affect traders' decisions under uncertainty.The theory states that traders recognize their losses more than twice their recognition of gains.
To increase our understanding of traders' behaviour and their adaptive beliefs, we develop an agent-based financial market model.Agent-based modelling provides the link between macro and micro dynamics.In our model, agents can trade following either stochastic technical or stochastic fundamental trading rules.While technical analysis builds decisions upon past price trends, fundamental analysis advises betting on mean reversion.Since chartists are loss averse, any losses following technical analysis cause a rapid switching to other groups.Price is adjusted by the market maker according to the net submitted orders without any intervention from her/him.
Simulations reveal that our model is capable of explaining a number of important stylized facts of stock markets, such as random walk price behaviour, bubbles and crashes, fat-tailed return distributions, excess volatility, and volatility clustering.In addition to these, we investigate the presence of power-law tails.The observed estimates of the exponent  of the Pareto distribution for the tails reveal that all results are in good overall agreement with a universal cubic law as proposed in the relevant literature [54].Another striking fact is the scaling power law (self-similarity) of the stock markets in the sense of Mandelbrot [55].To estimate scaling exponents that quantify power-law autocorrelations, we use detrended fluctuation analysis following Peng et al. [57].The observed scaling exponents indicate the presence of long-range powerlaw autocorrelations in the underlying dynamics.We propose that alternation between the periods of high and low volatility due to continuous belief adaptation yield the power-law autocorrelations in absolute returns and power-law tails in the distribution of returns.
The dynamics of our model can be summarized as follows.The farther the asset prices deviate from their fundamental values, the more aggressive the chartists will become.The increase in market shares of the chartists will increase the volatility causing a bubble or a crash to emerge.However, the loss aversion behavioural bias improve the market by minimizing its volatility and distortion.As the distortion reaches its maximum value the fundamental analysis becomes more appealing for traders to follow.The increase in switching to the fundamental analysis will pull asset prices to their fundamentals and the volatility diminishes.Due to the market dynamics, no trading strategy dominates the others.This causes substantial long memory effects in returns volatility.
To sum up, loss aversion directly affects the adaptive belief system as recognized losses stimulate chartists to adopt fundamental trading or stay inactive.This adaptation works for the market stability and prices efficiency.The simulation results proposed the agent-based model to successfully replicate the macro behaviour of real financial markets and, consequently, to enhance our understanding of asset pricing dynamics.Therefore, our model serves as a good test-bed for policy makers to explore the effect of different regulatory policies which improves the decision making process.

Figure 1 :Figure 2 :
Figure 1: The evolution of index prices (log-prices) of (a) EGX 30, (b) the MOD1, and (c) the MOD2, respectively.The dashed lines give a benchmark of the ±50 percent deviation from the fundamentals.(c) shows the extent of our model to produce random walk prices and bubbles and crashes.Comparing Panels (b) and (c) reveals that the model populated with loss aversion chartists is more stable than that with loss-neutral chartists.

Figure 3 :
Figure3: The probability density functions of returns.The panels show the empirical distribution of (a) the EGX 30, (b) the MOD1, and (c) the MOD2 returns.For comparison, the dashed lines give the probability density function of normally distributed returns with the same means and standard deviations.The three returns time series at hand exhibit fat-tailed return distributions, that is, a higher concentration around the mean, thinner shoulders, and more probability mass in their tails.

Figure 4 :
Figure 4: Log-log plot of the complement of the cumulative distribution of normalized (a) EGX 30, (b) MOD1, and (c) MOD2 returns, respectively.The three time series are scaled by their sample standard deviation and absolute returns have been taken to merge the positive and negative tails.For comparison, the dashed lines give the complements of the cumulative distributions of the standard normal distributions.The solid line in each panel presents a performed log-log regression on the largest 30 percent of the observations.The estimated exponent  (the slope of the linear regression) is 2.37 ± 0.026 for the EGX 30, 2.45 ± 0.021 for the MOD1, and 2.39 ± 0.02 for the MOD2.These are close to the results obtained for empirical financial data.

Figure 5 :
Figure 5: The Hill plot of the smallest 10 percent observations (on the left-hand sides) and the largest 10 percent observations (on the righthand sides) for (a) the EGX 30, (b) the MOD1, and (c) the MOD2.Here we plot Hill tail-index estimator α against .Regressions on the smallest (largest) 10 percent of the observations yield a Hill tail index estimator equal to 3.47±0.039(3.92±0.036)for the EGX 30, 2.86±0.042(3.51 ± 0.042) for the MOD1, and 3.26 ± 0.045 (2.89 ± 0.61) for the MOD2.

Figure 8 :
Figure 8: Dynamics of the adaptive belief system: chartists (black region), fundamentalists (grey region), and inactive traders (white region) for (a) the MOD1 and (b) the MOD2, respectively.

Figure 9
Figure9: Four repetitions of the simulation using different parameter values.Each set of the four panels shows from top to bottom the evolution of stock prices, the asset returns, and the market shares of chartists (black region), fundamentalists (grey region), and no-trade (white region), respectively.

Table 1 :
Parameters for the simulation of the financial markets under loss aversion behavioural bias.

Table 3 :
The Hill tail index estimator α for the left and right tails.The table reports the Hill tail index estimators α for  ∈ {2.5, 5, 10} percent of the smallest (left-tail) and largest (right-tail) returns of the EGX 30 along with estimates of the mean, the 5 percent, 25 percent, 50 percent, 75 percent, and 95 percent quantiles of these statistics for the MOD1 and the MOD2, respectively, with asymptotic 95% confidence intervals shown in brackets.Computations are based on 5000 time series, each containing 4120 observations.

Table 4 :
The autocorrelation functions of raw and absolute returns.The table contains the autocorrelation function of raw returns AC   for lags  ∈ {1, 2, 3}, and the autocorrelation function of absolute returns AC

Table 5 :
The Hurst index for the raw and absolute returns, respectively.The table reports the scaling exponent of raw returns   and the scaling exponent of absolute returns  || for the EGX 30 along with estimates of the mean, the 5 percent, 25 percent, 50 percent, 75 percent, and 95 percent quantiles of these statistics for the MOD1 and the MOD2, respectively, with asymptotic 95% confidence intervals shown in brackets.Computations are based on 5000 time series, each containing 4120 observations.

Table 6 :
Statistical properties and evolutionary dynamics of the agent-based model.The table contains estimates of the mean and the 5 percent, 25 percent, 50 percent, 75 percent, and 95 percent quantiles of the volatility, the distortion, and strategy weights:    ,