Theory of Mind and Algorithmic Trading

Ashok Banerjee and Samarpan Nawn Download Article

Ashok Banerjee, Ph.D., is Professor, Finance and Control, Indian Institute of Management Calcutta. He is also the faculty in-charge of the Financial Research and Trading Laboratory at Indian Institute of Management Calcutta. His primary research interests are in areas of Financial Time Series, News Analytics and Mergers & Acquisitions..................................................... Samarpan Nawn is currently assistant professor in the Finance and Accounting group of IIM Udaipur. He has completed his fellowship from IIM Calcutta in the area of Finance and Control. His primary research interests lie in the area of Market Microstructure.

A recent article in the Journal of Finance[1] argues that the heterogeneity in ‘individuals’ cognitive capacities suggests that we may observe significant differences in their financial decisions’.  Thus, behavioural finance literature claim that the failure of efficient market hypothesis (EMH) is mainly due to the variability in the abilities of the financial agents to process sensitive information in a complex financial environment.

The foundation of the EMH is based on a notion that if one financial trader makes a poor decision under the heat of emotion, another trader acting more rationally should see this as an opportunity and make an easy profit from the other trader’s mistake[2].  Thus, very quickly any individual’s irrationality (spurred by emotional outburst) will be squeezed out of the market by speculators exploiting even the smallest mispricing of assets. Therefore, due to presence of such rational economic agents (homo economicus), the price of any asset will race back to its fundamental value.  But is it possible, in real life, to read other’s mind? Philosophers talk about different layers of mind. For example, Sri Aurobindo highlighted higher levels of consciousness- the higher mind, illumined mind, intuitive mind, overmind, and supermind. These different layers help a human being better understand the ‘self’. The psychologists, on the other hand, propose that the power of mind depends on the ability of a person to anticipate another’s motive. So, anyone who simply follows what others are doing is devoid of a ‘mind’. The ability to read others’ mind is a great virtue in any social context. It may also be visible in certain sports, for example, chess.  Garry Kasparov could look three to five moves ahead during a typical chess game[3].  This ability may be limited when people interact with complex financial institutions, like financial markets. In order to reach the equilibrium price, under the EMH, the traders would require an infinite chain of reasoning capacity- ‘the seller knows that the buyer knows that the seller knows that the buyer knows’[4].

The ability to understand other person’s mental state or intentions is known in psychology as a theory of mind (ToM).  If the ToM holds true in financial markets, limit order providers in a high frequency trading environment would infer private signals from market orders. The trader would also need to know how much information other traders hold.

Theory of Mind and Human Brain

Reading others’ minds is a crucial aspect of social life. Understanding how people think about minds has long been a fundamental interest in the cognitive sciences. Recent research demonstrates that people intuitively think about other minds in terms of two distinct dimensions: experience (the capacity to sense and feel) and agency (the capacity to plan and act)[5]. Philosophers began work on theory of mind, or folk psychology, well before empirical researchers were seriously involved, and their ideas influenced empirical research. Theory of mind (ToM) is the ability to recognize and attribute mental states — thoughts, perceptions, desires, intentions, feelings –to oneself and to others and to understand how these mental states might affect behaviour. ToM attributes mental states to others in order to understand and predict their behaviour[6]. It is also an understanding that others have beliefs, thoughts and emotions completely separate from our own.  Theory of mind is called a “theory” because the mind is not directly observable. We never know for sure what is going on in the minds of other people — we can only make assumptions based on experiences with our own beliefs, emotions and perceptions. Empathy, a concept similar to theory of mind, refers to the ability to infer another’s emotional state, or to “feel” what another must be feeling. Theory of mind, on the other hand, is the ability to understand and attribute a particular mental state to a certain behaviour without necessarily feeling it or aligning oneself to that mental state.

Neuroscientists have explored the neural basis of the ToM. The typical human brain weighs just under three pounds, but it consists of approximately 86 billion highly interconnected nerve cells (neurons)[7]. Three basic functions of the brain, particularly relevant for financial decision making, are fear, pain and pleasure. The central cortex is the outermost layer that surrounds the brain. It is responsible for emotion, thinking, and information. The cortex is divided into four different lobes- the frontal, parietal, temporal, and occipital. Over time, the human cortex undergoes a process of wrinkling (Corticalization). This is due to the vast knowledge that the human brain accumulates over time. Therefore, the more wrinkly our brain, the more intelligent we are! The frontal cortex carries out higher mental processes such as thinking, decision making and planning. The prefrontal cortex covers the front part of the frontal lobe (just behind our forehead). The basic activity of this brain region is considered to be controlling of thoughts and actions in accordance with internal goals, called executive function. Executive function relates to abilities to differentiate among conflicting thoughts, determine good and bad, prediction of outcomes etc. The dorsomedial prefrontal cortex (dmPFC), a region in the prefrontal cortex, is well known to represent the mental state of other individuals- the theory of mind.

Testing the Theory

