Document Type : Original Article
Authors
 Saeideh Sarkamaryan ^{} ^{1}
 Ali Jafari ^{} ^{} ^{2}
 Abbasali Pooraghajan ^{2}
^{1} Ph.D. Candidate, Department of Accounting, Qaemshahr Branch, Islamic Azad University, Qaemshahr, Iran.
^{2} Assistant Professor, Department of Accounting, Qaemshahr Branch, Islamic Azad University, Qaemshahr, Iran.
Abstract
Although theoretical and empirical literature regarding the stylized facts shows evidence of their correlations to herding behavior in financial markets, the causes of such phenomena are still unknown. Using an agentbased model strengthened by the competition coevolution algorithm (STGP) technique, this study provides laboratory evidence on capital market dynamics and analyses the behavioral foundations of stylized facts such as fat tails, leverage effects, and volatility clustering. The simulated stock markets consist of two groups; the “Best agents”, which are a small portion of artificial agents, and the “Residual agents”, which are the main group of artificial agents. The best performance in terms of breeding fitness returns is the main feature of the “Best agents”. More, the size of the “Best Agents” group is specified as 2.5%, 5%, 10% &20% of the total population size. An agentbased model consists of two portions, a two thousand population of trader agents that each has its decisionmaking strategy, and a virtual market that creates the trading strategies. Then the model evolved step by step using a feed with real quotes of the financial instruments by Adaptive Modeler. A training period is considered 2500 bars (started in November 2003), and the test period started in December 2013. The observation shows that the herding behavior in the price series created by the “Residual agents” is less than the “Best agents” series. Therefore, the greater diversity of trade strategies as the genetic differences of artificial agents leads to less herding. The observations exhibit that the volatility clustering, leverage effects, and nonlinear dependence are more likely to experience in the price series generated by “Best gents”. Furthermore, observations indicate that if the population is well diversified in terms of trading strategies, the efficiency of the market increases.
Keywords
Introduction
Stylized facts are specified as nonGaussian statistical properties in the economic literature and are the common empirical finding in financial time series (Mandelbrot, 1963; Cont, 2001; Pruna et al., 2020). Economic literature requires the theoretical and experimental explanation for some properties such as unconditional distributions, linear and nonlinear correlations (non IIDness), and unit root (Schmitt &Westerhoff, 2018; Higachi et al., 2018); but some of them stand out:
 Heavy tails of the returns distribution or Leptokurtosis (Mandelbrot, 1963; Alfarano et al., 2005; Chen et al., 2017, Higachi et al., 2018; Ausloos and Ivanova, 2003; Castellano et al., 2018; Baker, 2022).
 Excess volatility of the returns distribution (Lin, 2018; Higachi et al., 2018; Schmitt et al., 2020).
 Volatility clustering (Mandelbrot, 1963; Sornette et al., 2017; Chen et al., 2017; Petit et al., 2019, Higachi et al., 2018; Steinbacher et al., 2022).
 Leverage effects [1](Chen et al., 2017; Lux & Ausloos, 2002; Ponta et al., 2011).
 Autocorrelation hyperbolic rate of the volatilities (long memory stochastic processes) [2](Wang et al., 2018; Alfarano et al., 2005, Chen et al., 2017).
The agentbased models are particularly suitable for explaining bounded rationality, the adaptiveness of interacting agents (Dhesi et al., 2021), and outofequilibrium phenomena (Wang et al., 2018; Lin, 2018). The most important feature of the agentbased model is that the phenomena occur at the population level rather than at the individual level (Borgonovo et al., 2022). They are complementary to the dynamic stochastic general equilibrium modeling in macroeconomics.
Analyzing herd behavior could explain excess volatility and bubbles (Manahov & Hudson, 2014; Steinbacher et al., 2022). Herding behavior occurs when individuals change their investment decision by awareness of others' decisions (Manahov & Hudson, 2014); thus, investors tend to herd by avoiding private information that would price deviate from fundamental values (Compen et al., 2022). Therefore, the volatility (disability) in financial markets, changes in the valuation, and trading activity magnitude might arise due to herding behavior bias (Alfarano et al., 2005).
This study analyzes the behavioral foundations of stylized facts by using an agentbased model developed within Altreva Adaptive Modeler settings. Independent and heterogeneity of agents' behavior are the key features of our agentbased model. Under such settings, the researcher can control and manipulate the specific information, and observe how investors make decisions; so the designated space provides a special condition to experiment with the existence of herding behavior (Borgonovo et al., 2022; Manahov & Hudson, 2014). Furthermore, the evolution of trading strategies (microlevel) and the coevolution of agents that results in the market dynamics (macro level) lead to the selforganizing system (Witkam, 2013). Selforganization provides conditions in which it is possible to observe the system's adapting patterns while the behavior of the entire market changes (i.e., behavioral foundations).
An agentbased model consists of 2000 trader agents that each have a decisionmaking strategy and a virtual market. The model evolved step by step using a feed with real quotes (including Open, High, Low, and Close values and Volume data) of the financial instruments by Adaptive Modeler. Artificial agents set to buy or sell orders in the simulated stock market after they capture the value assets information and evaluate their trading strategies. Finally, the possible herding behavior detects by observing how virtual agents make decisions with similar information and other agents' decisions.
This article evaluates the price series of a group of stocks modeled by the “TEPIX” and individual stocks modeled by “Vaghadir”, “Vamaaden”, “Khazamia”, and “Sharak”. “Best Agents” and “Residual Agents” groups estimate the price series that are the basis of analytical purposes. Then, the study uses econometric evaluation to analyze:
 Do price series estimated by “Best Agents” show herding behavior as well as “Residual Agents” series?
 Is the price series estimated by “Residual Agents” more volatile than the “Best Agents” series?
 Do the price series estimated by the “Best Agents” show less evidence of inefficiency?
Unlike previous studies (Chen & Yeh, 1999; Alfarano et al., 2005; Chen et al., 2018), the model is fed by historical stock prices preventing the formation and development of herding behavior (Manahov & Hudson, 2014). Furthermore, this study uses a large population of artificial agents. A larger population leads to more diversity of trading strategies, which improves market dynamics (evolution and competition of the strategies). This feature increases the probability of success of effective new strategies when new profit opportunities appear (Witkam, 2013; Schmitt & Westerhoff, 2017). A larger population also reduces the instability and chaos of the model and its sensitivity to random numbers (Steinbacher et al., 2022). The main contributions of this study are:
 To investigate the behavioral foundation of stylized facts in financial markets gained by implementing STGP.
 To provide evidence of stock market efficiency within simulated stock market settings.
 To test the “Marginal Trader Hypothesis[3]” by setting the stock market simulated.
