## Figures

## Abstract

This experimental study of an artificial stock market investigates what explains the propensity to sell stocks and thus the disposition effect. It is a framed field experiment that follows the steps of a previous observational study of investor behavior in the Finnish stock market. Our experimental approach has an edge over the observational study in that it can control extraneous variables and two or more groups can be compared. We consider in particular the groups of amateur students and professional investors because it is well established in the literature that the disposition effect is less pronounced in professionals. The disposition effect was measured by both the traditional metric and a broader one that properly considers return intervals. A full logit model with control variables was employed in the latter case. As a result, we replicate for the broader definition what already has been found for the traditional measure: that investor experience dampens the disposition effect. Trades with positive returns exhibited higher propensity to sell than trades with negative returns. For the overall sample of participants, we find the disposition effect cannot be explained by prospect theory, but we cast doubt on this stance from partitions of data from amateurs and professionals.

**Citation: **Prates W, Da Costa N Jr, Armada MR, Da Silva S (2019) Propensity to sell stocks in an artificial stock market. PLoS ONE 14(4):
e0215685.
https://doi.org/10.1371/journal.pone.0215685

**Editor: **Haijun Yang, BeiHang University School of Economics and Management, CHINA

**Received: **January 4, 2019; **Accepted: **April 5, 2019; **Published: ** April 25, 2019

**Copyright: ** © 2019 Prates et al. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.

**Data Availability: **Data are available at https://doi.org/10.6084/m9.figshare.7550159.v1.

**Funding: **This work was supported by Conselho Nacional de Desenvolvimento Científico e Tecnológico 306331/2014-4 to Professor Newton da Costa Jr.; and Coordenação de Aperfeiçoamento de Pessoal de Nível Superior to Dr Wlademir Prates.

**Competing interests: ** The authors have declared that no competing interests exist.

## Introduction

Investors usually take longer to sell stocks that have lost value relative to their purchase price than they take to sell those that have increased in value since acquisition. The financial literature refers to this behavior as the disposition effect. Under the disposition effect, investors tend to sell more stocks with positive returns than those with negative returns. The disposition effect is one of the most studied behavioral biases in finance [1]. Many explanations have been proposed but none is established [2] [3]. One particular aspect of interest in our study of the phenomenon is investor experience. Professionals are more likely to escape the disposition effect, a result shown both behaviorally [4, 5] and with neural data [2].

The type of experiment considered in this study can be labeled as a framed field experiment [6]. A computer program is designed to simulate a user interface homebroker, which is a tool commonly used by investors, and the participants in the experiments are amateur students and professional investors. These two groups are considered because the distinction between amateurs and professionals matters for the disposition effect, as observed. In this experiment, we consider the insights previously suggested in an observational study of investor behavior in the Finnish stock market [3]. The advantages of our artificial stock market approach over the observational study include: our experiment can give evidence that the treatment actually causes the response in that it controls extraneous variables; it can compare two or more groups; it is cheaper, shorter, simpler to implement, easier to replicate, and can consider more than one explanatory variable.

Of note, we build an artificial stock market merely as an input for our experimental study that aims to have an edge over the observational study we use as a reference. This means our artificial market is built only as a way to make viable a framed field experiment. The stock market is artificial in the sense that a computer program is designed to simulate a real-world user interface homebroker and participants make decisions using a software we built to simulate the market. Therefore, what we call an artificial stock market is not to be confused with an agent-based modeling, where the artificial market is full-blown and agents differ in many ways, not just in their information, but in their ability to process information, their attitudes toward risk, and in many other dimensions, including trading experience and cognitive ability [7]. However, like our artificial market, the agent-based model challenges the traditional fully rational homogeneous perspective and offers a new behavioral approach where participants are heterogeneous and have bounded rationality [8]. For comprehensive, recent reviews of agent-based modeling in finance, see Refs. [8–10].

Our analytical method employs a logistic regression model to estimate the probability of a sale based on the stock return in a specific time period. This means our study focuses on one individual investor’s propensity to sell a stock. The dependent variable in the model is the decision to sell compared to the decision to hold the stock in the portfolio, and it is expressed as a binary value. The independent variables are indicators (also in binary form) of gains and losses over a range of different return intervals, expressed as percentages of gains and losses accruing from the original purchase price. The regressions also include a set of control variables.

