Abstract

This paper examines the under/overreaction effect driven by sentiment belief in an artificial limit order market when agents are risk averse and arrive in the market with different time horizons. We employ agent-based modeling to build up an artificial stock market with order book and model a type of sentiment belief display over/underreaction by following a Bayesian learning scheme with a Markov regime switching between conservative bias and representative bias. Simulations show that when compared with classic noise belief without learning, sentiment belief gives rise to short-term intraday return predictability. In particular, under/overreaction trading strategies are profitable under sentiment beliefs, but not under noise belief. Moreover, we find that sentiment belief leads to significantly lower volatility, lower bid-ask spread, and larger order book depth near the best quotes but lower trading volume when compared with noise belief.

1. Introduction

With FinTech, such as natural language processing, introduced into financial services, traders have increasingly used short-term intraday sentiment information derived from news wire articles. For example, “RavenPack” provides real-time structured sentiment data from social media that helps to decipher whether news or comments are good or bad for the listed company. If traders use these sentiment data to forecast the price, they may lead to underreaction or overreaction in short-term intraday data. In fact, empirical studies in both academic [1] and practice [2] find evidences of under/overreaction in intraday data.

Heston et al. [3] used five-minute frequency intraday data and found that the yield series had significant serial correlation. Furthermore, Gao [4] took US ETF funds and divide the trading day into 13 half-hour intervals. The return rate of the half hour after opening has a significant positive correlation with the return of the half hour before closing, and there is an intraday momentum effect. Komarov [5] uses half-hour intraday returns of the US stock markets and finds that morning earnings can predict the closing returns. Zhang et al. [6] use the Shanghai Composite Index and find that the returns in the first half hour and/or the penultimate half hour (the seventh half hour) can significantly predict the returns in and out of the sample in the last half hour. Jin et al. [7] conduct an investigation of intraday timeseries momentum across four Chinese commodity futures contracts, and their results indicate that the first half hour return positively predicts the last half hour return across all four futures.

In a seminal paper, Barberis et al. [8] (hereafter BSV98) propose a type of sentiment belief, which incorporates both conservative bias and representative bias, and show that the model is able to generate both under- and overreaction observed in monthly data. BSV98 employs a representative agent framework, without interactive trading among heterogeneous agents. As a result, the BSV model is not suitable for examining the impact of investor sentiment on market volatility, trading volume, and liquidity in financial markets, which predominantly are limit order markets with continuous double auction. Therefore, two important questions that remain are as follows: (1) can sentiment lead to under/overreaction in a limit order markets with intraday trading? (2) What is the impact of sentiment on market volatility and liquidity including the bid-ask spread, order book depth, and trading volume?

This paper aims to answer these two questions by analyzing an agent-based model with sentiment belief in an artificial limit order market. According to Paulinet al. [9], the agent-based modeling is a powerful tool for studying the complex financial systems, such as limit order markets, based on the big data and computing power. Paulin et al. [9] point out that the problem classic economic theories face is that “even if the individual microbehaviors of system components are all perfectly understood, it remains extremely difficult to predict the overall macrobehaviors that the system might exhibit.” Agent-based modeling (ABM) overcomes this shortcoming by assuming “agents are independent software entities that operate according to their own rules and objectives.” Especially in a limit order market, classic economic theory based on rational expectation would require each agent to know the optimal strategy of all other agents, i.e., their submission price and order quantity. However, this is an extremely complex problem to solve (even numerically) given its dimensionality. Therefore, ABM is the only feasible channel to study the emergent properties of market microstructure of financial assets from the microbehaviors of bounded rational and heterogeneous agents.

To setup a benchmark for comparison, we first consider noisy beliefs, as in De Long et al. [10], about the fundamental value which deviate randomly from rational expectations. We call the traders with noisy belief noise traders. Then, for our main simulation analysis, we model sentiment traders who follow a Bayesian learning scheme, similar to the one in BSV98; thus, sentiment traders are also called BSV traders. More specifically, BSV traders think that the expected log fundamental value follows a regime switching model with conservative bias and representative bias rather than a random walk. BSV traders believe that there is a continuation regime as well as a mean-reverting regime, and they use past trends to determine the likelihood of which regime they are currently in. Following Chiarella et al. [11], the order submission price and order size are determined by the forecasting price, the budget constraint, and the no-short-sell constraint via the constant absolute risk aversion (CARA) utility function. The order type (market or limit) is determined by the submission price and the bid and ask price; that is, if the submission price of buy (sell) order is no lower (higher) from the ask (bid) price, they will place market buy (sell) order; otherwise, they will submit limit buy (sell) order.

