What is algorithmic trading?

What is algorithmic trading

What is Algorithmic trading? often referred to as algo trading or automated trading, is a sophisticated approach to financial markets where computer algorithms execute trading strategies with little to no human intervention. This method leverages mathematical models, statistical analysis, and automated processes to make rapid and precise trading decisions.

In simple terms, it’s like having a computer do the trading on our behalf.

Algorithmic trading has gained immense popularity in the financial industry, offering efficiency, speed, and the ability to handle complex tasks that might be challenging for human traders.

Benefits of automated trading

Firstly, why consider automating your trading? Are there any advantages compared to manual trading? If yes, what are those benefits?

There are many advantages to automated trading, and we’ll explore some of the most significant ones.

Scope:

To start, with automated trading, you have a broader scope compared to manual trading. When I say scope, I mean a manual trader might only keep an eye on a few symbols—maybe 5 or 10, at most 20. But with software, it can keep track of all available symbols based on a set of criteria. When these criteria align with a particular value, the software can execute a trade. Essentially, with a computer, you can trade and monitor a much larger number of symbols than an individual can manage.

Speed:

Additionally, speed plays a role. A software can not only monitor numerous symbols but can also execute a trade as soon as a specific set of criteria is met. On the other hand, a manual trader, unless constantly staring at a computer 24/7, won’t be able to execute these trades at the optimal time. So, it boils down to having more scope and greater speed with automated trading.

Minimizing risk:

With automated trading, you can reduce risk because you’re trading many different symbols simultaneously, spreading your risk. This is in contrast to someone trading manually who can only keep an eye on a few symbols, leading to larger positions in those symbols and potentially greater risk.

Removing the emotional aspect:

One of the most significant advantages, as I see it, is that it eliminates the emotional aspects of trading. Many traders face challenges because they struggle to control their emotions. It’s rare to hear a trader admit failure due to a lack of understanding in technical or fundamental analysis, or risk management. Most traders comprehend these concepts but often fail to apply them consistently because their emotions interfere. Everyone who has bought something and witnessed it drop understands the concept of stop losses and risk management. However, when it comes to cutting losses and moving on, emotions make it a difficult task.

This is a challenge that automated trading effectively eliminates. It provides a systematic approach to trading, driven by logic or strategies that are known to work. This, in my opinion, is the most significant advantage of automated trading.

Ability to backtest and optimize:

When you engage in automated trading, rather than just running a strategy and waiting to see its effectiveness or examining charts to determine its success, you have the advantage of backtesting. This means you can apply that strategy to historical data to confirm whether it worked before implementing it live. Additionally, you can optimize it by figuring out the best parameters. For instance, you can test whether using Bollinger Bands with a standard deviation of 2 or 3 works better. This ability to backtest and optimize comes before any live trading, providing a valuable opportunity to refine your approach, even if it’s with simulated funds.

Time saving:

Lastly, automated trading saves you time. How? Well, it’s true that you need to invest some time initially to automate the process, programming the software, and all that. However, once that’s done, the software takes over, monitoring the market and executing trades on your behalf. So, instead of spending 8 or 10 hours a day in front of the computer, analyzing the market and timing your trades, you no longer have to do that. The software handles it, and your role becomes monitoring the software, which doesn’t take as much time. This frees you up to dedicate your time to developing more strategies, optimizing existing ones, and creating additional ways to generate income.

So, these are the biggest reasons why automated trading is very popular nowadays.

Disadvantages of automated trading

So, just like anything that has its benefits, there are also some drawbacks to automated trading. It’s crucial to be aware of these negative points so that you can find ways to overcome them.

Data overfitting / over-optimization:

One significant drawback in automated trading is data overfitting. Many individuals might have datasets and think, “Okay, I need to discover a strategy that works. Let me experiment with different strategies and optimize it.” They may eventually find something that generates substantial profits. The issue here is that when they actually implement it with live data, it might not work. Why? Because they tailored it so much to the past datasets that, although it performed well in that specific data, it might not be effective with any other dataset.

To counter this, it’s essential to have a strategy that makes logical sense, based on one dataset but tested on multiple different datasets. We’ll delve into more strategies to overcome this later. but the key is to recognize that the goal isn’t just to find something that worked in the past but also something that will work when implemented live.