The rest of the paper is organized as follows. Section 2 presents the materials and methods, Section 3 shows the results and Section 4 concludes this report.

## Materials and methods

### Metrics

This study measures the disposition effect by both the original metric suggested by Odean [11] and the extension proposed by Grinblatt & Keloharju [12]. The latter is also employed by Kaustia [3], the benchmark study to which ours is compared. The Odean’s metric is used to calculate the disposition coefficient (DC) for each participant by assessing the proportion of gains realized (PGR) and the proportion of losses realized (PLR). If PGR > PLR, then an individual participant exhibits the disposition effect. Of note, DC = PGR–PLR. Kaustia’s metric, which happens to be also that of Grinblatt & Keloharju, is used to estimate the probability of selling a stock at a given level of return through logistic regressions, in particular a logit model. Following Kaustia, we label such an estimated probability as the propensity to sell. Here, one individual behaves in line with the predictions of the disposition effect literature if she displays greater propensity to sell for intervals of positive returns than for intervals of negative returns.

In either metric, one has to first set a reference point to calculate the purchase price of one stock in order to eventually calculate the amplitude of the returns from each trade. Sale prices higher than the reference point represent gains (positive returns), while sale prices below the reference point refer to losses (negative returns). In this study, the reference point chosen to calculate the purchase price is the average price of an acquisition, as in Odean [11]. In the presence of either extra purchases of a stock already held or of partial sales of a stock held, the first-in-first-out criterion [3] is applied to recalculate the average price of acquisition.

We also follow Kaustia [3] and analyze the data using a logistic regression model, where the dependent variable takes on the value of 1 when a stock is sold, or 0 when the stock is kept in the portfolio. The independent variables are a set of binary variables that classify the returns from a sell (gains realized) and the potential returns that are not realized when a stock is held in the portfolio (gains unrealized) at various percentage levels. The aim is to identify those return intervals that have the greatest power to explain one participant’s decision to sell or hold a stock.

### Odean’s metric

Here we detail Odean’s metric [11] following our own presentation published elsewhere [2]. In a given period of time, each stock is assigned to one of four categories: 1) as a gain realized, whenever a stock is sold at a price that is higher than the average purchase price; 2) as a loss realized, whenever it is sold at a price that is lower than the average purchase price; 3) as a paper gain, whenever its price is higher than its average purchase price, but the stock is not sold during that period; and 4), as a paper loss, whenever its price is lower than its average purchase price, but the stock is not sold during the period. The proportion of gains realized (PGR) computes the number of gains realized as a fraction of the number of gains that could have been realized. It is then (1) And the proportion of losses realized (PLR) is (2) As observed, the disposition effect occurs if PGR > PLR, in which case the disposition coefficient (DC) is positive.

Despite its virtues, one downside of Odean’s metric is that a gain realized is computed independently of its amplitude. For example, a gain realized of 5 percent has the same impact on DC as a gain realized of 50 percent. Moreover, since DC is the result of two ratios, it is nonlinear [5]. Though these drawbacks do not invalidate Odean’s metric, it is still of interest to consider Kaustia’s metric and investigate how investors behave in response to changing levels of possible returns, in both the domain of gains (positive returns) and the domain of losses (negative returns). This leads to the investigation of which return intervals are more likely to increase one investor’s propensity to sell a stock in her portfolio.

### Propensity to sell

It is thus relevant to study the disposition effect after the classification of returns into intervals [3, 12]. This leads to Kaustia’s metric. To determine which return interval increases the propensity to sell, discrete choice regression models–such as those from the logistic regression family–can be used. These models can estimate the probability that one investor will sell a stock in the presence of variations in the explanatory variables of the model. In particular, logit models can be successfully employed [3, 12].

### Logistic regression