Our main finding is that BSV traders can have very a different impact on the limit order market compared to noise traders. First, BSV trading gives rise to profitable strategies that are based on under/overreaction, while noise trading does not. Second, we find that, under BSV trading, conditional on overreaction, trading volume, and volatility is significantly higher and order book depth significantly lower than the periods without overreaction. In contrast, there are no significant differences between overreaction and non-overreaction periods under noise trading. In general, BSV trading leads to significantly lower volatility, smaller bid-ask spread, larger order book depth near the best quotes, and lower trading volume compared to noise trading.

Our paper is contributed significantly to the literature. First, we extend Barberis et al. [8] to a limit order market and examine whether sentiment trading can lead to over/underreaction in short-term intraday data, which are consistent with the empirical findings in recent financial markets that introduce sentiment data via FinTech. While there are agent-based models which examine the BSV sentiment effect, such as Zhang et al. [12] and Zhang and Zhang [13], a market-maker trading mechanism is used rather than a limit order book and also their focus is on examining the long-run survival of irrational traders. Chen et al. [14] highlight that agent-based models need to employ the limit order book as a realistic trading mechanism to study richer market dynamics in intraday data. We extend Zhang and Zhang’s [13] work in a realistic trading mechanism and study the impact of BSV-type sentiment on market volatility and liquidity, thus providing more useful implications to the regulators and investors.

Furthermore, in Chiarella et al. [15], based the simulated data with BSV-sentiment trading, it is found that the model reproduces a number of important stylized facts in limit order markets including fat tail and absence of autocorrelation in returns, volatility clustering, long memory in absolute returns, the bid-ask spread and the trading volume, the hump shape in the mean depth profile closer the best quotes of the order book, an increasing and nonlinear relationship between trade imbalance and midprice return, and also the diagonal effect (event clustering) in submitted order types. The focus of the current paper is on the under/overreaction effect and the impact of BSV sentiment on market volatility and liquidity.

2. The Artificial Limit Order Market

We consider a limit order market with traders, with different investment horizons, who arrive at the market randomly and submit orders to buy or sell shares of a risky security (e.g., stock). The fundamental value of the risky asset follows a geometric random walk, i.e.,where the volatility per period, , is constant and common knowledge among the traders. From (1), the log fundamental value is a martingale, i.e., for .

Moreover, traders do not monitor the market continuously, trader with an investment horizon, and enters the market following a Poisson process with a mean of . Upon arrival, she knows the fundamental value of the current period , together with its past values every period. Thus, trader ’s information set is given by , where measures the length of her observations. In addition to the risky stock, traders can also invest in a risk-free security with zero interest rate.

2.1. Traders’ Beliefs
2.1.1. Noisy Beliefs

First, we consider the noisy beliefs, similar to De Long et al. [10], as a benchmark. We assume traders’ beliefs about the mean and variance of the log fundamental value deviate randomly from their values under rational expectations, i.e.,where . We refer to these traders noise traders. When , trader has rational expectations; thus,

2.1.2. Sentiment Beliefs

Next, for our main analysis, in the spirit of Barberis et al. [8] (hereafter BSV), we assume that traders’ beliefs are driven by behavioral sentiment. More specifically, each trader believes that the log fundamental price follows:where and the mean growth rate follows a two-state Markov chain with transition matrixTherefore, trader believes that there is a good (bad) state in which the mean growth rate of the fundamental price is positive (negative). Given the current state, the probability of staying in the same state is given by . When is different from zero, trader ’s belief exhibits sentiment, believing in an underlying structure for the mean growth rate, which does not exist.