While existing literature has used experimental finance settings and neuroimaging methods to examine the applicability of the theory, we use trade and order book data from the high frequency cash segment of the stock market (NSE). Neuroimaging methods (functional magnetic resonance imaging (fMRI)) have become very popular because these are non-invasive and hence do not cause any physical pain to the subjects. Experiments are useful techniques because they allow researchers to isolate and change one variable at a time to identify causal effects. However controlled experiments have their own limitations- experimental research can create artificial situations devoid of reality. We have, therefore, decided to use market information and the behaviour of market participants to test the effect of the ToM.

We use the historical tick by tick order level data from National Stock Exchange (NSE) of India. The data is time-stamped and includes every message sent to the exchange. A unique aspect of this data is that each order message carries an exchange marked “algo flag,” to understand whether the message is coming from an algorithmic terminal or not and a “client flag” to understand whether the order is coming from a proprietary or a client account. Combining the two flags, we can segregate traders into three groups, proprietary algorithmic traders (PAT), agency algorithmic traders (AAT), and non-algorithmic traders (NAT). It is believed PAT is a superset of high frequency traders (HFT).

Relying on speed, HFT use algorithms for processing the information contained in the trading environment such as the order flow, the state of the order book, etc. and trades against the deviations of security value from its efficient price quickly. Agency algorithms are ultimately used to profit from investing in securities, whereas, proprietary algorithms are used to benefit from the temporary mispricing of a share. AAT mainly corresponds to using algorithms to break up the required order into smaller pieces with the objective of achieving average price better than some benchmark (such as Volume weighted average price). Thus, it may be said that AAT trade on the basis of price sensitive information and PAT display behaviour of uninformed traders. The issue we are trying to examine, therefore, is whether the PAT has ToM.

Using trade and order book data for the first two weeks of November 2012 (randomly selected), we observe that five large-cap stocks had witnessed trade of large market orders. We consider large market orders as those whose size exceeds 20 times the average size of the market orders for the stock-day. Then for each of the large market orders, we analyze the limit order book (LOB) for 60 seconds before and 60 seconds after the order. Large market orders are known to carry information. Hence, liquidity providers (evidenced by the state of the LOB) should be able to trade ahead of the informed trading if they have ToM. We consider two liquidity indicators-(a) bid-ask spread and (b) order depth from top five quotes. Results are reported in Table 1.

Table 1: Reaction of Traders

Note: Bid-Ask Spread is in basis points and depth indicates number of shares.

We find that overall bid-ask spread rises immediately (60-seconds) after the large market orders arrive. Interestingly, we also find that the spread computed only from PAT orders are quite large compared to overall spread as they always fear from ‘adverse selection problem’ (the threat of being cheated by informed traders). The cumulative depth (number of shares) in the top five quotes did not show any significant change after a large market order was placed. Even the depth in LOB before the large market order was not significantly different from the ones after the large order. Was sixty-seconds too short a time to react? Can’t high frequency traders (subset of PAT) read the mind of the informed traders?

We further examine traders’ reaction to a market shock. We define market shock as unanticipated change in price. We have considered only those cases in the month of November 2012 where the price of a share moved by more than 2% on a single day.

Table 2: Reaction to shock

Note: Change in price is one-day change. Net position denotes inventory at the end of a day.

Results in Table 2 show that the bid-ask spread did not follow any pattern. If PAT were able to ‘sense’ price change early, they would increase the spread on the day of the trade- which we find in the above table. However, if one looks at the inventory position of the PAT, the results are confusing. If PAT are able to ‘guess’ the action of the market traders, they should build inventory before any positive news (large positive change in price). But we find that PAT carry negative inventory the day before any large change in price. Interestingly, the PAT had positive inventory the day before for the stock (HDFC) which witnessed smallest daily positive swing. This again raises the question- do PAT have the ability to read others’ minds?  If not, they would always have the fear of losing and would seek compensation from larger bid-ask spread.


The results shown above cannot be generalised as the sample used is very small and one may accuse us of selection bias. However, our preliminary findings show that it is a phenomenon worth studying. It also demonstrates a new way of testing the ToM concept using market data which is not as clean as any data from controlled experiments. EMH fails precisely due to traders’ lack of ToM.



[1] Corgnet Brice, Desantis Mark, and Porter David. What Makes a Good Trader? On the Role of Intuition and Reflection on Trader Performance. The Journal of Finance. Vol LXXIII, No. 3. June 2018, 1113-1137.

[2] Lo, Andrew W.  Adaptive Markets, Princeton University Press. 2017.

[3] The computer that ultimately beat Kasparov, Deep Blue, would look up to sixteen moves ahead (Kasparov and Greengard, 2007)

[4] Lo, Andrew W.  Adaptive Markets, Princeton University Press. 2017.

[5] Waytz, Adam, Gray Kurt, Epley, Nicholas, and Wegner, M. Daniel, Causes and Consequence of Mind Perception. Trends in Cognitive Sciences 14 (2010) 383–388

[6] Premack D, Woodruff G. Chimpanzee problem-solving: a test for comprehension. Science 1978; 202: 532-5.

[7] Lo, Andrew W.  Adaptive Markets, Princeton University Press. 2017.