Logistic regression models are appropriate for dealing with qualitative data such as ours. They model situations in which the dependent variable *Y* is binary (in that it takes on the values of 0 or 1) and the value that is sought is the probability *π* that variable *Y* equals 1, given a specific value for a variable *X*, which could be either binary or categorical [13]. Thus,
(3)
The relationship between *π* and *X* can be modeled as a logistic response function:
(4)
which is nonlinear. However, it can be made linear by taking its natural logs on both sides, that is,
(5)
where has an interval that extends from −∞ to +∞, a property that meets our needs in here. The logit model is linear in the parameters, which are estimated by maximum likelihood; the coefficients *β*s are the logarithms of odds ratios [13]. After estimation, the probabilities of each value of *x*_{p} are obtained.

As observed, in our model the dependent variable *Y* is binary; *Y* = 0 whenever one participant does not sell a stock in a given period, and *Y* = 1 when a stock is sold. Holding a stock (*Y* = 0) means a gain or loss unrealized, while selling it (*Y* = 1) means a gain or loss realized.

Here, such gains and losses realized and unrealized are associated with their corresponding return intervals. We set each of these intervals at 10 percent. Sales at the same price as purchases (that is, trades with a return of 0 percent) are dismissed, since the disposition effect refers to situations of gains and losses only. Each 10 percent return interval is represented by the independent binary variable *x*_{p}; *x*_{p} = 1 for a sale in a given period for interval *p*, and *x*_{p} = 0 for no sale.

The purpose of this logistic regression model is to identify which return interval, whether positive or negative, best explains selling behavior (*Y* = 1). If the disposition effect is at work, we expect participants in our experiment to exhibit greater propensity to sell a stock that offers positive returns. In contrast, we expect the participants to hold a stock in their portfolios in the presence of negative returns.

### Data collection and experiment design

We recruited 21 professional investors (2 females, age range 20 to 48, mean age 26.4) and 46 university students (18 females, age range 19 to 32, mean age 22.4) (*n* = 67). The professionals were financial traders from firms located in the Florianopolis area in southern Brazil. We picked professionals with at least two years of experience in stock trading. Nine professionals reported more than five years of experience, while 12 reported from two to five years. The students came from the Federal University of Santa Catarina, also located in Florianopolis. They were undergraduates enrolled in economics, accounting or management. We chose those students who had already taken the course Capital Markets. The experiment with students was conducted during two sessions run in the second term of 2017. One participant in the subsample of students had more information about the stock market than an individual picked at random from a larger population that includes non-students. This means we took a conservative stance while sampling unexperienced investors, because this group was recruited from undergraduates with basic notions of how the stock market works. The research received approval from the Ethical Committee for Research on Human Beings of the Federal University of Santa Catarina (case number: 1.744.242; date of approval: September 26, 2016).

The experiments were conducted using a software that simulates the stock market, called SimulaBolsa. The market is exogenous to one participant in that her trading does not impact a stock price. The experiments had an average session duration of 90 minutes for both groups of students and professionals. The experimental sessions for the students took place in the university’s financial markets laboratory, and participants were assigned to individual desktops with no communication between each other. The experimenter (W.P.) provided instructions at the beginning of each session. As for the professionals, they were approached by the experimenter on a one-to-one basis at their workplaces. Otherwise, they could not take part in the experiment.

Table 1 shows some descriptive statistics of the participants and the number of trades made in the experiment. As can be seen, most participants were young males and the students executed more buy and sell transactions than the professionals did.

### Simulation

The computer program that simulated the stock market generated an individual report for all the decisions made by the participants throughout the simulation period. The output could thus allow one to get informed about the variables, such as the number of stocks bought and sold during each period and an individual portfolio composition at the end of a period. The program was fed with actual data for stock prices taken from the Sao Paulo stock exchange for the five-year period from January 1997 to December 2001. The program also included indicators based on fundamental analysis taken from Economatica. However, the participants were not informed about that, and the companies’ real names were replaced with fictitious ones. The stock prices were deflated by the Brazilian GDP deflator and corrected for dividends. Then, the prices were normalized so that each stock cost one Brazilian real (R$ 1) at the beginning of the experiments. Because prices (purchase prices equaling selling prices) were fixed by the simulator, the whole stock market was exogenous to one participant. Each participant was then considered as a small trader and their actions did not influence prices. Participants were then asked to manage the portfolio over 20 periods using the program, and their buying and selling decisions for 28 different stocks had to be made at the beginning of each period. Decisions were to be reached within a three minute time limit. After this limit, a simulation screen switched for the next one. The participants could eventually compare their decisions during the experiment with the actual stock prices announced by the program. More details on this program can be found elsewhere [4].