The paper is structured as follows: firstly, the literature review has been discussed. Secondly, the research methodology and the artificial stock market have been designed; finally, the simulation results and statistical analyses have been presented, and the paper is concluded.
Literature Review
There are multiple explanations for stylized facts at the microlevels due to the heterogeneous gents’ behavior. Although the EMH assumes that the market is composed of agents with rational expectations and thus explains the absence of frequent autocorrelation, it fails to explain other capital market anomalies (Higachi et al., 2018). Dieci and He (2018) state that “economic and financial theories are changing the paradigm transfer from the investor with rational expectations to the investor with bounded rational and heterogeneous expectations” (Higachi et al., 2018; Borgonovo et al., 2022; Alfarano et al., 2005).
Due to endogenous uncertainty and limits to information (Higachi et al., 2018), and computational ability (Dhesi et al., 2021), the investor, instead of logical predictions or optimally solving problems, uses simple arguments and rules of thumb, such as technical analysis or trading strategies imitation by financial market specialists (Steinbacher et al., 2022).
Furthermore, one of the traditional methods to explore stylized facts is analytical tools (Alves, 2020). The axiom of the philosophy of using analytical tools is to study each element to understand the system as a whole (Steinbacher et al., 2022). Generally, the analytical tools often fail to explore the stylized facts of financial markets due to emphasis on unrealistic assumptions such as clearing mechanisms, market convergence to equilibrium prices, available information, and rational expectations (Dhesi et al., 2021). Analytical tools usually ignore the diversity of strategies and agent interactions; and simplify the model (Dhesi et al., 2021). While the agentbased models have successfully been repeated observed empirical features (Witkam, 2013) and connect the microlevel norms of investor behavior to the macrobehavior of asset prices (Wolfram, 1994; Wang et al., 2018; Dhesi et al., 2021).
Compen et al. (2022) indicated that herding occurs when individuals are aware of the decision of at least 50% of other individuals. The results also indicated that individuals are easily influenced by the wrong information from peers, which is very effective in market anomalies.
Chun et al. (2021), using an ESPS based on multidimensional sentiments of individual investors and centralized DNN, indicated that the prediction accuracy of ESPS is high, and the sentiment index can predict stock prices.
Using a behavioral agentbased model, Ezzat (2020) examined the effect of herding behavior on the decisionmaking process and the dynamic of financial markets. Although their artificial stock market was populated with diversity and rational agents, the results indicated herding behavior, changes in trading strategy, and proposed evidence for stylized facts such as clustering volatilities, fat tails, and the fractal structure of the market.
Using an agentbased model, Higachi et al. (2020) indicated the appearance of stylized facts, increasing the macrodiversity of chart agents and realizing the expected strategies. Then, the presence of a chartist artificial agent is necessary to explain the market's anomalies.
Rossa et al. (2020) developed an artificial model and investigated the effect of herd behavior (collective wisdom) on market instability (or dynamics). The model links herding behavior with sociality and market instabilities and forms the agents' expectations based on their returns and the expectations of their neighbors. The results indicated that herd is not necessarily damaging; when investors tend to confirm their expectations with one or more leaders, herding leads to reduced market efficiency. When each individual has a unique strategy, collective wisdom leads to market dynamism and efficiency.
Biondo (2019) investigated the volatility of market prices through speciﬁc policy interventions. Simulation results showed that financial market fluctuations are affected by individual characteristics of traders (such as heterogeneous trading strategy, learning and responding to information) and market infrastructure features. The simulation results also indicated that individual learning is the main element for stabilizing market dynamics.
Using the agentbased model, Pruna et al. (2019) tested the effect of herding behaviors on stock market behavior. They show that alternative scenarios by agents have no impact on dynamics and that systematic herding behaviors of investors lead to systematic market biases such as volatilities, fat tails, and leverage effect.
Schmitt et al. (2020) and Schmitt and Westerhoff (2017) tried to describe the behavior of herds and clustering volatilities by proposing an agentbased model. The results indicated that speculators’ herding behavior causes volatility clustering; since under high uncertainty situations, the speculator follows the behavior of others, and price adjusting will be more.
Manahov & Hudson (2013) evaluated the herding behavior and market efficiency by an agentbased model that gained STGP. The results show that the probability of herding occurrence in a group of stocks is more than in individual stocks. Furthermore, herding behavior does not lead to incorrect stock pricing in the long run.
LeBaron & Yamamoto (2008) simulated a virtual market to investigate changing levels of herding and learning by artificial agents. The results revealed that herding behavior enhanced the development of long memory in ﬁnancial time series and volatilities and trading volume.
Chen and Yeh (1999) considered the consequences of following the herd. They used genetic programming to evolve a stock market composed of causal and prudent traders. They found that these two markets exhibit no significant differences in the measure of bubbles and crashes.
Research Methodology
Agentbased Artificial Stock Market Simulation's Platform
This article uses an agentbased model developed within Altreva Adaptive Modeler settings advantaged by implementing STGP. Biological evolution to optimize a population to perform a specific task is the basis of evolutionary computational techniques such as STGP (Montana, 2002). STGP has the special fitness functions to evaluate the programs (or genomes) and measure the performance of each program or problemsolving. In addition, programs represent alternative solutions (Witkam, 2013).
The STGP technique was developed by Montana (1995) to enhance the creation of more meaningful and appropriate trading rules. For this purpose, in this technique, suitable for the problem domain, a large set of functions and terminals are defined (Witkam, 2013). The advantages of STGP are: fit the function arguments dynamically (unlike static GP), implementing the steadystate approximate and gradually changing population by “crossover and mutation” techniques and thus persistency of models; inclusion of the latest quotes. (Witkam, 2013).
Artificial Stock Market structure
The primary generation of trading strategies creates randomly, and the next generations are created by “crossover and mutation” operators. The random nature of the initial trading strategies allows us to investigate the whole range of all possible strategies and observe the learning, adapting, and surviving of generations. Table 1 shows the main parameters of the artificial stock market model.
Table 1. Artificial stock market parameters
Artificial stock market parameters 

