Biases in Algorithmic Trading

Published at 1711618273.570428

Investment decisions often appear dry and precise. Investing in the real world, however, is far more nuanced. Classical research studied psychological factors influencing investment decisions, drawing connections between finance and psychology since 1912 in George Selden’s book, “Psychology of the Stock Market”. Decades later, the arrival of Prospect Theory in 1979 by Amos Tversky and Daniel Kahneman and the concept of “mental accounting” by Richard Thaler in 1980 marked the rise of behavioral finance.

In the digital age, algorithmic trading has revolutionized investment strategies. It equips portfolio managers with powerful tools for constructing and executing portfolios. Algorithms provide speed and precision in the stock market. However, they aren’t magic bullets. Biases can still affect their development, data selection, and model interpretation. Portfolio managers, being humans, can still hold biases that seep into the algorithmic decision-making process. These biases can lead to suboptimal outcomes despite advanced computing technology.

This article explores investment biases specific to algorithmic and quantitative trading. We identify two main categories of biases: systematic and behavioral biases. Investors and portfolio managers exhibit systematic biases during system development in the quantitative processes. Conversely, they introduce behavioral biases through ad-hoc decisions influenced by their human behavior. Over time, both types of biases lead to suboptimal performance, which requires careful reviews and updates to quantitative trading systems.

Systematic biases

Even with superb algorithmic models, a system can still underperform compared to a benchmark due to suboptimal training data and algorithmic design. Moreover, inadequate data may even lead to catastrophic losses.

Look-ahead bias. A simple example is to train an algorithm to predict tomorrow’s weather based on tomorrow’s forecasts. When testing a trading strategy in simulations or backtests, if an algorithm’s trading signal relies on future data that was not available at the time, the results become skewed. This bias occurs when information from the future influences decisions made in the past.

Another example arises in global strategies related to time zones. Failing to account for time zone differences in time-stamped data can lead to events occurring out of order. That is, events in different countries may happen in different order with time zone corrections. Lastly, for strategies relying on sentiment analysis, algorithmic traders should exercise caution when using sentiment dictionaries that may have been trained on forward-looking data.

Overfitting bias. This bias occurs when an algorithm becomes too finely tuned to a specific data range. It may perform exceptional on the chosen data set, but may fail to generalize effectively to the broader market. Machine learning researchers can inadvertently introduce mixed bias if they train their hyper-parameters on the entire data sample and then use the same hyper-parameters to backtest.

Another example of overfitting bias arises from skewed straining data. If an algorithm is trained primarily on data from a bull market, a bear market, or a sideway, it may not accurately represent the full market spectrum. Consequently, any resulting trading strategy could prove ineffective in the real market.

To mitigate overfitting, one approach is to use data holdout for validation. This involves withholding a portion of the training data for validation purposes and it can either be time-series holdout or asset holdout.

For time-series holdout, there are two common approaches: withhold a continuous time range, typically towards the end of the time-series data, or withhold several interleaved stretches within the training window. For example, hold out the last 12 months for validation, or hold out periods of every other week within the training data.

For asset holdout, make sure the withheld asset does not introduce further bias, e.g. a specific market capitalization, trading liquidity, industry, or geos. The holdout should have the same broad characteristics as the overall market.

Design bias. Designing algorithms can introduce a hidden bias. When we exclusively focus on successful trading strategies, we inadvertently create a system with a blind spot. This narrow perspective can distort our perception of risk and potential returns. If the market conditions that made these strategies successful change, this bias can lead to devastating losses.

The quality of training data used in algorithmic design is critical. If the data fails to represent the entire market, resulting trading strategies may suffer from limitations. Also, a lack of diversity in the training data can hinder an algorithm’s ability to adapt to various market situations and economic structures. For example, a trading algorithm trained during the booming years of the car manufacturing industry might struggle when a different sector becomes the country’s largest.

Behavioral biases

While algorithmic trading relies on mathematical models, historical data, and automated execution, it remains fundamentally influenced by human behavior. Even with sophisticated computing systems, algorithmic traders and portfolio managers can exhibit behavioral biases specific to quantitative trading.

Confirmation bias. This bias involves seeking information that confirms existing beliefs and trading decisions. Investors may disregard contradictory evidence, leading to skewed perceptions and suboptimal performance.

In the context of algorithmic trading, portfolio managers may make the mistake of selective backtesting their strategies. A portfolio manager might focus on time frames where their strategies are known to perform well, ignoring unfavorable periods. Also managers may dismiss negative news about a stock in the portfolio, assuming such instances are outliers.

Overconfidence bias. This bias refers to the tendency of individuals, including portfolio managers, to overestimate their abilities, knowledge, and accuracy. Managers may believe they have more control over market outcomes than they actually do. This illusion of control leads to excessive trading, and unnecessary adjustments to algorithms.

Algorithmic traders may downplay risks associated with their strategies, ignoring any risk management protocols. They might dismiss signals that challenge their existing positions. They may ignore warning signs, assuming their models are foolproof.

Anchoring bias. This bias occurs when we overly rely on initial information when making decisions. In the context of algorithmic trading, if a stock was initially priced high, a portfolio manager can anchor their valuation to this information, even if market conditions suggest otherwise.

When designing trading algorithms, anchoring can occur in parameter selection. If an algorithm was initially calibrated with certain thresholds, subsequent adjustments might be biased by these initial settings.

Hindsight bias. Individuals tend to perceive past events as being more predictable than they actually were. Algorithmic traders may become overconfident when they believe they can predict market movements after the facts. They may retroactively adjust their strategies based on outcomes, ignoring the uncertainty during real-time decision-making. Furthermore, algorithmic traders may underestimate the risks associated with certain trades, assuming they could have foreseen adverse outcomes. 

Availability bias. Portfolio managers may favor easily accessible information. When evaluating algorithms, portfolio managers may unconsciously prioritize  outcomes that come to mind quickly, even if these outcomes are not statistically representative.

Algorithmic traders may give importance to recent market events, especially when they are emotionally charged (e.g. from a sudden market crash). These events become more memorable, leading to biased decision-making.

Availability bias also affects the choice of historical data used for training algorithms. Managers may select data aligned with their recent experiences, ignoring equally important but less accessible information. This bias can distort trading strategies. Portfolio managers may overemphasize recent market trends, leading to excessive buying or selling. Algorithms trained on biased data may perpetuate these patterns.


Keep in mind that every algorithm, no matter how advanced, reflects human psychology. Recognize this fact, adapt, and make wise trading decisions. As portfolio managers, the role extends beyond writing code. It involves comprehending both the markets and ourselves.

Financial literacy is crucial. Informed investors who grasp these biases are better equipped to make choices. Also, creating a well-defined investment plan based on risk tolerance and long-term objectives promotes discipline and helps avoid emotionally driven decisions.

By acknowledging these biases and fostering a culture of critical analysis, portfolio managers can leverage algorithmic trading while minimizing its potential drawbacks. Algorithm trading is a tool, and like any tool, its effectiveness depends on understanding its limitations and using it responsibly.