The output generated by the program thus consisted of a list of transactions made by the participants. This output made it possible to compare the value of one participant’s final portfolio with the initial sum she invested and then calculate the total return for the entire simulation. We developed another algorithm in Matlab (available upon request) to calculate both the returns on sell transactions period by period and the paper returns that were available when one participant decided not to sell a stock held in her portfolio. We then reconstructed each participant’s portfolio at the end of each period, making it possible to calculate both the returns realized (when a stock was sold) and the returns unrealized (when a stock was held).

## Results

### The disposition coefficient and the proportion of gains and losses realized

Table 2 shows the disposition coefficients for the whole sample and subsamples that consider investor experience (amateurs and professionals), gender (males and females) and age (age interval [19, 22 [and age interval [22, 48]). We arbitrarily divide the age interval into two groups by 22 because this is the mean age of the students. As can be seen, all the groups exhibited the disposition effect according to Odean’s metric (DC > 0). The *Z* statistic, which is the result of tests of the difference between proportions, where H1: PGR > PLR shows that DC was statistically greater than zero at the significance level of 1 percent, apart from the group of professionals, where DC > 0 was significant at 10 percent.

The proportion of losses realized (PLR) did not vary a great deal across the groups, ranging from .091 to .129. However, the proportion of gains realized (PGR) showed expressive variation across the groups, ranging from .152 (professionals) to .318 (younger participants). This volatile PGR was the major factor responsible for the differences in DC across the groups.

Table 3 shows the disposition effect for the 10 percent return intervals. We considered negative return intervals for both losses unrealized (*Y* = 0) and losses realized (*Y* = 1), and then computed PLR. We also considered the situations where the participants held a stock (*Y* = 0) or sold it (*Y* = 1) thus obtaining positive returns, and then computed PGR. As can be seen, PGR > PLR for all the intervals (significant at 1 percent, apart from the interval ]-60, -50]), thus suggesting the presence of the disposition effect.

Participants made zero returns in some trades where the sale price matched the purchase price and thus PGR and PLR could not be computed. Such data were dismissed from Table 3. There were 207 such zero returns unrealized and 34 zero returns realized. Moreover, arithmetic (non-logarithmic) returns were considered and thus there were no returns lower than −100 percent, but there were many returns greater than +100 percent. This asymmetry explains why Table 3 shows no positive returns above 100 percent, in which case the *Z* statistic could not be computed due to the absence of returns for the corresponding negative interval.

The program output data provided observations for all the stocks in all the periods. However, observations were null in those cases where a participant did not hold any stocks. Such null observations were also dismissed. As a result, we ended up with a total number of observations of 277,695, arranged in a matrix with 8,415 lines and 33 variables, including the binary ones for the 10 percent return intervals and also non-binary and categorical variables.

### Variables explaining selling behavior

Table 4 shows the results of a full logit model that further considers the control variables *c* in addition to the return interval variables *x*, that is,
(6)
where *π* is the probability of selling (*Y* = 1), the *β*s are the coefficients, and *ε* is the error term.