Furthermore, as in Barberis et al.’s study [8], trader believes that the transition probability also follows a Markov chain with transition matrix:Thus, traders believe there is one state in which the mean growth rate is more likely to remain the same as the last period and a state in which the mean growth rate is more likely to switch from one state to another, in which and measure the switching intensities. This Markov regime-switching model is motivated by two important psychological biases: conservative bias and representative heuristic bias. According to Barberis et al. [8], agents either react too little to cash-flow news (changes in the fundamental process) because they believe the mean fundamental growth rate is mean reverting, or they react too much to cash-flow news because they believe the mean fundamental growth rate is trending. The former is consistent with conservative bias and the fact that agents underweighs the information in individual cash-flow news, whereas the latter is consistent with representative bias since agents overextrapolate the past trend and overweighs information contained in a series of positive/negative cash-flow news.

Traders do not observe the mean growth rate , and they update their probability beliefs about and based on a Bayesian learning scheme (see the learning process in the Appendix). Given a sentiment trader’s estimated probabilities and , trader makes a -period ahead forecast of the log fundamental price:The details of the deviation of equation (7) are also documented in Appendix. The variance of log fundamental price perceived by sentiment trader is given by

We call these traders with behavioral sentiment BSV traders. Note that, without sentiment (), BSV traders’ belief also becomes the one in equation (3). Therefore, sentiment is the key ingredient in generating heterogeneity in beliefs across BSV traders with different investment horizons (see the example in Appendix), and the key difference between noise traders and BSV traders is that BSV traders have a learning scheme under bias in belief while noise traders do not.

2.2. Traders’ Optimal Demand and Order Submission

Following Chiarella et al. [11], we assume that traders maximize a CARA utility function by optimizing their demand in the risky stock, which is given bywhere is the absolute risk aversion coefficient, is the number of shares of the risky asset held at time , is the order price, and is the order size (quantity) submitted at time (agent maximizes a CARA utility function, i.e., , and is assumed to be normally distributed, where is the submission price, is the quantity of risky asset held at time , and is the agent’s expectation for future returns. Refer to Chiarella et al. [11] Appendix A for detailed derivations).

Next, trader uses her belief about the fundamental value to estimate the mean and variance of the future market price:Now to determine the submission price for trader , we assume trader can neither short-sell nor borrow at the risk-free rate, which implies thatwhere is the amount of cash trader holds at time . The no-shorting and no-borrowing constraints are necessary to derive the bounds and for the submission price. Without such constraints, agents may place large orders to buy or to sell far away from the best bid/ask, which is unrealistic. Alternatively, one could assume that each agent has the ability to borrow a certain amount and to take a short position and then the price bounds are determined such that and and and can also depend on market conditions.

From (11), we obtain the following bounds for the submission price for trader :where and is determined implicitly byFurthermore, we define as the no trade price for trader , which solves

We assume trader trades in the following way. She either tries to sell shares of the risky asset at the maximum price of or buy shares at the minimum price of (this may seem rather extreme, however, assuming the order will be executed, buying at or selling at maximizes trader ’s expected utility). If the best ask or the best bid , then agent submits a market buy or a market sell order; otherwise, she submits a limit buy or limit sell order. Note that this way of determining the submission price is different from Chiarella et al. [11], where agents randomly pick a price .

Furthermore, we assume the probability of submitting a buy or sell order is given byIntuitively, the further the no-trading price is away from the minimum price, the higher the probability to buy; the further the no-trading price is away from the maximum price, the higher the probability to sell.

Lastly, we assume trader ’s expected return and variance or return over her investment horizon are based on the expected value and variance of the log fundamental price and the submitted price, that is,

Upon entering the market, trader either places a market order or a limit order which will be stored in the limit order book. A transaction occurs when a market order hits a quote on the opposite side of the order book. Limit orders are executed using both price and time priorities. At time , trader submits a buy or sell order with price level and order size ( is the optimal order size based on ). The order leads to a trade when she submits a buy order and or when she submits a sell order and , where and are the best bid and ask price, respectively. If there is enough depth at the best bid or best ask, then the entire order trader submits is executed at or ; otherwise, part of the order may be executed at prices further away from the best bid or ask or it may become a limit order with price as the new best bid or ask price. Furthermore, there can be multiple agents who arrive at the market at the same time, in which case we assume those agents trade in a randomized order.

