What is algorithmic trading? **Algorithmic trading is the buying and selling financial assets using computers, without human intervention. It is done to exploit persistent market opportunities to make profits. **

A single person can run algorithmic trading strategies with the exception of high-frequency trading strategies.

## What is the Point of Algorithmic Trading?

The point of algorithmic trading is to long or short a financial asset when its price is not what (we think) it should be.

To represent that in logic form:

If X happens, Y should happen.

If Y doesn’t happen, we do Z in anticipation that Y will happen.

For instance, if satellite images of all Walmarts show an increase in the number of parked cars (which implies an increase in shoppers), the price of Walmart should rise.

If the price doesn’t rise, we buy the stock in hopes that it does (especially during the next quarterly earnings announcement).

#### When should we use algorithmic trading instead of manual trading?

We use algorithmic trading when the market opportunity is persistent, which means it appears over and over in a similar fashion. We use manual trading when the market opportunity is one-off.

#### Reasons to use algorithmic trading

We use algorithmic trading when:

- Analysing large amounts of data
- Analysing data quickly
- Analysing text or images (using machine learning)
- Collecting large amount of data (web scraping)
- Firing a trade with lightning quick reactions
- Firing many trades in a short time
- Firing a trade where you need a precise price
- We need to monitor the markets 24/5
- The trader is lazy

**Examples of algorithmic trading strategies**

- Asset A usually moves before asset B. We buy or short asset B when we see asset A move.
- Fire a trade quickly (using machines) before the market can react to a piece of news.
- A group of similar stocks from the same country and industry usually move together. Today, one of the stock moves in an unusual fashion. We buy or short this stock in hopes that its behaviour will revert back to normal.

**Examples of manual trading strategies**

In contrast, here are some examples of manual trading strategies.

- Hedge fund manager George Soros profiting $1 billion betting that the UK was unable to maintain the British Pound above a certain value in 1992
- Winklevoss Twins (the twins that sued Facebook’s CEO Mark Zuckerberg) became billionaires thanks to a $11 million bet on bitcoin in 2013.
- Sending someone to record the number of trucks leaving a timber processing factory every day. Thus, estimating supply and sales. This allows us to predict the timber company’s earnings.

#### What are the key components of algorithmic trading?

Finance, mathematics and programming. Finance gives us the trading idea, mathematics helps us quantify the opportunity, and programming helps us test and implement the trading strategies.

Learn finance before the math. Learn the math before programming.

**Finance**

Understanding finance, economics and how the market works is the most important part of algorithmic trading. This gives us the skills to identify and find trading opportunities.

In many cases, having knowledge of other specific domains is useful if we are trading products in those industries.

For example, understanding the weather and agriculture process is useful if you are trading coffee futures.

**Mathematics**

For most trading ideas, you just need high school level statistics.

You need statistics knowledge to calculate how big or small an opportunity is, and to calculate how big your trades should be.

Let’s say a trade wins 50% of the time with a 15% return, loses 40% of the time with a 10% loss and loses 10% of the time with a 100% loss.

Is this a good opportunity? If yes, how much should we trade?

There is a statistical formula for the two questions above. Go read about Expected Value and Optimal F.

Alternatively, we can run simulations to find the optimal betting size.

**Programming**

Programming lets you test, improve and deploy your algorithmic trading strategy.

Programming is usually the last piece of the puzzle after the initial strategy design phase. However, it is increasingly important as new strategies require technical skills at the onset.

For instance, if we are evaluating comments from web forums and reviews from restaurant review sites for opportunities, we need programming skills to scrape those data.

This has to be done at the initial strategy development phase.

#### Can an individual run an algorithmic trading strategy

Yes, an individual can. Software and data is cheap enough for a single person to run a algorithmic trading strategy. However, a single person can’t run a high-frequency trading strategy as the costs and technical requirements are too high.

High-frequency trading (HFT) firms spend hundreds of millions for trading infrastructure and have teams of usually very competent computer scientists, data scientists and traders.

It is more than difficult for a single person to win the HFT battle.

Note that just because a single person can run an algorithmic trading strategy, doesn’t imply he or she can be profitable in the long term.

Knowing how to play chess and being a chess champion are two very different things.

#### How to run an algorithmic trading strategy successfully?

The best way is to join a trading firm and get mentored by experienced traders. If you are doing it alone, you need to understand what is algorithmic trading, learn how to spot opportunities, start coding and testing your ideas appropriately, deploy your strategy, make mistakes, try again, lose (hopefully small amounts) money, try again, repeat until successfully.

Here are some helpful resources:

- 4 Algorithmic Trading Strategies that Work in 2019
- How Can Retail Traders Beat Institutional Traders and Hedge Funds?
- How can a beginner start algorithmic trading? (Quora answer)

## Related Questions

**What are the components of a trading algorithm?** A trading algorithm consists of 3 parts – 1) the code to enter a trade 2) the code to close a trade and 3) the code to calculate how much to trade.

Video lecture: Structure of a Trading Robot (AlgoTrading101 Course)

**What is an example of a trading algorithm?** A common example is a moving average trading algorithm that enters a trade when a trend starts to form. This strategy rarely works in today’s market but is easy to code and hence, is a good starting point for beginners.

Video lecture: Structure and code of a moving average trading algorithm (AlgoTrading101 Course)