The control variables *c* considered were experience, gender, age, number of trades, stock and period. “Experience” and “gender” were binary: 1 for professional and 0 for student, and 1 for male and 0 for female. “Age” was divided into two percentiles, and the lower age percentile was removed to avoid problems of multicollinearity. The total number of trades made by each participant was expressed in four quartiles, and the bottom quartile was dismissed to prevent multicollinearity and only used as a reference point for the interpretation of results. Variable “trade [79, ∞[,” for example, refers to the top quartile: 75 percent to 100 percent. “Stock” takes on the values from 1 to 28 to refer to each of the 28 stocks traded, and “period” contained 20 categories to reflect the 20 trading periods of the experiments.

Of note, the sum of all binary variables relative to return intervals is always equal to 1 because gains or losses realized and unrealized always offer returns that can be ascribed to one of the 10 percent intervals. To avoid falling into the “dummy variable trap,” which could cause incorrect interpretation of the results, the independent variable representing the trades that resulted in returns of 0 percent was removed from the set of explanatory variables and a constant was included in the model instead. Inclusion of such a constant has the effect that the removed variable can be considered as a reference for interpretation of the coefficients. The significance of the coefficients was evaluated by Wald tests.

Table 4 shows the negative returns that exhibited statistical significance were those for the intervals −30 percent to −50 percent, and for the intervals −80 percent to −100 percent. The interval ]−70, −60] was also statistically significant. As for the positive returns, only the interval [50, 60 [did not have a statistically significant impact on selling behavior.

It was impractical to show the large numbers of levels of the control variables “stock” and “period” in Table 4. However, from the 28 different stocks only four exhibited statistical significance at the 10 percent level. From the 20 periods, 12 showed significance at 10 percent, and the later periods (from 14 to 20) were most relevant to explain selling behavior.

### Propensity to sell

The full logit model can be used to assess the propensity to sell a stock. Propensity to sell is the probability estimated by the model that a sale will be executed (*Y* = 1) for a return interval *x*: Pr(*x* = 1). Table 5 shows that trades with positive returns exhibited higher propensity to sell than trades with negative returns. The probability of executing a sell transaction was greater if the sale realized a gain, and participants were reluctant to realize losses. This result provides evidence of the disposition effect according to Kaustia’s metric, and experimentally replicates that of the observational study of Kaustia [3]. Observe in Table 5 that the propensity to sell at a gain or a loss was relatively constant across both the negative and positive intervals, a finding that challenges the explanation for the disposition effect based on prospect theory. Prospect theory predicts the propensity to sell a stock will decrease as its price moves away from the purchase price in either direction, though the movement is asymmetric for gains and losses. This point was first observed by Kaustia [3] and here we experimentally give support for his claim.

Nevertheless, when we run the full logit model taking data from students, professionals, males and females separately, we cast doubt on the stability of the propensity to sell across the return intervals. Fig 1 shows that the propensity to sell remains constant across the negative return intervals, but increases across the positive ones. The only group for which this is not clear cut is that of professionals (Fig 1A). So, perhaps prospect theory could not explain the disposition effect for professional investors, supposedly the vast majority in the observational sample of the Finnish stock market used by Kaustia. However, this does not seem to be obvious for amateurs and other particular groups, as our experimental study suggests.

A. Students versus professionals: the propensity to sell stocks is not stable across the return intervals when particular groups are considered. B. Males versus females: the propensity to sell stocks is not stable across the return intervals when particular groups are considered.

To quantify the disposition effect when return intervals are considered (Kaustia’s metric), we run our full logit model, this time to consider two binary explanatory variables: one for positive returns and the other for negative returns. Our objective is to assess whether the probability of executing a sale of a stock at a profit is higher than the probability of selling it at a loss. Further, we consider the result for the groups of students and professionals separately.

Table 6 shows the results where two dummies for return intervals were considered. The LR statistic was calculated to compare the model tested with a model restricted, with no explanatory variables. As can be seen, the amateurs (students) were 2.38 times more likely to execute a sale transaction to realize a gain than to execute one to realize a loss. The professionals showed a lesser inclination (1.17). This result is in line with the literature that investor experience dampens the disposition effect. However, such a result has been shown for Odean’s metric of the disposition effect [4, 5]. Here, we have extended it to the broader Kaustia’s metric of the disposition effect that properly considers return intervals.

A final caveat is that the amplitudes of the intervals of gains and losses realized that are analyzed in this experimental study cannot be straightforwardly compared with those in Kaustia’s observational study [3]. Our study considered the percentage variation for each buy or sell period as equivalent to the percentage variation of one month of actual data from the stocks traded in the Sao Paulo stock exchange. In contrast, Kaustia considered daily data.

## Conclusion

This is a study of an artificial stock market that evaluates the propensity to sell stocks and thus the possible occurrence of the disposition effect. It is a framed field experiment that follows the steps of a previous observational study of investor behavior in the Finnish stock market [3]. The advantages of our artificial stock market approach over the observational study are: 1) our experiment can give evidence that the treatment actually causes the response in that it controls extraneous variables, and 2) two or more groups can be compared. We consider in particular the groups of amateur students and professional investors because it is well established in the literature that the disposition effect is less pronounced in professionals [4].