Total population size (agents) 
2000 
Best Agents’ size (percentage of the total population) 
2.5, 5, 10 , 20% 
Initial cash (equal for all agents) 
100000 
Average bid/ask spread 
01/0% 
Numbers of bars for autostart Model 
2500 
Significant forecasting range 
010% 
Number of decimal places to round quotes on importing 
2 
Minimum price increment for prices generated by the model 
01/0 
Position unit Minimum 
20% 
Genome size Maximum 
1024 
Genome depth Maximum 
20 
Initial genome depth Minimum 
2 
Initial genome depth Maximum 
5 
Preferred minimum number of nodes in crossover operation 
25 
Breeding cycle frequency (bars) 
1 
Minimum breeding age (bars) 
80 
Eligible selection (percentage of agents of minimum breeding age & older) 
100% 
Initial selection type 
Random 
Parent selection (percentage of initial selection that will breed) 
5% 
Parent selection method 
Truncation 
Mutation probability (per offspring) 
10% 
Total number of quotes (bars) processed: TEPIX 
1026 
Total number of quotes (bars) processed: Sharak 
1014 
Total number of quotes (bars) processed: Khazamia 
952 
Total number of quotes (bars) processed: Vamaaden 
795 
Total number of quotes (bars) processed: Vaghadir 
812 
Short positions allowed 
Yes 
Seed generation from clock 
Yes 
Creation of unique genomes 
Yes 
Offspring will replace the worstperforming agents of the initial selection 
Yes 
Generate Cash Signal when the forecast is outside range 
Yes 
Since in the agentbased model, all artificial agents are characterized by an adaptive learningcompetitive algorithm, there is no predetermined set of strategies for agents, and therefore they can develop new trading strategies and regularly evolve them. Furthermore, the virtual markets consist of two main groups: the “Best Agents” that have the best performance in terms of continuous Breeding Fitness Return[4] (an entering return of the moving average of wealth), and the main group of agents called “Residual Agents” is the remainder of the population after deduction of the Best Agents The "Best Agents" group sizes are 2.5, 5, 10, and 20% of the total population.
The selection of agents for breeding is based on a fitness criterion that is measured by return which is the moving average of agent wealth over the last n quotes, which n is the minimum breeding age[5] with a maximum of 250. Breeding is the process of creating artificial new traders to replace weakperforming traders. In the breeding processor, the best traders are selected, and new genomes are reproduced by recombination of the parent genomes (through crossover and mutation operators). Thus, the trade strategies (genomes) are improved by the survival of the fittest genome (Witkam, 2013).
The evolution of the model consists of two portions: the evolution of trading strategies using the natural selection mechanism (substitution of the worstperformance strategies) and the enrichment of agents that have a good strategy and increase the prediction accuracy. Wealth is generated in the artificial stock market by investing in two assets (i.e., stock and cash). In each period, an agent keeps its wealth by the equation (1):
(1) 

represents the accumulated wealth of agent (trader) i at time t, and respectively indicate the amount of cash and number of shares held by agent i at time t and indicates the price of each share at time t.
Models
Herding behavior Measurement Model:
This study uses a statistical measure of herding proposed by Lakonishok et al. (1992). The authors argue that herding behavior can only be detected within subsets of traders. Hence, this measure of herding behavior is suitable for this study because it considers the trades of market participants such as ‘Best Agents’ and ‘Residual Agents’ over time. Herding behavior is measured as the average orientation of the group of traders to buy (sell) security simultaneously (Lakonishok et al., 1992). Hence, herding behavior leads to correlated trading (Manahov & Hudson, 2014).
The measure of herding behavior for a given financial instrument i, in the given trading day t, H (i,t), is defined as:
(2) 

(3) 

While Hi,t is the measure of herding in financial instrument i for trading day t, Bi,t(Si,t)is the number of trades in the subset who buy (sell) the financial instrument i in trading day t. In other words, Bi,t (Si,t) is the number of traders who increase (decrease) their holdings in the financial instrument I on the trading day. Pt is the expected ratio of cash traders possess on that trading day. In this study, the expected measure of Pt is considered 0.5 (Moradi et al., 2015). The adjustment factor AFi,t is the expected value under the null hypothesis of no herding. Since a binomial distribution with a probability of Pt success, AFi,t can be estimated given Pt and the number of agents trading in that financial instrument on that day. AFi,t declines as the number of agents trading in that financial instrument rises (Lakonishoket al., 1992; Bikhchandani & Sharma, 2001). If the value of Hi,t is significantly distant from zero, it’s interpreted as evidence of herding behavior.
Simulation Results
Tables 1 to 5 represent the main results of herding behavior by the LSV model. The fifth row of the tables reports the mean herding measures for the whole sample. For example, according to Table 3, The mean herding measure of “Sharak” at 5% ‘Best Agents’ is 0.195, and it implies that if Pt, the average fraction of changes that increased, was 0.5, then 69.5% of the traders of ‘Best Agents’ subgroup were changing their average holdings of “Sharak” in one direction and 30.5% in the opposite direction. However, herding behavior is less observed when the market is populated by more artificial traders. For example, the remainder of the market represented by the ‘Residual Agents’ group indicates that only 61.3% of the traders change their average holdings of the “Sharak” in one direction and 38.7% in the opposite direction.
Table 2. Econometric statistics for the TEPIX price series estimated by agents
TEPIX 

20% 
10% 
5% 
2.5% 


Residual 
Best 
Residual 
Best 
Residual 
Best 
Residual 
Best 


1026 
1026 
1026 
1026 
1026 
1026 
1026 
1026 
N 

0.128^{*} 
0.15^{*} 
0.168^{*} 
0.17^{*} 
0.19^{*} 
0.21^{*} 
0.23^{*} 
0.31^{*} 
H_{i,t} 

0.015 
0.02 
0.018 
0.020 
0.020 
0.021 
0.016 
0.02 
Std. dev 

0.456 
0.48 
0.23 
0.111 
1.69 
0.23 
0.24 
0.79 
Skewness 

8.876 
10.4 
12.42 
12.05 
22.36 
10.92 
13.34 
12.6 
Kurtosis 

1498 
2362 
3778 
3490 
1647 
2685. 
4084 
4551 
JarqueBera 

32.1^{*} 
32.1^{*} 
24.9^{*} 
32.5^{*} 
24.9^{*} 
18.2^{*} 
37.3^{*} 
33.9^{*} 
ADF 