Table 1 summarizes the order submission rules of trader in which is drawn from a uniform distribution on . Note that trader ’s submission price is either (for buy orders) or (for sell orders). If the depth at the best bid (ask) is not enough to fully satisfy the order size, the remaining volume of the order is executed against limit orders in the book. The trader thus takes the next best buy (sell) order and repeats this operation as many times as necessary until the order is fully executed. This mechanism applies under the condition that quotes of these orders are above (below) price (). If the limit order is still unmatched by the time it is removed from the book.

The artificial limit order market with continuous double auction is redeveloped from “FinancialMarketModel” (CSS 739 Class Project Team, Simulating Financial Markets using MASON Framework, Center for Social Complexity, George Mason University, USA, 2008) based on MASON platform simulation framework (Sean Luke, Claudio CioRevilla, Liviu Panait, Keith Sullivan, and Gabriel Balan; MASON: A Multiagent Simulation Environment. Simulation, 81:517–525, 2005). The architecture of the artificial limit order market is outlined in Figure 1.

2.3. Simulation Design and Setting

Our analysis of the model is based on computer simulations. We assume traders’ investment horizons follow a uniform distribution between and where the reference investment horizon (approximate one hour) and the range is specified by . Furthermore, we restrict the investment horizons to be integers.

Traders are initially given shares of the risky asset and amount of cash, where the initial fundamental price . At the beginning of each period , each trader has a probability of entering the market. Agents observe the fundamental value after they enter the market before submitting an order. Upon entering the market, trader cancels any unmatched limit order and submits a new order according to the order submission rules in Table 1.

The volatility of the log fundamental price per period is set to basis points (bp) (if each trading period is treated as one minute, then the annualized volatility is approximately p.a.), and risk aversion is set to for all traders following Chiarella et al. [11]. For the BSV traders with behavioral sentiment, we assume , , , and following BSV98 and . Upon entering the market, trader estimates the probabilities and based on her information with initial priors . We set for every agent and the number of the agents to 1000 (we did some robustness tests with changing to 90 or 30 and the total number of agents to 2000 or 500, and the results do not change significantly). The minimum tick size by which prices can differ is given by . We assume that the true fundamental price process is a geometric random walk (the particular set of parameter values used in Section 2.3 has shown to reproduce many of the known stylized facts of financial markets including long memory in absolute returns, volumes and bid-ask spread, hump shape in mean depth profiles of order books, nonlinear relationship between order imbalance and midprice returns, and event clustering in order submission types, see Chiarella et al. [15]).

Apart from noise and BSV traders, we assume there are also liquidity traders. Liquidity traders’ investment horizons and arrival rates follow the same uniform distribution as noise/BSV traders. They choose randomly between buy and sell orders with equal probability, after which they also choose randomly between market and limit orders with equal probability. The order size is randomly distributed between 1 and 10. Moreover, their limit orders are always at the best bid or ask price. Therefore, the liquidity traders do not set prices on the order book. They either provide or demand liquidity with equal probability. Given the total number of agents in the market, we assume of them are noise/BSV traders and of them are liquidity traders.

Intuitively, liquidity traders trade for exogenous reasons (e.g., unwind position to adhere to appropriate risk levels), and they may use market orders if they are impatient or limit orders at the best bid/ask if they have time to wait for more favourable prices. However, liquidity traders are not likely to place orders that are far away from the best bid/ask. Moreover, we assume they choose randomly between market and limit orders with equal probability because we think it is reasonable to assume that liquidity traders are equally likely to provide or consume liquidity to the market. Furthermore, order size is chosen randomly between 1 and 10 since traders are initially endowed with 10 shares of the risky asset, and the two choices need to be consistent to generate realistic results.

We design two simulation cases. The first one is the noisy case, which there are 900 noise traders and 100 liquidity traders, and we use this case as a benchmark. Then, we consider the other case, “BSV” case, in which there are 900 BSV traders and 100 liquidity traders.

