# Loss Aversion, Adaptive Beliefs, and Asset Pricing Dynamics

Authors: Kamal Samy Selim; Ahmed Okasha; Heba M. Ezzat
Journal: Advances in Decision Sciences
 (2015)

---

## Abstract

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.


---

## Body

## 1. 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 thetheory of rational expectations andefficient 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 tono trade theorems [1], which contradict the excessive trading volume observed in real financial markets. Moreover, the rational agent cannot survive in a heterogeneous world1. 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–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 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–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–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–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–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–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 Section2, 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.


## 2. 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 Section2.2, the detailed model is provided. Finally, the parameter settings are depicted in Section 2.3.


### 2.1. 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 stept
,
t
=
0,1
,
…
,
T, 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 timet
=
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.


### 2.2. 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 t
+
1 is given by(1)
p
t
+
1
=
p
t
+
a
w
t
c
D
t
c
+
w
t
f
D
t
f
+
α
t
,where a is a positive price settlement parameter, D
t
c and D
t
f are the orders submitted by chartists and fundamentalists, respectively, at time t, and w
t
c and w
t
f are the weights of technical strategy and fundamental strategy, respectively, at time t. In order to make our assumptions close to the real market, the noise terms α
t are added to catch any random factors affecting the price settlement process. It is assumed that α
t
,
t
=
1,2
,
…
,
T 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 t can be written as(2)
D
t
c
=
b
p
t
-
p
t
-
1
+
β
t
,where b 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 β
t
,
t
=
1,2
,
…
,
T 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 t can be formalized as (3)
D
t
f
=
c
F
t
-
p
t
+
γ
t
,where c 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. F
t
2 are log-fundamental values (or simply fundamental values) [31]. γ
t is introduced to capture additional random orders of fundamental trading rules. γ
t
,
t
=
1,2
,
…
,
T 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 w
t
=
w
t
c
,
w
t
f
,
w
t
0, where w
t
0 represents the fraction of inactive agents and w
t
c
,
w
t
f 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:(4)
A
t
c
=
exp
⁡
p
t
-
exp
⁡
p
t
-
1
D
t
-
2
c
+
m
A
t
-
1
c
(5)
A
t
f
=
exp
⁡
p
t
-
exp
⁡
p
t
-
1
D
t
-
2
f
+
m
A
t
-
1
f
(6)
A
t
0
=
0
,where A
t
c, A
t
f, and A
t
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 t
-
2 are executed at the price declared in period t
-
1. The gains or losses depend on the price declared in period t. The second term of the right-hand sides of (4) and (5) represents agents’ memory, where 0
≤
m
≤
1 is the memory parameter that measures the speed of recognizing current myopic profits. For m
=
0, agent has no memory, while for m
=
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(7)
v
c
=
A
t
c
i
f
A
t
c
≥
0
λ
A
t
c
i
f
A
t
c
<
0
,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
c
=
A
t
c; we call this case loss-neutral chartists.Following Manski and McFadden [42], the market share of each strategy can be obtained by the discrete choice model3 as follows:(8)
w
t
c
=
exp
⁡
r
v
c
exp
⁡
r
v
c
+
exp
⁡
r
A
t
f
+
exp
⁡
r
A
t
0
,
w
t
f
=
exp
⁡
r
A
t
f
exp
⁡
r
v
c
+
exp
⁡
r
A
t
f
+
exp
⁡
r
A
t
0
,
w
t
0
=
exp
⁡
r
A
t
0
exp
⁡
r
v
c
+
exp
⁡
r
A
t
f
+
exp
⁡
r
A
t
0
.The higher attractive strategy will be chosen by the agents. The parameterr, 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.


### 2.3. 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 autocorrelation4 of raw returns5 close to zero, parameters b and c 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 short-term 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 m is assumed to be near one, so the agents have good memory. Also, the value of r 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.Table 1
Parameters for the simulation of the financial markets under loss aversion behavioural bias.
Parameter
Value
Description of parameter
a
1
Price settlement parameter
b
0.04
Extrapolating parameter
c
0.04
Reverting parameter
m
0.975
Memory parameter
r
300
Intensity of choice parameter
σ
α
0.01
Standard deviation of the random factors affect the price settlement process
σ
β
0.05
Standard deviation of the additional random orders of technical trading
σ
γ
0.01
Standard deviation of the additional random orders of fundamental trading
λ
2.25
Loss aversion parameter