(0,2) 
(9,10) 
(1,1) 
(9,10) 
(0,2) 
(13,3) 
(0,1) 
(24,2) 
Lag 
ARMA 

5.44 
5.46 
5.00 
5.19 
4.98 
4.94 
4.93 
5.39 
AIC 

36.9^{*} 
54.38^{*} 
41.8^{*} 
42.12^{*} 
39.47^{*} 
55.2^{*} 
29.2^{*} 
42.9^{*} 
BDS 

132.^{*} 
101.9^{*} 
95.6^{*} 
35.14^{*} 
11.32^{*} 
102.^{*} 
42.2^{*} 
53.4^{*} 
Fstatistic 
ARCH 

117.45^{*} 
92.78^{*} 
75.24^{*} 
34.03^{*} 
11.22^{*} 
96.36^{*} 
42.88^{*} 
50.82^{*} 
Obs*Rsquared 

(2,2) 
(1,1) 
(1,3) 
(2,1) 
(1,2) 
(1,3) 
(2,3) 
(1,4) 
Lag 
GARCH 

6.13 
6.03 
5.69 
5.73 
5.45 
5.85 
5.64 
5.95 
AIC 

1.0^{a*} 
0.99^{*} 
1.0^{a*} 
1.0^{a*} 
1.0^{a*} 
1.0^{a*} 
1.0^{a*} 
1.0^{a*} 
Ʃα_{i} + Ʃβ_{j} 

0.16^{*} 
0.256^{*} 
0.21^{*} 
0.203^{*} 
0.199^{*} 
0.15^{*} 
0.01^{*} 
0.22^{*} 

EGARCH 

0.35 
0.651 
0.898 
0.719 
0.530 
0.696 
1.72 
0.803 


0.02 
0.139 
0.556 
0.313 
0.132 
0.388 
1.70 
0.355 


1.00^{*} 
0.92^{*} 
0.99^{*} 
0.92^{*} 
0.81^{*} 
0.94^{*} 
0.79^{*} 
0.88^{*} 


6.18 
6.12 
5.69 
5.80 
5.50 
5.88 
5.86 
5.99 
AIC 


a: The IGARCH model has been used to restrict to 1.
.* Significant at the 5% level.
Table 3. Econometric statistics for Khazamia price series estimated by agents
Khazamia 

20% 
10% 
5% 
2.5% 


Residual 
Best 
Residual 
Best 
Residual 
Best 
Residual 
Best 


952 
952 
952 
952 
952 
952 
952 
952 
N 

0.098^{*} 
0.12^{*} 
0.137^{*} 
0.14^{*} 
0.148^{*} 
0.15^{*} 
0.17^{*} 
0.18^{*} 
H_{i,t} 

0.03 
0.03 
0.034 
0.036 
0.046 
0.04 
0.046 
0.04 
Std. dev 

1.04 
1.04 
0.72 
0.92 
0.71 
0.15 
1.13 
0.94 
Skewness 

12.04 
11.9 
8.85 
12.09 
108.7 
18.87 
94.21 
12.4 
Kurtosis 

3684 
3343 
1444 
3414 
442028 
10001 
330235 
3652 
JarqueBera 

30.9^{*} 
32.^{*} 
30.8^{*} 
32.5^{*} 
25.7^{*} 
31.3^{*} 
37.5^{*} 
33.^{*} 
ADF 

(0,0) 
(0,0) 
(0,0) 
(0,1) 
(0,1) 
(24,0) 
(0,1) 
(0,0) 
Lag 
ARMA 

3.82 
3.73 
3.65 
3.76 
3.32 
3.34 
3.35 
3.69 
AIC 

0.02 
0.01 
0.08 
45.4^{*} 
7.18^{*} 
31.0^{*} 
15.1^{*} 
53.2^{*} 
BDS 

0.05 
0.12 
2.32 
6.77^{*} 
276.2^{*} 
16.9^{*} 
158.^{*} 
19.8^{*} 
Fstatistic 
ARCH 

0.05 
0.12 
2.31 
6.74^{*} 
213.64^{*} 
16.64^{*} 
135.60^{*} 
19.45^{*} 
Obs*Rsquared 

 
 
 
(1,1) 
(1,1) 
(1,2) 
(2,1) 
(1,1) 
Lag 
GARCH 

 
 
 
3.95 
3.51 
3.63 
3.70 
3.88 
AIC 

 
 
 
0.96^{*} 
0.09^{*} 
0.80^{*} 
1.00^{a*} 
0.98^{*} 
Ʃα_{i} + Ʃβ_{j} 

 
 
 
0.08^{*} 
0.24^{*} 
0.00 
0.005 
0.07^{*} 

EGARCH 

 
 
 
0.322 
0.660 
 
 
0.211 


 
 
 
0.161 
1.142 
 
 
0.079 


 
 
 
0.95^{*} 
0.06 
0.77^{*} 
0.99^{*} 
0.98^{*} 


 
 
 
3.97 
3.64 
3.72 
3.81 
3.91 
AIC 


a: The IGARCH model has been used to restrict to 1.
.* Significant at the 5% level.
Table 4. Econometric statistics for Sharak price series estimated by agents
Sharak 

20% 
10% 
5% 
2.5% 


Residual 
Best 
Residual 
Best 
Residual 
Best 
Residual 
Best 


1014 
1014 
1014 
1014 
1014 
1014 
1014 
1014 
N 

0.157^{*} 
0.19^{*} 
0.171^{*} 
0.15^{*} 
0.113^{*} 
0.19^{*} 
0.14^{*} 
0.21^{*} 
H_{i,t} 

0.11 
0.11 
0.08 
0.09 
0.10 
0.10 
0.07 
0.07 
Std. dev 

10.53 
5.25 
13.05 
9.00 
12.23 
10.7 
5.76 
4.58 
Skewness 

268.1 
127. 
326.7 
199.2 
345.0 
297.3 
114.4 
77.9 
Kurtosis 

3229049 
709997 
4807022 
1768767 
5359157 
3970976 
572601 
260116 
JarqueBera 

24.7^{*} 
37.2^{*} 
30.2^{*} 
15.3^{*} 
30.8^{*} 
32.2^{*} 
31.5^{*} 
32.0^{*} 
ADF 