We detail the variables explaining the propensity to sell a stock and the emergence of the disposition effect in our experiments. The disposition effect was measured by both the traditional metric [11] and a broader one that properly considers return intervals [3]. A full logit model with control variables was employed in the latter case. As a result, we replicate for the broader definition what already has been found for the traditional measure: that investor experience dampens the disposition effect. Trades with positive returns exhibited higher propensity to sell than trades with negative returns.

For the overall sample of participants, we confirm Kaustia’s key finding [3] that the disposition effect cannot be explained by prospect theory. However, this result is not clear cut when groups of participants are considered. Indeed, we found the propensity to sell at a gain or at a loss was relatively constant across both negative and positive return intervals–a finding that challenges the explanation for the disposition effect based on prospect theory. Yet, when we considered data for groups of amateurs and professionals separately, we found that the propensity to sell stocks remained constant across the negative return intervals, but increased across the positive ones.

## References

- 1.
Shefrin H. Behavioralizing finance. Hanover, MA: Now Publishers Inc.; 2010.
- 2. Dorow A, Da Costa N Jr, Takase E, Prates W, Da Silva S. On the neural substrates of the disposition effect and return performance. J Behav Exp Financ. 2018; 17: 16–21. https://doi.org/10.1016/j.jbef.2017.12.003
- 3. Kaustia M. Prospect theory and the disposition effect. J Financ Quant Anal. 2010; 45: 791–812. https://doi.org/10.1016/j.jfineco.2012.11.002
- 4. Da Costa Jr N, Goulart M, Cupertino C, Macedo J Jr, Da Silva S. The disposition effect and investor experience. J Bank Financ. 2013; 37: 1669–1675. https://doi.org/10.1016/j.jbankfin.2012.12.007
- 5. Dhar R, Zhu N. Up close and personal: Investor sophistication and the disposition effect. Manage Sci. 2006; 52: 726–740. http://dx.doi.org/10.1287/mnsc.1040.0473
- 6. Harrison G, List J. Field experiments. J Econ Lit. 2004; 42: 1009–1055. http://dx.doi.org/10.1257/0022051043004577
- 7.
LeBaron B. Agent-based computational finance. In: Tesfatsion L, Judd K, editors. Handbook of Computational Economics, vol. 2. Amsterdam: North Holland; 2006. pp. 1187–1233. https://doi.org/10.1016/S1574-0021(05)02024-1
- 8. Yang H, Wang H, Sun G, Wang L. A comparison of US and Chinese financial market microstructure: Heterogeneous agent-based multi-asset artificial stock markets approach. J Evol Econ. 2015; 25: 901–924. https://doi.org/10.1007/s00191-015-0424-6
- 9. Chen S, Yeh C. Evolving traders and the business school with genetic programming: A new architecture of the agent-based artificial stock market. J Econ Dyn Control. 2001; 25: 363–393. https://doi.org/10.1016/S0165-1889(00)00030-0
- 10. Yang H, Chen S (2018). A heterogeneous artificial stock market model can benefit people against another financial crisis. PLoS ONE. 2018; 13: e0197935. pmid:29912893
- 11. Odean T. Are investors reluctant to realize their losses? J Financ. 1998; 53: 1775–1798. https://doi.org/10.1111/0022-1082.00072
- 12. Grinblatt M, Keloharju M. What makes investors trade? J Financ. 2001; 56: 589–616. https://doi.org/10.1111/0022-1082.00338
- 13.
Ryan T. Modern regression methods, 2
^{nd}edition. Hoboken: John Wiley & Sons; 2009.