Bugs in code:

Bugs in your code can lead to financial losses, and there’s no way to avoid it. Even the largest companies often encounter bugs while running their code, resulting in monetary losses. Your goal is to minimize these bugs as much as possible, striving to eliminate them entirely. However, some bugs may still slip through, causing you to incur losses. Automated systems can trade rapidly, amplifying the impact of these bugs. To mitigate this, consider implementing a monitoring system for your account. If you experience a loss exceeding a certain percentage, the system can automatically halt trading. While there are strategies to address this issue, it’s essential to acknowledge that bugs are an inherent part of the process.

Has to be monitored:

There isn’t an automated system that you can set and forget. You need to log in regularly, check its actions, review its performance, and assess if updates are necessary. If something happens that requires a code update, you have to address it. It’s not a “set and never look again” kind of situation.

Despite these drawbacks, it’s still worthwhile because the advantages outweigh the disadvantages by a considerable margin.

Different types of automated trading

Automated trading has evolved into a multifaceted realm, offering a diverse array of strategies and approaches to suit the preferences and objectives of various traders. From fully automated systems to strategies that involve varying degrees of human intervention, the landscape of automated trading is dynamic and rich with possibilities.

Fully Automated Trading:

Fully automated trading systems operate without manual intervention, relying solely on pre-programmed algorithms to analyze market data, identify signals, and execute trades.

  • Emotion Elimination: Decisions are driven by algorithms, eliminating emotional biases.
  • Speed Advantage: Executes trades rapidly in real-time, capitalizing on market opportunities.
  • Low Maintenance: Requires minimal human intervention once the system is set up.

Semi-Automated Trading:

Semi-automated trading strikes a balance between automated tools generating signals and human traders making the final decision to execute a trade.

  • Human Oversight: Traders maintain control and discretion over trade execution.
  • Intuition Integration: Allows for human intuition and judgment to complement automated signals.
  • Reduced Errors: Mitigates the risk of automated systems making incorrect decisions.

High-Frequency Trading (HFT):

High-Frequency Trading is a specialized form of fully automated trading that focuses on executing a large number of orders at extraordinary speeds, exploiting minimal price differentials.

You can read more about HFT in the book Flash Boys by Michael Lewis

  • Lightning-Fast Execution: Trades occur in microseconds, leveraging low-latency connections.
  • Market-Making: Involves strategies like market-making and statistical arbitrage.
  • Advanced Infrastructure: Requires sophisticated technology and infrastructure for rapid execution.

Quantitative Trading:

Quantitative trading involves the use of mathematical models and statistical techniques to analyze market data, guiding algorithmic models for systematic trading.

Some of the HFT algorithms & automated trading are based on Quantitative models. that’s why sometimes its called quant trading.

  • Mathematical Models: Utilizes models for predicting price movements and identifying trading opportunities.
  • Diverse Strategies: Encompasses trend following, mean reversion, and statistical arbitrage strategies.
  • Quantitative Proficiency: Requires a strong foundation in quantitative analysis and programming skills.

Conclusion

Only 10% of trading involves traditional stock picking, as various studies suggest. This means that merely about 10% of the trades happening in the market come from human traders making decisions based on fundamentals. Interestingly, this percentage is decreasing over time, indicating a growing trend in automated trading. As you read this, the percentage might be even smaller.

What does this trend tell us? It indicates that automated trading works effectively. In the financial world, if something doesn’t work, people tend to avoid it. The fact that significant companies are increasingly automating their trading processes implies a compelling reason to adopt automation.

However, these percentages might be a bit deceptive. They are based on volume, and individual traders typically hold their positions for a longer duration compared to automated systems. Automated systems often engage in frequent buying and selling within a day, sometimes within the same minute, aiming for small profits but across numerous symbols. This results in a higher volume of trades than what a human trader might generate.

It’s essential to recognize that many of these automated systems still have humans behind them. These humans act as overseers, ensuring that the automated processes function appropriately. Even though it’s all driven by computers, the human touch remains crucial for the proper functioning of these systems.

A really good book to get you started with automated trading is Quantitative Trading by Ernest P. Chan