(0,1) 
(0,2) 
(0,1) 
(0,2) 
(0,1) 
(0,10) 
(0,1) 
(28,1 
Lag 
ARMA 

2.87 
2.69 
3.22 
3.09 
3.03 
3.00 
2.91 
2.90 
AIC 

6.32^{*} 
14.6^{*} 
12.31^{*} 
19.5^{*} 
0.05 
5.33^{*} 
7.71^{*} 
11.3^{*} 
BDS 

96.02^{*} 
113.^{*} 
155.3^{*} 
66.1^{*} 
2.17 
134.^{*} 
78.3^{*} 
14.0^{*} 
Fstatistic 
ARCH 

88.23^{*} 
102.68^{*} 
135.76^{*} 
62.38^{*} 
2.17 
119.88^{*} 
76.03^{*} 
13.93^{*} 
Obs*Rsquared 

(1,0) 
(3,1) 
(2,2) 
(2,3) 
 
(2,1) 
(1,0) 
(3,1) 
Lag 
GARCH 

3.12 
3.22 
3.52 
3.59 
 
3.20 
3.05 
2.98 
AIC 

0.35^{*} 
0.55^{*} 
0.83^{*} 
1.00^{a*} 
 
0.56^{*} 
0.17^{*} 
0.59^{*} 
Ʃα_{i} + Ʃβ_{j} 

0.41^{*} 
0.1^{*} 
0.12^{*} 
0.01 
 
0.3^{*} 
0.13^{*} 
0.07^{*} 

EGARCH 

0.17 
2.67 
0.32 
 
 
0.55 
0.08 
0.50 


0.65 
2.85 
0.081 
 
 
1.17 
0.34 
0.36 


 
0.91 
0.06^{*} 
0.94^{*} 
 
0.34^{*} 
 
0.74^{*} 


3.18 
3.52 
3.54 
3.71 
 
3.28 
3.05 
3.06 
AIC 


.a: The IGARCH model has been used to restrict to 1.
.* Significant at the 5% level.
Table 5. Econometric statistics for the Vamaaden price series estimated by agents
Vamaaden 

20% 
10% 
5% 
2.5% 


Residual 
Best 
Residual 
Best 
Residual 
Best 
Residual 
Best 


795 
795 
795 
795 
795 
795 
795 
795 
N 

0.08^{*} 
0.17^{*} 
0.16^{*} 
0.177^{*} 
0.19^{*} 
0.18^{*} 
0.187^{*} 
0.21^{*} 
H_{i,t} 

0.05 
0.07 
0.04 
0.06 
0.039 
0.04 
0.046 
0.03 
Std. dev 

0.07 
2.92 
4.24 
3.98 
1.03 
0.10 
4.70 
3.22 
Skewness 

43.22 
99.7 
58.8 
98.87 
20.5 
15.7 
89.19 
57.7 
Kurtosis 

53393 
309751 
105405 
305430 
102.9 
5311 
248397 
100650 
JarqueBera 

24.4^{*} 
32.7^{*} 
32.2^{*} 
35.55^{*} 
23.9^{*} 
20.5^{*} 
24.40^{*} 
10.2^{*} 
ADF 

(0,1) 
(0,15) 
(0,1) 
(0,1) 
(0,1) 
(0,1) 
(0,1) 
(0,7) 
Lag 
ARMA 

3.10 
2.65 
3.25 
2.82 
3.65 
3.32 
3.30 
3.70 
AIC 

18.1^{*} 
8.52^{*} 
13.5^{*} 
5.31^{*} 
0.09 
18.8^{*} 
12.85^{*} 
22.3^{*} 
BDS 

58.1^{*} 
118.^{*} 
22.1^{*} 
28.20^{*} 
1.55 
41.5^{*} 
14.09^{*} 
8.07^{*} 
Fstatistic 
ARCH 

54.23^{*} 
102.^{*} 
21.5^{*} 
27.28^{*} 
1.55 
39.5^{*} 
13.88^{*} 
8.00^{*} 
Obs*Rsquared 

(2,2) 
(1,0) 
(2,2) 
(1,0) 
 
(2,2) 
(1,2) 
(1,2) 
Lag 
GARCH 

3.26 
2.88 
3.29 
2.90 
 
3.74 
3.34 
4.17 
AIC 

0.97^{*} 
0.21^{*} 
0.68^{*} 
0.19^{*} 
 
1.00^{a} 
0.46^{*} 
1.00^{a} 
Ʃα_{i} + Ʃβ_{j} 

0.31^{*} 
0.06^{*} 
0.24^{*} 
0.65^{*} 
 
0.034 
0.11^{*} 
0.24^{*} 

EGARCH 

0.59 
0.64 
0.39 
1.66 
 
 
0.15 
0.73 


1.21 
0.51 
0.09 
0.36 
 
 
0.37 
0.25 


0.30^{*}

 
0.22^{*} 
 
 
0.83^{*} 
0.09^{*} 
0.89^{*} 


3.35 
2.89 
3.31 
3.00 
 
3.74 
3.88 
4.21 
AIC 


.a: The IGARCH model has been used to restrict to 1.
.* Significant at the 5% level
Table 6. Econometric statistics for the Vaghadir price series estimated by agents
Vaghadir 

20% 
10% 
5% 
2.5% 


Residual 
Best 
Residual 
Best 
Residual 
Best 
Residual 
Best 


812 
812 
812 
812 
812 
812 
812 
812 
N 

0.22^{*} 
0.23^{*} 
0.22^{*} 
0.24^{*} 
0.247^{*} 
0.232^{*} 
0.24^{*} 
0.25^{*} 
H_{i,t} 

0.04 
0.03 
0.15 
0.08 
0.047 
0.05 
0.06 
0.03 
Std. dev 

1.18 
3.8 
0.06 
1.3 
2.43 
1.00 
1.06 
2.5 
Skewness 

124.2 
49.2 
370.2 
39.9 
93.65 
111.6 
87.3 
38.3 
Kurtosis 

497931 
74401 
4552017 
46325 
278848 
3992855 
240444 
42962 
JarqueBera 

32.1^{*} 
31.7^{*} 
32.4^{*} 
13.1^{*} 
34.3^{*} 
27.0^{*} 
29.4^{*} 
36.5^{*} 
ADF 

(0,1) 
(0,1) 
(0,1) 
(1,2) 
(0,1) 
(0,1) 
(0,1) 
(0,1) 
Lag 
ARMA 
4.02 
4.6 
4.14 
2.5 
4.14 
3.30 
4.68 
3.9 
AIC 

14.3^{*} 
46.7^{*} 
0.05 
9.95^{*} 
16.10^{*} 
9.94^{*} 
43.7^{*} 
8.54^{*} 
BDS 

4.02^{*} 
112.5^{*} 
105.6^{*} 
66.5^{*} 
39.53^{*} 
62.91^{*} 
107.5^{*} 
11.1^{*} 
Fstatistic 
ARCH 
4.01^{*} 
98.4^{*} 
93.2^{*} 
61.5^{*} 
37.72^{*} 
58.42^{*} 
94.5^{*} 
10.9^{*} 
Obs*Rsquared 

(1,2) 
(3,1) 
(2,3) 
(1,2) 
(2,2) 
(1,2) 
(2,3) 
(2,2) 
Lag 
GARCH 
4.43 
5.16 
4.95 
2.97 
4.35 
3.60 
5.16 
4.41 
AIC 

1.00^{a} 
1.00^{a} 
1.00^{a} 
1.00^{a} 
1.00^{a} 
0.79^{*} 
0.95^{*} 
1.00^{a} 
Ʃα_{i} + Ʃβ_{j} 

0.04^{*} 
0.08^{*} 
0.02^{*} 
0.50^{*} 
0.04^{*} 
0.28^{*} 
0.03^{*} 
0.20^{*} 

EGARCH 
1.06 
0.23 
0.09 
1.35 
0.95 
2.08 
0.08 
2.53 


1.14 
0.07 
0.05 
0.35 
0.87 
1.52 
0.02 
2.13 


0.72^{*} 
0.98^{*} 
0.99^{*} 
0.20^{*} 
0.59^{*} 
0.43^{*} 
0.90^{*} 
0.21^{*} 


4.61 
5.15 
4.91 
2.93 
4.38 
3.96 
5.12 
4.39 
AIC 
a: The IGARCH model has been used to restrict to 1.
.* Significant at the 5% level.
As the results show, herding behavior exists for the whole sample (generated price series), and results are statistically significant at the 5% level. However, the point is that the herding behavior is less observed when the market is populated by more artificial traders (Residual Agent) overall; therefore, the herding behavior decreases by the multiplicity and diversity of the population.
Generally, an entire and diverse market forms price through competition and evolution behavior of participants, so it is more consistent than any subset of the bestperforming agents (Best Agents). It can be attributed to the greater genetic diversity and, consequently, more heterogeneous trading rules and behaviors, more flexibility in (equilibrium) price determination, and the clearing mechanism of the artificial stock market. However, due to the replacement of worstperforming agents, we observe that herding behavior decreases at a declining rate.
Further, “TEPIX” herding statistics (Table 1) demonstrate the presence of substantially more herding behavior. Lakonishok et al. (1992) suggest that this is due to oscillations in demand for a group of stocks which have a large effect on stock prices than oscillations in demand for individual stocks. Another reason is that different companies within the group might try to conclude information about the quality of investments from each other’s trades and herd as a result (Banerjee, 1992). However, price series of stocks with specific characteristics (for example, stocks with a specific size or different type of operation) might show broader herding behavior.[6] (Lakonishok et al., 1992).
Previous studies related to the volatilities revealed that price series and returns distributions are Leptokurtic, which characterize nonGaussian distributions.
Therefore, this study investigates return distributions and moments to answer the second particular research question.
Price return series (generated by artificial agents) were estimated by using the following equation:
(4)
Where rt is the measure of security return for trading day t[7], pt represents the security price at time t and pt1represents the security price at time t1.
Tables 1 to 5 indicate the basic econometric statistics of the price series of financial instruments. Results show that there is low variation in the standard deviation measures (The unconditional standard deviation of the return series) as the proportionality of agents varies. For example, according to Table 1, the standard deviation measure is 0.015 to 0.02. As Chen and Yeh (1999) stated “different degrees of agent expertise does not affect the price volatilities”.
Another empirical property is normality; the skewness and kurtosis values indicate that the distributions are far from symmetrical. Furthermore, according to the JarqueBera test results, the normality of the price series is rejected for the whole sample at all periods.
The result confirms the previous findings that the distribution of return series in financial markets usually is not Gaussian (Pagan, 1996; Mandelbrot, 1997; Manahov and Hudson, 2014; Wang et al., 2018; Mallikarjuna et al., 2017), which means that the excess kurtosis than the normal distribution. Leptokurtosis exists in all experiments. It depicts situations in which extreme outcomes have occurred more than expected (Mallikarjuna et al., 2017). Moreover, the Residual Agents series exhibit more leptokurtic than Best Agents.
The Residual Agents exhibit more skew values than the Best Agents, and the values are commonly negative. Some studies state that increasing heterogeneity of investors’ strategies may result in negative skewness[8] (Wen et al., 2013).
Econometric literature states that return series are unpredictable when they are distributed identical and independent (IID) (Steinbacher et al., 2022).
Augmented DickeyFuller (ADF) test is the first step to testing the IID characteristics of the series. It determines whether a unit root exists in the price series. Results show that the absolute value of the ADF statistics is significantly more than the MacKinnon (1996) onesided critical value of a unit root at the 5% level (2.8744), and therefore the null hypothesis is rejected(see Tables 1, 2,3,4, and 5). Therefore, the estimated series are stationary at the 95% significance level, indicating that the autocovariance of the series does not depend on time (Barakwell & Davis, 2009; Manahov & Hudson, 2014).
Then, the study proceeds with further investigation to filter the linear process. ARMA is one of the classic models of static time series that explains the stationary stochastic procedure using autoregression (AR) and moving average (MA) (Gasemzadeh and Asghari Eskoui, 2014).
The AR component is calculated when the variable is regressed on its lagged values. The MA component is calculated when the error terms are linearly modeled simultaneously and in the past times (Qasemzadeh & AsghariOskouei, 2015). In the model, the dependent variable is a function of the variable and a disturbance component in the past while describing the linear system behavior affected by White Gaussian Noise (Qasemzadeh & AsghariOskouei, 2015).
Tables 2 to 5 show the ARMA (p,q) process obtained from the return series. According to the results, the series estimated by Residual Agents and Best Agents are linearly dependent, and the order of linear dependence is premier in Best Agents, such as ARMA (3, 1) and ARMA (0, 7).
Further, the “TEPIX” series, especially those generated by Best Agents, show premier order of linear dependence[9] such as ARMA (24, 2) and ARMA (13, 3). Thus, from this aspect, series estimated by Residual Agents are more probability of attachment to the EMH than Best Agents. The appropriate model is fitted by autocorrelation (AC) and partial autocorrelation (PAC) functions and Akaike information criterion (AIC) statistics.
After the linear series is identified, any remaining series must be nonlinear. (Monahov & Hudson, 2014). First, the BDS test is applied to the ARMA residuals for remaining dependence. Since the best linear ARMA model series is fitted, a nonlinear time series process has existed if the null hypothesis is rejected. The test statistic is (Brock et al., 1996):
(6)
While m is the embedding dimension, is the value of the radius (the distance parameter), Wm,n (ε) is the variance of Tm,n (ε), and:
(7)
The main parameters of the BDS statistic are the ɛ and m, and those values are considered 0.7 and 6, respectively [10](Rupande et al., 2019). As observed in table 1, the null hypothesis is significantly rejected at the 5% level in all TEPIX series estimated by Best Agents and Residual Agents, and the series are dependent nonlinearly.
The BDS test result is different for individual stock price series. The null cannot be rejected in the Residual Agents series at 5% in the “Sharak” and “Vamaaden” cases. In the case of “Khazamia”, the price series at 10% & 20% levels are identically and independently distributed. Also, in the case of “Vaghadir”, the series at the 10% level characterize by the IID class. Therefore, in terms of BDS statistics, the residuals of Residual Agents in the individual stock series are more random (nonlinear dependence is less) than those of Best Agents.
Overall, according to the linear and nonlinear dependence results, the Residual Agents price series are more random. Evidence is consistent with the classical version of the EMH. However, econometrics literature states that the nonlinearity of financial data is mainly set in their second term (Docherty & Hurst, 2018). Hence, the Lagrange multiplier (LM) test is implemented for the presence of ARCH effects. The ARCH models capture the regularities in volatility fluctuations, such as variance heterogeneity in real economic markets in different years (Qasemzadeh & AsghariOskouei, 2015). The advantage of the ARCH models is it explains the conditional variance process by considering past information (Docherty & Hurst, 2018).
As observed in Tables 1 to 5, evidence of the ARCH effect has been found in 35 series out of 40 in total. The large part of the series (four series) without ARCH effects, generated by Residual Agents, are “Khazamia” at 10% and 20% levels, “Sharak” at 5% level, and “Vamaaden” at 5% level. The “Best Agents” series at 20% in the “Khazamia” case is without ARCH effects too. Logically in these markets, the null hypothesis of the BDS test is not rejected. These results indicate that the volatility clustering is present in 35 series, especially the “TEPIX” series.
To further investigate the existence of volatility clustering and persistency, we fitted GARCH (p,q) models[11] by using the Schwarz information criterion (SIC). Bollerslev (1986) proposed a GARCH model:
(8)
Where i = 1, 2, 3… p is the conditional variance; ,αj, are the nonnegative coefficients, while the sum of and coefficients is less than one; represents the error term and is the conditional variance lag. In the GARCH (p, q) model, p ( in eq. 8) is the order of the GARCH terms {\displaystyle ~\sigma ^{2}}and, q ( in eq. 8) is the order of the ARCH terms (Docherty & Hurst, 2018).
As observed, in each artificial market where the ARCH effect has been founded, the ‘appropriate’ lag values in the GARCH model were fitted by AIC, SBC, and HQC criteria. Furthermore, p and qlagged values are significant at 95%.
The persistence of the volatility clustering depends on the rapid disappearance of large volatilities after a shock (Abbasi et al., 2018). Therefore, the sum of ARCH and GARCH coefficients (i.e., and are studied to investigate any persistence in the price series. Large values of and coefficients (the sum of the coefficients is close to 1) indicate substantial persistence of volatility clustering and the slow disappearance of conditional variance shocks (Iqbal Khan et al., 2019).
As results indicate, the sum of + coefficients in the “TEPIX” and “Vaghadir” series is 1, indicating significant persistency of volatility clustering. However, the sum of + coefficients is slightly less in other series, especially those generated by “Residual Agents” such as “Khazamia” at 5% level, “Sharak” at 10%, 20%, and 2.5% levels, “Vamaaden” at 2.5% and 10% levels. As the econometric statistics initially indicate few volatilities in the standard deviation coefficients, the results are confirmed. More, the variable's variance of the past period has diverted on the current volatilities (i.e., increasing the volatility shocks) and is measured by the sum of coefficients (Mutunga et al., 2015). As observed in Tables 1 to 5, the series generated by Residual Agents in individual stock markets are less likely to experience volatility clustering, and thus the volatility shock is time decay in such artificial markets. We restricted the sum of ARCH and GARCH terms to 1 by applying the IGARCH[12] model[13] since it equals unity (Abbasi et al., 2018).
Although the GARCH model provides a better perception of volatility clustering than the ARCH model, it has a bug; it considers the effect of negative and positive shocks symmetrically (Steinbacher et al., 2022). To overcome this weakness, we further determined the EGARCH[14] structure of the series by using the Akaike information criterion (AIC) to investigate the asymmetric effects of shocks (the leverage effects).
Formally, the EGARCH model is described as follows to consider the leverage effect (Moyo et al., 2018):
(9)
Where is the conditional variance, are coefficients, may be a standard normal variable or come from a generalized error distribution. The significance level of the coefficient indicates the leverage effect (asymmetric effects between positive and negative asset returns). The ”, and ” respectively represent the magnitude effects of good and bad news on the logarithm of conditional variances; the coefficient calculates the degree of the persistency of conditional variances and implies the existence of volatility clustering (Lin, 2018), and therefore it is possible to measure the persistence of shocks.
Results show that the coefficient is positive[15] in the 23 series out of 31 artificial stock markets series (74% of total series), of which 14 series are generated by “Best Agents”; it indicates that the positive shocks have had a more effect on the conditional variances than the negative shocks. Since in the “Best Agents” series, the sum of the coefficients ( is usually more than the “Residual Agents” series, and the leverage effects of a price change are also more.[16].
As observed, the coefficient is significant in 29 artificial markets series; of which ten series were generated by “Best Agents” as well as seven series by “Residual Agents” have a beta coefficient close to one, which indicates the high persistence of the conditional variances of previous periods (Lin, 2018). Furthermore, analysis of the time series plot supports the above results; for example, appendix (1) provides time series plots of "TEPIX" at 5%, 10%, 20% "Best Agents" group size and the remainder of the market (Residual Agents). Despite the crosssectional and shortterm deviation from the intrinsic value, there is no tendency for bubbles or crashes, indicating the temporary nature of the herd behavior's destabilizing effects.
To sum up, empirical results indicate that the diversity of trading strategies and, as a result, increasing efficiency is due to the numerous and larger agent population; therefore, the Residual Agents price series are more likely to conform to the EMH.
Discussion and Conclusion
The main contribution of this study is to provide laboratory evidence on capital market dynamics and analyze the behavioral foundations of the stylized facts such as leptokurtosis, leverage effects, and volatility clustering using agentbased modeling gained by implementing the STGP algorithm. Adapting to environmental changes by learning and then evolving and striving for survival is the particular advantage of our agentbased model.
The results are:
 There is a tendency for herding behavior in all artificial stock markets. Moreover, the evidence shows that the series estimated by the Residual Agents indicates less herding and are more efficient than the Best Agents series. Therefore, having more agents with various strategies leads to modifying excessive herding. The result is consistent with Rossa (2020), Biondo (2019), and Manaho and Hudson (2013).
 In this article, the evidence does not support the MTH, which takes that a special group (subgroup) of traders keep the intrinsic value of an asset and steer markets to efficient levels. Hence, the collective behavior (competitionevolution) causes the price formation mechanism to be better performed in the large populations (total market) than in small subsets of the population.
 The evidence is consistent with the previous findings that the herding is more likely to be seen in the group of stocks[17] and a specific type of activity[18]. The result is consistent with Manaho and Hudson (2013) and, Bikhchandani and Sharma (2001).
 In terms of volatility, no significant difference is observed between the “Best Agents” and the “Residual Agents” groups. The result is consistent with Chen and Yeh (1999) that stated “different degrees of agent expertise do not affect the price volatilities” and the opposite of LeBaron and Yamamoto (2008).
 The excess kurtosis is observed in the series estimated by “Residual Agents” more than in the “Best Agents” series. Moreover, the skewness usually is negative, which may be influenced by increasing the heterogeneity of investors’ strategies. The result is consistent with Wen et al. (2013) and Bertella et al. (2014).
 According to the linear and nonlinear dependence results, Residual Agent's price series are more random and, hence more efficient. Dependency structure means that the series at a certain time is dependent on previous situations (autocorrelation function) and random noise. Furthermore, volatility clustering, leverage effects, and IIDness occurred less likely in the Residual Agent's series in individual stock markets. The result is consistent with Higachi et al. (2020), Schmitt and Westerhoff (2017), Manaho and Hudson (2013), Pruna et al. (2019), and Alfaro et al. (2005); and the opposite of Chen and Yeh (1999).
 The results of this article help to clarify the duality of the effect of blind imitation behavior and the logical adaptability of the population. It is a conflict that focuses on the potential socioeconomic impact of collective behavior on market dynamics and efficiency (Wolfers & Zitzewitz, 2004; Peeters, 2018; Bottazzi & Giachini, 2019; Delellis et al., 2017). Lakonishuk's (1992) model merely reflects the average group tendency of market participants to buy and sell stocks and does not distinguish between rational adaptability and irrational behavior. Numerical analysis of this article indicates that when there is social interaction between market agents but each agent maintains its strategy and unique estimate of intrinsic prices, herding behavior does not lead to market inefficiency.
According to the results of this article, the suggestions are:
 Since the systemic risk in financial markets emerges due to herding behavior, taking the support mechanisms and regulatory intervention such as forced settlement, position reporting system, and position limit system is necessary. For example, investors are obliged to provide information about the relevant authorities and commissions, and changes in these positions, whenever their short sell position exceeds a certain level.
 This article found evidence of volatilities clustering in Tehran’s stock market. Since inefficient market information leads to inappropriate resource optimization, therefore, by improving the information disclosure system, the market can allocate the resources optimally.
 An artificial market is based on the survival of the fittest principle. This feature causes a dynamic and competitive market characterized by a large order flow. Our results confirm that the illiquid market is more inefficient than the liquid market. Thus the acts to boast the liquidity are suggested, such as reducing transaction costs or eliminating market maker limitations for balanced price. Moreover, increasing the heterogeneity of attitudes and trading strategies is required for boasted market depth.
 The direct intervention of administrative action via the government[19]contorts the supply and demand balance and has negative influences on the volatilities. Thus, the government merely should focus on monitoring matters and strengthening the securities market structure.
Declaration of Conflicting Interests
The authors declared no potential conflicts of interest concerning the research, authorship and, or publication of this article.
Funding
The authors received no financial support for the research, authorship and, or publication of this article.
[1]The leverage effect is defined as the negative correlation between an asset return and volatilities changes (Chen et al., 2017) (Chen et al., 2017)
[2]The time series exhibits long memory if observations far from each other are strongly correlated and the dependence between successive observations decays at a slow rate (Chen et al., 2017).
[3] According to the “Marginal Trader Hypothesis” (MTH) theory, a small fraction of wellinformed individuals can set market prices and try to enhance market efficiency (Manahov& Hudson, 2014). In case these “perfect” individuals are removed from the pool of population (traders), the accuracy of the predictions will be loosed (Forsythe et al. 1992).
[4] Chromosome quality
[5] Number of trading days processed after creating the agent
[6]This explanation seems true for individual stocks such as “Vaghadir” and “Vamaaden”.
[7]The time index in the above equation is considered daily.
[8] Particularly for shortsell conditions
[9]It indicates linear dependence on the previous values and unexpected shocks as price momentum (Barakwell & Davis, 2009).
[10]Since the results of the BDS test were not sensitive to changes in the epsilon coefficient in random tests, the coefficient is considered 0.7 according to the default of Eviews software.
[11] first difference of log daily of series
[12]Integrated Generalized Autoregressive Conditional Heteroskedasticity.
[13]The persistent parameters sum up to one and import a unit root in the GARCH process (Iqbal Khan et al., 2019).
[14]Exponential Generalized Autoregressive Conditional Heteroscedasticity.
[15]The results are significant at the 5% level.
[16]For instance, in the “Residual Agents” series at 20% in the “TEPIX” case, when good news arises (i.e., the value is 0.35, and when bad news appears (i.e., 0), the value is 0.02.
[17]“TEPIX” case
[18]“Vaghadir” and “Vamaaden” cases
[19]Such as the diffusion of some bad news via the government when the stock market’s bubble is at a higher level.