## 2.1. 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 stept
,
t
=
0,1
,
…
,
T, 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 timet
=
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.


## 2.2. 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 t
+
1 is given by(1)
p
t
+
1
=
p
t
+
a
w
t
c
D
t
c
+
w
t
f
D
t
f
+
α
t
,where a is a positive price settlement parameter, D
t
c and D
t
f are the orders submitted by chartists and fundamentalists, respectively, at time t, and w
t
c and w
t
f are the weights of technical strategy and fundamental strategy, respectively, at time t. In order to make our assumptions close to the real market, the noise terms α
t are added to catch any random factors affecting the price settlement process. It is assumed that α
t
,
t
=
1,2
,
…
,
T 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 t can be written as(2)
D
t
c
=
b
p
t
-
p
t
-
1
+
β
t
,where b 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 β
t
,
t
=
1,2
,
…
,
T 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 t can be formalized as (3)
D
t
f
=
c
F
t
-
p
t
+
γ
t
,where c 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. F
t
2 are log-fundamental values (or simply fundamental values) [31]. γ
t is introduced to capture additional random orders of fundamental trading rules. γ
t
,
t
=
1,2
,
…
,
T 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 w
t
=
w
t
c
,
w
t
f
,
w
t
0, where w
t
0 represents the fraction of inactive agents and w
t
c
,
w
t
f 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:(4)
A
t
c
=
exp
⁡
p
t
-
exp
⁡
p
t
-
1
D
t
-
2
c
+
m
A
t
-
1
c
(5)
A
t
f
=
exp
⁡
p
t
-
exp
⁡
p
t
-
1
D
t
-
2
f
+
m
A
t
-
1
f
(6)
A
t
0
=
0
,where A
t
c, A
t
f, and A
t
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 t
-
2 are executed at the price declared in period t
-
1. The gains or losses depend on the price declared in period t. The second term of the right-hand sides of (4) and (5) represents agents’ memory, where 0
≤
m
≤
1 is the memory parameter that measures the speed of recognizing current myopic profits. For m
=
0, agent has no memory, while for m
=
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(7)
v
c
=
A
t
c
i
f
A
t
c
≥
0
λ
A
t
c
i
f
A
t
c
<
0
,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
c
=
A
t
c; we call this case loss-neutral chartists.Following Manski and McFadden [42], the market share of each strategy can be obtained by the discrete choice model3 as follows:(8)
w
t
c
=
exp
⁡
r
v
c
exp
⁡
r
v
c
+
exp
⁡
r
A
t
f
+
exp
⁡
r
A
t
0
,
w
t
f
=
exp
⁡
r
A
t
f
exp
⁡
r
v
c
+
exp
⁡
r
A
t
f
+
exp
⁡
r
A
t
0
,
w
t
0
=
exp
⁡
r
A
t
0
exp
⁡
r
v
c
+
exp
⁡
r
A
t
f
+
exp
⁡
r
A
t
0
.The higher attractive strategy will be chosen by the agents. The parameterr, 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.


## 2.3. 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 autocorrelation4 of raw returns5 close to zero, parameters b and c 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 short-term 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 m is assumed to be near one, so the agents have good memory. Also, the value of r 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.Table 1
Parameters for the simulation of the financial markets under loss aversion behavioural bias.
Parameter
Value
Description of parameter
a
1
Price settlement parameter
b
0.04
Extrapolating parameter
c
0.04
Reverting parameter
m
0.975
Memory parameter
r
300
Intensity of choice parameter
σ
α
0.01
Standard deviation of the random factors affect the price settlement process
σ
β
0.05
Standard deviation of the additional random orders of technical trading
σ
γ
0.01
Standard deviation of the additional random orders of fundamental trading
λ
2.25
Loss aversion parameter


## 3. Adaptive Beliefs and Asset Pricing Dynamics

In this section we discuss the dynamics of our model by simulation. In Section3.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.


### 3.1. 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 p
t, p
t
-
1, w
t
c
,
w
t
f, w
t
0, D
t
-
2
c, D
t
-
2
f
,
D
t
c, D
t
f, A
t
-
1
c, A
t
-
1
f, A
t
c, and A
t
f 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.Algorithm 1:Pseudocode for the proposed artificial financial market.
(1)Initialize
(2)repeat  n times
(3)for
t = 2 : T  do
(4)submit orders use (2) or (3)
(5)evaluate trading rules use (4), (5) and (6)
(6)If[A
t
c
≥
0]then
v
c
=
A
t
c;
(7)else
v
c
=
λ
A
t
c;
(8)end if
(9)Calculate weights use (8)
(10)Update price use (1)
(11)end do
(12)end loop