The results reported are the outcome of 30 simulations of 72,000 periods with the first 60,000 steps used as a burn-in period (the results remain similar among different simulations).

3. Analysis of Simulation Results

In this section, we use the simulation results to examine under/overreaction effect and the impact of behavioral sentiment on market volatility and liquidity. We first examine whether BSV sentiment can generate overreaction and underreaction in intraday data. Then, we examine the impact on intraday market volatility, liquidity including the bid-ask spread, the order book depth near the best quotes, and the trading volume.

3.1. Underreaction and Overreaction

According to BSV98, underreaction and overreaction are defined asrespectively, i.e., returns tend to a higher following good news than following bad news; however, returns tend to lower following a series of good news than a series of bad news, which is in contrary to the efficient market hypothesis (EMH) that says any public information should be reflected by the equilibrium price such that no abnormal profit can be made. Therefore, under/overreaction serves as counterevidence against the EMH.

In the limit order market, we interpret an increase (decrease) in the midprice as good (bad) news. Intuitively, an increase (decrease) in the midprice suggests that investors in the market are revising their expectation of the fundamental value of the risky asset upward (downward).

In order to test for underreaction specified in (17), we design the following underreaction (UR) trading strategy. Suppose the changes in the midprice, act as trading signals, and the signal is positive when and negative when (in rational expectation equilibrium model, uninformed traders use the price as a public signal about future payoffs. For example, an increase in price signals to the uninformed traders that a positive private signal has been received by the informed traders. Therefore, we use price increase (decrease) as a buy (sell) signal for the under/overreaction trading strategies). Initially, if a trader observes a positive (negative) signal, she buys (short-sells) one share of the risky asset. Then, as soon as trading signal switches sign, she closes off the initial position. She repeats the strategy starting from the next period.

On the contrary, to exploit any overreaction present in the market, we construct the following trading strategy. An OR signal appears after 3 consecutive negative (positive) price changes; however, the strategy does not buy (sell) until an opposite signal appears. As a result, there are consecutive price changes in the same sign before trade begins. For example, in Figure 2, there were 5 positive signals (exclude zero returns) before a negative return appeared, then strategy dictates to short-sell. Finally, the OR strategy waits the same number of periods before closing the position. Strategy repeats starting from the next period (we test ; we find that when , the OR strategy is not profitable; and when , the OR strategy is profitable, but the opportunities of OR strategies decrease when increases. Thus, we report the result of ). Figure 2 provides graphic illustrations of the UR and OR trading strategies.

Table 2 reports the profitability of the UR and OR trading strategies; panel A assumes transactions occur at midprices, where panel B assumes that buy (sell) orders are executed at the best ask (bid). We have the following observations. First, both trading strategies deliver positive returns in a market populated by BSV and liquidity traders with the UR trading strategy being significantly more profitable than the OR strategy. In contrast, when the market is populated with noise and liquidity traders, the strategies deliver large negative returns. This confirms that the model generates realistic prices that are consistent with empirical evidence of under/overreaction. The UR strategy is much more profitable than the OR strategy since the UR strategy allows trading after every positive/negative signal, whereas the OR strategy activates only after a series of consecutive signals of the same sign.

Second, after bid-ask spread is taken into account, the UR strategy remains profitable, whereas OR strategy has negative return in the market with BSV and liquidity traders. Intuitively, the OR strategy suffers from deterioration in market liquidity during the overreaction period; i.e., market depth reduces and spread widens after BSV traders trade overaggressively after observing a series of good/bad signals. We show evidence of this in Table 3.

3.2. Volatility, Spread, Volume, and Order Book Depth

We define following measures of market quality: volatility is the sample standard deviation of log-return of the midprice, that is, per trading period; the bid-ask spread is measured by the on average number of tick sizes between the best bid price and best ask price, that is, per period; and volume is measured by the average number of shares being transacted per period. Moreover, we also compute the average order book depth near the best quotes. Average order book depth of the best 5 quotes on the ask (bid) side is denoted by Da5 (Db5).

