Ultralgo IconAcademy Icon

Algorithmic Trading 101: What Is Algo Trading & How to Put It into Practice



· 10 min read
algo trading basics

What is algo trading?

In 2023, when one envisions the stock market, the classic scene of a bustling trading floor filled with stock tickers and loud traders might come to mind. Yet, this frenzied image is steadily becoming an echo of the past. Today, over two-thirds of trades in the market are facilitated not by humans, but by intricate algorithms running on powerful computers.

Algorithmic trading, often abbreviated as algo trading, represents the convergence of technology and trading. Here, a trader arms a computer system with a prescribed set of algorithms which autonomously trigger trades based on specific conditions.

For instance, imagine you're eyeing 1,000 shares of Microsoft (ticker: MSFT) on a real-time data stream. Observing lots fluctuating between $243.50 and $245.00, with a brief dip to $243.03, you configure your Buy algorithm with a directive: purchase 1,000 MSFT shares when the price hits $243.00.

This algorithmic prowess isn't confined to traditional stocks; it's equally applicable in the cryptocurrency realm. Suppose you possess 4 Bitcoins (ticker: BTC) and aim to short them upon reaching $40,000. Once that threshold is met, the algorithm springs into action, executing the stipulated order.

While the scenarios above are elementary for illustrative purposes, they underscore the dual utility of algo trading in 2023. On one hand, it's revolutionizing trading by automating intricate processes like portfolio diversification. On the other, it's an invaluable tool in actualizing your trading blueprint, offering impeccable timing precision and automation for mundane tasks. Consider the instance of hourly rebalancing: a bot is designed to consistently monitor price deviations and autonomously execute buy or sell orders around the clock. The future of trading, it seems, lies in code.

💡 To remember:

  • The algorithm performs exactly what you ask it to do at any time of the day or night.
  • Any rules can be applied.
  • Humans are still needed: someone needs to set those rules.

Types of algorithmic trading

Generally, there are two types of algo trading: high-frequency trading and retail trading. The main difference between them is the speed of execution and the volume.

High-frequency trading (HFT) leverages sophisticated strategies and algorithms to detect even the tiniest deal opportunities and execute millions of orders using their speed advantage. Such algorithms and, more importantly, their incredible speeds cost billions of dollars to develop and maintain, so HFT is mostly for big-time institutions.

We won’t dive deep into HFT since it’s not the Academy’s focus, but we highly encourage you to read the book Flash Boys: A Wall Street Revolt by Michael Lewis, where he uncovers (and criticizes) the nuts and bolts of HFT.

By retail algo trading, we mean that there’s an individual investor who uses proven trading strategies, but applies some software to boost their efficiency. They buy (or create, if they have programming skills) a trading bot that then makes decisions and executes orders according to its script.

What exactly are trading bots?

A trading bot is a piece of code that contains the rules of trading. To operate, the bot should be connected to an exchange, where it’ll get information to use as signals for further actions. To connect the two, people often use a trading terminal, but some brokers/exchanges provide direct access to their API, a program interface that allows traders to forward their commands directly to a server. Such commands can be placing a trade order or monitoring the current positions.

Most traders don’t create bots from scratch but use existing solutions. However, you should know something about buying bots.

Since it’s mostly non-programmers who buy them, it's very easy to run into fraud, because you won’t be able to check the code quality or make sure there are no malicious scripts. Creating a custom bot is expensive (the price starts at around 15K), plus the developer must be someone you trust, not a random hire from Upwork.

As an alternative solution, there are SaaS services that make centralized bots which work for a small fee and transaction percentage or purchased with a subscription plan. This is very convenient for retail traders because it makes algo trading safer and more accessible. 3commas is a good example of a subscription based service. It’s a platform for algo trading in the crypto field that allows traders to benefit from reliable algorithms at the minimum entry threshold.

👉You might also be interested in how to trade cryptocurrency

Should I use a trading bot? Advantages & disadvantages of algorithmic trading

The image above illustrates the ugly truth: the chances to succeed as an individual discretionary (manual) trader are getting worse. Regardless of the industry, the companies embracing technology succeed much more, and trading isn’t the exception. There are three key benefits of algo trading:

1. It’s consistent

When it comes to trading, being consistent is key. When an algorithm faces the same situation twice, it’ll make the same decision no matter what. Humans can be irrational or emotional, especially when the market goes crazy, which leads to deviations from the initial strategy and worse results.

2. Algorithms never sleep

The situation on the market is changing every second, so you need to monitor it all the time. Since robots don’t need to eat, sleep, or rest, they’re perfect candidates for this job. You can think of yourself as the general who strategizes and then tells your computer soldiers what to do. It allows you to focus on other important things while the algorithms take care of hands-on routines.

3. Algorithms trade faster

Even the most seasoned trader’s reaction times don’t stand a chance against a machine. A computer can easily do complex math with layers of conditional rules in real time and trade hundreds of orders in a split second. This also allows you to capture price movements as soon as they occur.

However, using a bot doesn’t guarantee a profit

All algorithms are different: some of them bring money to their users, some don’t. The effectiveness of a robot depends on the trading strategy and the quality of the code. Also, don’t forget that every bot requires updates and maintenance. And yet, even the best-configured robot can still have loss-making transactions.

Why would anyone sell an algorithm that already makes money?

A trading bot is just an idea, automated. The fact of selling a bot doesn’t make it bad and doesn’t mean the seller is a fraud. It’s all about making an instant profit without any stock market risks.

We don’t know the future, and having a bot doesn’t guarantee a return on investments. For a developer (especially without initial capital), it might be more profitable to sell 500 copies at $300 to earn $15,000 through their knowledge and effort rather than trying to make the same money from the market.

However, if anyone tries to sell you a bot and promises a guaranteed result, it’s always a red flag. Even if the algorithm shows good results on backtests, no one can promise it’ll repeat those successes in the future.

How to become a successful algorithmic trader

While the path to profits is easier with smart algorithms, the learning curve is steep. Algo trading basically consists of three fields: trading knowledge, data science, and programming. The better you are in these fields, the better your algo trading will be.

Trading & finance

Algo or not, any approach to trading requires a good knowledge of financial markets. Here are the essential financial basics:

  • Asset classes (stocks, funds, crypto, options, futures, etc.)
  • Trading strategies (trend following, mean reversion, etc.)
  • Bid/Ask spreads
  • Order types
  • Risk management

Data science

It’s important to understand patterns of data from across various markets. Since there’s really a lot of various data, cleaning, distilling, and structuring it to comply with a database are essential skills. This allows you to then use this clean data to identify patterns, and develop and optimize strategies based on statistical significance. You can also backtest your strategy to see how it would have performed in the past and predict how it may perform in the future.

Programming skills

Programming is another key skill for a successful algo trader. Computers are intelligent, but they only do what we tell them. To “talk” to them, you need the ability to translate an idea into algorithmic form and then into proper computer syntax.

These days, common choices include Python, which is popular in the financial markets, and R, the open-source statistical language.

The bottom line

Algorithms are power tools. They don’t make emotional decisions, they’re ready to work 24/7, they know exactly when to buy and when to sell, and they make transactions at speeds unavailable to an ordinary person. However, their superpowers are directly proportional to the user’s input of knowledge, skills, and goals. And mastery always takes practice.


About Ultralgo