### 3.2. 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–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 website6. 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. Figure1 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
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.
(a)
EGX 30
(b)
MOD1 (λ
=
1)
(c)
MOD2 (λ
=
2.25)Figure1(a) illustrates the behaviour of EGX 30 daily quotes, which displays significant bubbles and crashes. For example, we observe strong price appreciations between May 2006 and March 2008. Over this period, the EGX 30 rose from 6000 to 11937 points, gaining about 61 percent of its value. After March 2008, however, the price started to drop sharply. In January 2009, the price of the EGX 30 fell below 4596 points, losing about 56 percent of its value7. A detailed history of financial crises can be found in Griffith-Jones et al. [47].From Figure1(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 quality8 by reducing distortion (d
i
s
t
=
1
/
T
∑
t
=
1
T
F
t
-
p
t) [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.Figure2 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 (v
o
l
=
1
/
T
∑
t
=
1
T
r
t), 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 markets9; 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.Figure 2
The returns of (a) the EGX 30, (b) the MOD1, and (c) MOD2. The panels give evidence for excessive prices volatility and clustered volatility properties. The grey rectangles exemplify periods of high volatility. The clustered volatility property can be seen from the presence of sustained periods of high or low volatility.
(a)
EGX 30
(b)
MOD1 (λ
=
1)
(c)
MOD2 (λ
=
2.25)Figures2(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. Figure3 presents an evidence for this statistical property. The probability density functions of (a) empirical EGX 30, (b) MOD1, and (c) MOD2 returns, respectively, (solid lines) are compared with those of normally 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.Figure 3
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.
(a)
EGX 30
(b)
MOD1 (λ
=
1)
(c)
MOD2 (λ
=
2.25)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.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.
(a)
EGX 30
(b)
MOD1 (λ
=
1)
(c)
MOD2 (λ
=
2.25)Now, the exponentα of the Pareto distribution for the tails is defined as P
r
⁡
(
r
t
>
x
)
≈
c
x
-
α. 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 α
^
k 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 estimator10 [53] α
^
k, to estimate the tail index. Figure 5 displays the estimated values of α
^
k, for the smallest and largest k 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 auniversal cubic law (α
≈
3) as proposed in the relevant literature [54].Figure 5
The Hill plot of the smallest 10 percent observations (on the left-hand sides) and the largest 10 percent observations (on the right-hand sides) for (a) the EGX 30, (b) the MOD1, and (c) the MOD2. Here we plot Hill tail-index estimatorα
^
k against k. 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.
(a)
EGX 30
(b)
MOD1 (λ
=
1)
(c)
MOD2 (λ
=
2.25)Figure6 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.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.
(a)
EGX 30
(b)
MOD1 (λ
=
1)
(c)
MOD2 (λ
=
2.25)Note that Figures6(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 self-similarity in the sense of Mandelbrot [55]. A nonstationary stochastic process11
(
X
t
)
t
≥
0 is said to be a self-similar if there exists H
>
0 such that the processes (
X
t
)
t
≥
0 and (
t
H
X
1
)
t
≥
0 have the same distribution [56]. Therefore, the distribution of X
t for any t can be fully determined by the distribution of X
1; F
t
x
=
Pr
⁡
t
H
X
1
≤
x
=
F
1
(
x
/
t
H
). Clearly, if the tail of F
t decays as a power law of x, then F
1 decays in the same manner. One way to quantify the self-similarity property is to estimate the so-called scaling exponent (also called self-similarity 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 H
r and absolute H
r 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 F
n and the time scale, where n indicates the presence of scaling in all the time series at hand. A value of H
=
0.5 corresponds to a white-noise process, while 0.5
<
H
<
1 indicates long-range power-law autocorrelations. Finally, 0
<
H
<
0.5 indicates that large and small changes of the time series are more likely to alternate.Figure 7
Estimation of self-similarity parameterH. for raw and absolute returns, respectively, for (a) the EGX 30, (b) the MOD1, and (c) the MOD2, respectively. To estimate the self-similarity parameter we follow Peng et al. [57] and perform a detrended fluctuation analysis (DFA). A linear relationship on a log-log scale plot indicates the presence of power-law scaling. The slope of the line relating l
o
g
⁡
(
F
n
) to l
o
g
⁡
(
n
) is the estimated scaling exponent, n
=
2
3
,
…
,
2
10. The scaling exponent H
r yields a value of 0.57
±
0.025 for the EGX 30, 0.49
±
0.067 for the MOD1, and 0.43
±
0.054 for the MOD2, which are close to the theoretically expected value of the white-noise process. The scaling exponent H
r reveals a value of 0.81
±
0.056 for the EGX 30, 0.88
±
0.087 for the MOD1, and 0.84
±
0.071 for the MOD2, which indicate persistent long-range (power-law) autocorrelations in absolute returns for the three time series under investigation.
(a)
EGX 30
(b)
MOD1 (λ
=
1)
(c)
MOD2 (λ
=
2.25)TheH
r 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 H
r reveals a value of 0.88 for the MOD1 and a value of 0.84 for the MOD2, which are in line with 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, Figure8 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 w
-
t
c
≈
27 (33) percent, w
-
t
f
≈
39 (37) percent, and w
-
t
0
≈
34 (30) percent; these results indicate that loss aversion behavioural bias reduces fraction of agents in the chartist group.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.
(a)
MOD1 (λ
=
1)
(b)
MOD2 (λ
=
2.25)Note the price appreciations between periods 3650 and 3800 in Figures1(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, Figure9 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.Figure 9
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.
(a)
b
=
0.06
,
c
=
0.06
(b)
m
=
0.965
(c)
r
=
400
(d)
a
=
0.90Summing up, features of the simulation run displayed in Figures1–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.Table2 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.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.
Series
Mean/quantile
Mean
Max.
Min.
Std. dev.
Skew.
Kurt.
JB
EGX 30
5.39∗ 10−4
0.18
−0.18
0.018
−0.33
12.04
14101.9
MOD1  (λ
=
1)
Mean
7.36∗ 10−7
0.14
−0.14
0.024
0.01
3.69
—
0.05
−6.73∗ 10−5
0.11
−0.18
0.021
−0.23
2.70
—
0.25
−2.02∗ 10−5
0.13
−0.15
0.023
−0.08
3.21
—
0.50
−7.27∗ 10−7
0.14
−0.14
0.024
0.01
3.64
—
0.75
1.94∗ 10−5
0.15
−0.12
0.025
0.11
4.10
—
0.95
6.82∗ 10−5
0.18
−0.11
0.027
0.25
4.89
—
MOD2  (λ
=
2.25)
Mean
−6.19∗ 10−7
0.14
−0.14
0.023
0.01
4.39
—
0.05
−6.82∗ 10−5
0.11
−0.18
0.020
−0.25
3.28
—
0.25
−1.86∗ 10−5
0.13
−0.15
0.021
−0.10
3.85
—
0.50
−7.31∗ 10−7
0.14
−0.14
0.023
0.01
4.32
—
0.75
1.57∗ 10−5
0.15
−0.13
0.024
0.01
4.82
—
0.95
6.08∗ 10−5
0.18
−0.11
0.026
0.27
5.77
—Note the estimates of the standardized third moment14, 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, 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.Table3 contains the Hill tail index estimators α
^
k for k
∈
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.Table 3
The Hill tail index estimatorα
^
k for the left and right tails. The table reports the Hill tail index estimators α
^
k for k
∈
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.
Series
Mean/quantile
Left-tail exponent
Right-tail exponent
α
^
2.5
%
α
^
5
%
α
^
10
%
α
^
2.5
%
α
^
5
%
α
^
10
%
EGX 30
3.39 (3.24, 3.55)
3.32 (3.24, 3.39)
3.47 (3.43, 3.51)
3.56 (3.43, 3.68)
3.72 (3.66, 3.78)
3.92 (3.88, 3.95)
MOD1  (λ
=
1
)
Mean
3.29
3.54
3.45
3.31
3.56
3.47
0.05
2.69
2.98
3.01
2.71
3.00
3.02
0.25
3.02
3.29
3.24
3.05
3.31
3.27
0.50
3.27
3.53
3.43
3.28
3.55
3.45
0.75
3.53
3.78
3.63
3.55
3.80
3.66
0.95
3.93
4.17
3.95
3.96
4.18
3.97
MOD2 (λ
=
2.25)
Mean
3.27
3.52
3.40
3.38
3.61
3.46
0.05
2.68
2.97
2.96
2.68
2.97
2.96
0.25
3.01
3.28
3.21
3.01
3.28
3.20
0.50
3.25
3.50
3.39
3.25
3.50
3.39
0.75
3.52
3.74
3.59
3.52
3.74
3.59
0.95
3.90
4.13
3.90
3.90
4.13
3.90To continue investigating the robustness of our results, Table4 reports the autocorrelation function of raw returns A
C
r
l for lags l
∈
1,2
,
3, and the autocorrelation function of absolute returns A
C
r
l for lags l
∈
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. 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 A
C
r
l 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 A
C
r
l 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.Table 4
The autocorrelation functions of raw and absolute returns. The table contains the autocorrelation function of raw returnsA
C
r
l for lags l
∈
1,2
,
3, and the autocorrelation function of absolute returns A
C
r
l for lags l
∈
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
A
C
r
1
A
C
r
2
A
C
r
3
A
C
r
1
A
C
r
20
A
C
r
50
A
C
r
100
EGX 30
0.18
0.02
0.04
0.29
0.09
0.05
0.03
MOD1 (λ
=
1)
Mean
0.02
0.01
0.003
0.25
0.16
0.08
0.02
0.05
−0.02
−0.03
−0.04
0.20
0.10
0.02
−0.03
0.25
0.01
−0.01
−0.01
0.23
0.13
0.05
−0.003
0.50
0.02
0.01
0.004
0.25
0.16
0.07
0.02
0.75
0.04
0.02
0.02
0.27
0.18
0.10
0.04
0.95
0.07
0.05
0.04
0.30
0.21
0.14
0.07
MOD2 (λ
=
2.25)
Mean
0.02
0.01
0.004
0.28
0.17
0.08
0.02
0.05
−0.02
−0.04
−0.04
0.23
0.11
0.02
−0.03
0.25
0.004
−0.01
−0.01
0.26
0.15
0.05
−0.001
0.50
0.02
0.01
0.004
0.28
0.17
0.08
0.02
0.75
0.04
0.02
0.02
0.30
0.20
0.11
0.04
0.95
0.07
0.05
0.05
0.33
0.23
0.15
0.09Now, we check the robustness of the scaling power law. Table5 reports the scaling exponent of raw returns H
r and the scaling exponent of absolute returns H
r 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) H
r 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 H
r, 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.Table 5
The Hurst index for the raw and absolute returns, respectively. The table reports the scaling exponent of raw returnsH
r  and the scaling exponent of absolute returns H
r 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.
Series
Mean/quantile
H
r
H
r
EGX 30
0.57 (0.55, 0.59)
0.81 (0.76, 0.87)
MOD1 (λ
=
1)
Mean
0.48
0.86
0.05
0.41
0.79
0.25
0.44
0.83
0.50
0.47
0.86
0.75
0.51
0.89
0.95
0.57
0.92
MOD2 (λ
=
2.25)
Mean
0.48
0.87
0.05
0.40
0.80
0.25
0.44
0.85
0.50
0.47
0.88
0.75
0.51
0.90
0.95
0.57
0.93To 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 fat-tailed 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. Table6 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: w
t
c, w
t
f, and w
t
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.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:w
t
c, w
t
f, and w
t
0 for the MOD1 and the MOD2, respectively. Computations are based on 5000 time series, each containing 4120 observations.
Series
Mean/quantile
Volatility
Distortion
w
t
c
w
t
f
w
t
0
MOD1(λ
=
1)
Mean
1.70
12.44
34
35
30
0.05
1.51
8.80
29
33
27
0.25
1.61
10.46
32
34
29
0.50
1.70
12.02
34
36
31
0.75
1.79
13.96
36
37
32
0.95
1.92
17.80
40
38
34
MOD2(λ
=
2.25)
Mean
1.60
11.53
29
38
33
0.05
1.40
8.02
23
35
29
0.25
1.50
9.65
26
37
32
0.50
1.59
11.07
29
38
33
0.75
1.68
12.91
31
39
35
0.95
1.82
16.44
35
41
37Now, 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 w
t
c
=
34 percent, w
t
f
=
36 percent, and w
t
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 loss-averse chartists is more stable and resembles real markets behaviour.


## 3.1. 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 p
t, p
t
-
1, w
t
c
,
w
t
f, w
t
0, D
t
-
2
c, D
t
-
2
f
,
D
t
c, D
t
f, A
t
-
1
c, A
t
-
1
f, A
t
c, and A
t
f 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.Algorithm 1:Pseudocode for the proposed artificial financial market.
(1)Initialize
(2)repeat  n times
(3)for
t = 2 : T  do
(4)submit orders use (2) or (3)
(5)evaluate trading rules use (4), (5) and (6)
(6)If[A
t
c
≥
0]then
v
c
=
A
t
c;
(7)else
v
c
=
λ
A
t
c;
(8)end if
(9)Calculate weights use (8)
(10)Update price use (1)
(11)end do
(12)end loop


## 3.2. 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–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 website6. 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. Figure1 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
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.
(a)
EGX 30
(b)
MOD1 (λ
=
1)
(c)
MOD2 (λ
=
2.25)Figure1(a) illustrates the behaviour of EGX 30 daily quotes, which displays significant bubbles and crashes. For example, we observe strong price appreciations between May 2006 and March 2008. Over this period, the EGX 30 rose from 6000 to 11937 points, gaining about 61 percent of its value. After March 2008, however, the price started to drop sharply. In January 2009, the price of the EGX 30 fell below 4596 points, losing about 56 percent of its value7. A detailed history of financial crises can be found in Griffith-Jones et al. [47].From Figure1(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 quality8 by reducing distortion (d
i
s
t
=
1
/
T
∑
t
=
1
T
F
t
-
p
t) [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.Figure2 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 (v
o
l
=
1
/
T
∑
t
=
1
T
r
t), 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 markets9; 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.Figure 2
The returns of (a) the EGX 30, (b) the MOD1, and (c) MOD2. The panels give evidence for excessive prices volatility and clustered volatility properties. The grey rectangles exemplify periods of high volatility. The clustered volatility property can be seen from the presence of sustained periods of high or low volatility.
(a)
EGX 30
(b)
MOD1 (λ
=
1)
(c)
MOD2 (λ
=
2.25)Figures2(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. Figure3 presents an evidence for this statistical property. The probability density functions of (a) empirical EGX 30, (b) MOD1, and (c) MOD2 returns, respectively, (solid lines) are compared with those of normally 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.Figure 3
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.
(a)
EGX 30
(b)
MOD1 (λ
=
1)
(c)
MOD2 (λ
=
2.25)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.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.
(a)
EGX 30
(b)
MOD1 (λ
=
1)
(c)
MOD2 (λ
=
2.25)Now, the exponentα of the Pareto distribution for the tails is defined as P
r
⁡
(
r
t
>
x
)
≈
c
x
-
α. 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 α
^
k 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 estimator10 [53] α
^
k, to estimate the tail index. Figure 5 displays the estimated values of α
^
k, for the smallest and largest k 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 auniversal cubic law (α
≈
3) as proposed in the relevant literature [54].Figure 5
The Hill plot of the smallest 10 percent observations (on the left-hand sides) and the largest 10 percent observations (on the right-hand sides) for (a) the EGX 30, (b) the MOD1, and (c) the MOD2. Here we plot Hill tail-index estimatorα
^
k against k. 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.
(a)
EGX 30
(b)
MOD1 (λ
=
1)
(c)
MOD2 (λ
=
2.25)Figure6 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.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.
(a)
EGX 30
(b)
MOD1 (λ
=
1)
(c)
MOD2 (λ
=
2.25)Note that Figures6(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 self-similarity in the sense of Mandelbrot [55]. A nonstationary stochastic process11
(
X
t
)
t
≥
0 is said to be a self-similar if there exists H
>
0 such that the processes (
X
t
)
t
≥
0 and (
t
H
X
1
)
t
≥
0 have the same distribution [56]. Therefore, the distribution of X
t for any t can be fully determined by the distribution of X
1; F
t
x
=
Pr
⁡
t
H
X
1
≤
x
=
F
1
(
x
/
t
H
). Clearly, if the tail of F
t decays as a power law of x, then F
1 decays in the same manner. One way to quantify the self-similarity property is to estimate the so-called scaling exponent (also called self-similarity 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 H
r and absolute H
r 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 F
n and the time scale, where n indicates the presence of scaling in all the time series at hand. A value of H
=
0.5 corresponds to a white-noise process, while 0.5
<
H
<
1 indicates long-range power-law autocorrelations. Finally, 0
<
H
<
0.5 indicates that large and small changes of the time series are more likely to alternate.Figure 7
Estimation of self-similarity parameterH. for raw and absolute returns, respectively, for (a) the EGX 30, (b) the MOD1, and (c) the MOD2, respectively. To estimate the self-similarity parameter we follow Peng et al. [57] and perform a detrended fluctuation analysis (DFA). A linear relationship on a log-log scale plot indicates the presence of power-law scaling. The slope of the line relating l
o
g
⁡
(
F
n
) to l
o
g
⁡
(
n
) is the estimated scaling exponent, n
=
2
3
,
…
,
2
10. The scaling exponent H
r yields a value of 0.57
±
0.025 for the EGX 30, 0.49
±
0.067 for the MOD1, and 0.43
±
0.054 for the MOD2, which are close to the theoretically expected value of the white-noise process. The scaling exponent H
r reveals a value of 0.81
±
0.056 for the EGX 30, 0.88
±
0.087 for the MOD1, and 0.84
±
0.071 for the MOD2, which indicate persistent long-range (power-law) autocorrelations in absolute returns for the three time series under investigation.
(a)
EGX 30
(b)
MOD1 (λ
=
1)
(c)
MOD2 (λ
=
2.25)TheH
r 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 H
r reveals a value of 0.88 for the MOD1 and a value of 0.84 for the MOD2, which are in line with 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, Figure8 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 w
-
t
c
≈
27 (33) percent, w
-
t
f
≈
39 (37) percent, and w
-
t
0
≈
34 (30) percent; these results indicate that loss aversion behavioural bias reduces fraction of agents in the chartist group.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.
(a)
MOD1 (λ
=
1)
(b)
MOD2 (λ
=
2.25)Note the price appreciations between periods 3650 and 3800 in Figures1(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, Figure9 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.Figure 9
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.
(a)
b
=
0.06
,
c
=
0.06
(b)
m
=
0.965
(c)
r
=
400
(d)
a
=
0.90Summing up, features of the simulation run displayed in Figures1–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.Table2 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.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.
Series
Mean/quantile
Mean
Max.
Min.
Std. dev.
Skew.
Kurt.
JB
EGX 30
5.39∗ 10−4
0.18
−0.18
0.018
−0.33
12.04
14101.9
MOD1  (λ
=
1)
Mean
7.36∗ 10−7
0.14
−0.14
0.024
0.01
3.69
—
0.05
−6.73∗ 10−5
0.11
−0.18
0.021
−0.23
2.70
—
0.25
−2.02∗ 10−5
0.13
−0.15
0.023
−0.08
3.21
—
0.50
−7.27∗ 10−7
0.14
−0.14
0.024
0.01
3.64
—
0.75
1.94∗ 10−5
0.15
−0.12
0.025
0.11
4.10
—
0.95
6.82∗ 10−5
0.18
−0.11
0.027
0.25
4.89
—
MOD2  (λ
=
2.25)
Mean
−6.19∗ 10−7
0.14
−0.14
0.023
0.01
4.39
—
0.05
−6.82∗ 10−5
0.11
−0.18
0.020
−0.25
3.28
—
0.25
−1.86∗ 10−5
0.13
−0.15
0.021
−0.10
3.85
—
0.50
−7.31∗ 10−7
0.14
−0.14
0.023
0.01
4.32
—
0.75
1.57∗ 10−5
0.15
−0.13
0.024
0.01
4.82
—
0.95
6.08∗ 10−5
0.18
−0.11
0.026
0.27
5.77
—Note the estimates of the standardized third moment14, 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, 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.Table3 contains the Hill tail index estimators α
^
k for k
∈
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.Table 3
The Hill tail index estimatorα
^
k for the left and right tails. The table reports the Hill tail index estimators α
^
k for k
∈
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.
Series
Mean/quantile
Left-tail exponent
Right-tail exponent
α
^
2.5
%
α
^
5
%
α
^
10
%
α
^
2.5
%
α
^
5
%
α
^
10
%
EGX 30
3.39 (3.24, 3.55)
3.32 (3.24, 3.39)
3.47 (3.43, 3.51)
3.56 (3.43, 3.68)
3.72 (3.66, 3.78)
3.92 (3.88, 3.95)
MOD1  (λ
=
1
)
Mean
3.29
3.54
3.45
3.31
3.56
3.47
0.05
2.69
2.98
3.01
2.71
3.00
3.02
0.25
3.02
3.29
3.24
3.05
3.31
3.27
0.50
3.27
3.53
3.43
3.28
3.55
3.45
0.75
3.53
3.78
3.63
3.55
3.80
3.66
0.95
3.93
4.17
3.95
3.96
4.18
3.97
MOD2 (λ
=
2.25)
Mean
3.27
3.52
3.40
3.38
3.61
3.46
0.05
2.68
2.97
2.96
2.68
2.97
2.96
0.25
3.01
3.28
3.21
3.01
3.28
3.20
0.50
3.25
3.50
3.39
3.25
3.50
3.39
0.75
3.52
3.74
3.59
3.52
3.74
3.59
0.95
3.90
4.13
3.90
3.90
4.13
3.90To continue investigating the robustness of our results, Table4 reports the autocorrelation function of raw returns A
C
r
l for lags l
∈
1,2
,
3, and the autocorrelation function of absolute returns A
C
r
l for lags l
∈
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. 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 A
C
r
l 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 A
C
r
l 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.Table 4
The autocorrelation functions of raw and absolute returns. The table contains the autocorrelation function of raw returnsA
C
r
l for lags l
∈
1,2
,
3, and the autocorrelation function of absolute returns A
C
r
l for lags l
∈
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
A
C
r
1
A
C
r
2
A
C
r
3
A
C
r
1
A
C
r
20
A
C
r
50
A
C
r
100
EGX 30
0.18
0.02
0.04
0.29
0.09
0.05
0.03
MOD1 (λ
=
1)
Mean
0.02
0.01
0.003
0.25
0.16
0.08
0.02
0.05
−0.02
−0.03
−0.04
0.20
0.10
0.02
−0.03
0.25
0.01
−0.01
−0.01
0.23
0.13
0.05
−0.003
0.50
0.02
0.01
0.004
0.25
0.16
0.07
0.02
0.75
0.04
0.02
0.02
0.27
0.18
0.10
0.04
0.95
0.07
0.05
0.04
0.30
0.21
0.14
0.07
MOD2 (λ
=
2.25)
Mean
0.02
0.01
0.004
0.28
0.17
0.08
0.02
0.05
−0.02
−0.04
−0.04
0.23
0.11
0.02
−0.03
0.25
0.004
−0.01
−0.01
0.26
0.15
0.05
−0.001
0.50
0.02
0.01
0.004
0.28
0.17
0.08
0.02
0.75
0.04
0.02
0.02
0.30
0.20
0.11
0.04
0.95
0.07
0.05
0.05
0.33
0.23
0.15
0.09Now, we check the robustness of the scaling power law. Table5 reports the scaling exponent of raw returns H
r and the scaling exponent of absolute returns H
r 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) H
r 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 H
r, 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.Table 5
The Hurst index for the raw and absolute returns, respectively. The table reports the scaling exponent of raw returnsH
r  and the scaling exponent of absolute returns H
r 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.
Series
Mean/quantile
H
r
H
r
EGX 30
0.57 (0.55, 0.59)
0.81 (0.76, 0.87)
MOD1 (λ
=
1)
Mean
0.48
0.86
0.05
0.41
0.79
0.25
0.44
0.83
0.50
0.47
0.86
0.75
0.51
0.89
0.95
0.57
0.92
MOD2 (λ
=
2.25)
Mean
0.48
0.87
0.05
0.40
0.80
0.25
0.44
0.85
0.50
0.47
0.88
0.75
0.51
0.90
0.95
0.57
0.93To 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 fat-tailed 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. Table6 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: w
t
c, w
t
f, and w
t
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.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:w
t
c, w
t
f, and w
t
0 for the MOD1 and the MOD2, respectively. Computations are based on 5000 time series, each containing 4120 observations.
Series
Mean/quantile
Volatility
Distortion
w
t
c
w
t
f
w
t
0
MOD1(λ
=
1)
Mean
1.70
12.44
34
35
30
0.05
1.51
8.80
29
33
27
0.25
1.61
10.46
32
34
29
0.50
1.70
12.02
34
36
31
0.75
1.79
13.96
36
37
32
0.95
1.92
17.80
40
38
34
MOD2(λ
=
2.25)
Mean
1.60
11.53
29
38
33
0.05
1.40
8.02
23
35
29
0.25
1.50
9.65
26
37
32
0.50
1.59
11.07
29
38
33
0.75
1.68
12.91
31
39
35
0.95
1.82
16.44
35
41
37Now, 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 w
t
c
=
34 percent, w
t
f
=
36 percent, and w
t
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 loss-averse chartists is more stable and resembles real markets behaviour.


## 4. 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 power-law 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.



---

*Source: 971269-2015-10-08.xml*