Results in Table 3 show that volatility, spread, and trading volume are all significantly smaller in a market populated by BSV traders than one populated by noise traders. The intuition is that, due to their Markov switching belief about the log-fundamental process, although BSV traders can underreact as well as overreact to news, they underreact more often. Investors are expected to underreact after every good or bad signal; however, they overreact only after they receive a series of positive or negative signals. Since the log fundamental process is a random walk, the probability of observing a series of price increases or decreases is relatively small. Therefore, BSV traders submit less aggressive orders compared to noise traders given the same movement in the fundamental value. Results also show that order book depth is larger in a market populated by BSV traders than in market populated by noise traders. Intuitively, noise traders’ expectations deviate randomly from the currently observed log-fundamental value, , whereas BSV traders’ expectations are closer to since they follow the same learning scheme. Therefore, noise traders are more likely to place limit order further away from the best quotes.

In Table 3, we also compute the volatility, spread, volume, and order book depth conditioned on the occurrence of overreaction in the market. Overreaction is identified when there had been () consecutive increases (decreases) in the midprice , which provides consecutive positive (negative) trading signals. Suppose the first of the consecutive positive/negative trading signals was observed in the trading period , then the overreaction period is given by corresponding to the trading horizon of the overreaction trading strategy. Moreover, the overreaction (OR) period is not constant period, and it has been calculated by the OR trading strategy. For example, if there are 3 after 3 consecutive positive price changes, then it means that there is an OR period; when there is a negative price change, the OR period ends; for example, if the negative price change happens at the 5th period, the length of OR is 5–1 = 4; if it happens at the 9th period, the length of OR period is 9–1 = 8. In Table 3, BSV-OR (noise-OR) corresponds to the overreaction periods in a market populated by BSV (noise) traders.

Results indicate that, in a market populated by BSV traders, volatility, volume increase, and order book depth reduce significantly during the overreaction periods. In contrast, there are no significant differences in any of the observable quantities in a market populated by noise traders. The intuition is clear; only the BSV trader actually overreacts during the overreaction period, during which they trade more aggressively, leading to higher volatility and trading volume, also reduced order book depth. The noise traders, on the other hand, do not overreact; therefore, their trading behavior is not affected by the overreaction periods. Interestingly, the bid-ask spread does not show any significant increases in the overreaction period even in a market populated by BSV traders, which suggests that even when they overreact, BSV traders do not trade aggressively enough to widen the spread.

4. Conclusion

In this paper, we propose an agent-based model to examine the impact of behavioural sentiment on market volatility and liquidity in limit order markets. Compared to noise traders who do not engage in learning at all and their beliefs deviate randomly from fundamental price, sentiment traders with a Bayesian learning scheme may underreact or overreact to past changes in the fundamental price; thus, traders with different investment horizons may have different expectations about the future fundamental price. In an artificial limit order market, traders are allowed to submit market or limit orders, and submission price and order size are both determined by CARA utility maximization.

Simulation results show that sentiment and noise trading have very different impacts in a limit order market. Firstly, underreaction and overreaction trading strategies are only profitable in a market populated by sentiment traders. Moreover, conditional on overreaction (signal by consecutive positive/negative midprice returns), only sentiment trading leads to a significant increase in trading volume and volatility and reduction in order book depth. Overall, we find that sentiment trading leads to rich trading and price patterns, which resemble more of those in the real stock market.

For future avenues of research, it would be interesting to extend the model to include a chartist component in agent’s beliefs and examine the joint impact of sentiment and return extrapolation on the price and liquidity dynamics. For instance, the complex interaction between sentiment and extrapolation may provide an explanation for flash crash, sudden liquidity dry-ups, and commonality in the order flows.

Appendix

The Learning Process of BSV Traders

We assume that BSV traders do not observe the mean growth rate , so they update their probability beliefs about and based on Bayesian learning process. Let and , where . Define , and trader updates her probabilities after observing as follows:wherefor and andfor and .

Given her estimated probabilities and , trader makes a -period ahead forecast of the log fundamental price as the one in equation (7):where

Data Availability

The data were obtained from the simulation. The coding of the simulation is available from the corresponding author upon request.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

Financial support from the National Natural Science Foundation of China, under grant NSFC 71671191, U1811462, and 71721001, is gratefully acknowledged.