Algorithmic Trading

Your guide to learning about algorithmic trading

Algorithmic, or quantitative, trading involves creating end-to-end computational trading systems that make use of statistical rules to trade financial assets in a fully automated manner, often at frequencies far in excess of human capability.

Creating consistently profitable algorithmic trading strategies requires a mix of skills including statistics, programming and risk management. QuantStart exists to help you learn these concepts, irrespective of your current skill level.

What is Algorithmic Trading?

And what's required is to get started?

Algorithmic, or quantitative, trading is a technical subject. Hence it requires some understanding of mathematics and programming. Howevever, it has become substantially easier to get started in the last few years.

Algorithmic trading involves a scientific approach to designing trading strategies. It makes use of quantitative tools such as statistics, time series analysis and machine learning in order to produce net profits above any transaction costs over time. In addition it is necessary to know how to program, via a language such as Python or C++, in order to carry out research.

Algorithmic trading is heavily reliant on the concept of backtesting. Backtesting is the application of pre-defined trading rules to historical data. This allows us to estimate how a trading strategy might have performed in the past. It also provides us with evidence that such a strategy may be profitable in the future.

Thankfully it is easier than ever to get started due to the rise of many web-based backtesting systems such as Quantopian and QuantConnect. These platforms eliminate the need to spend months or years developing your own research and trading infrastructure, as well collecting and cleaning years of historical data, and simply allow you to "get going".

However, such platforms won't create strategies for you. You still need to research and test trading strategies yourself prior to trading real capital. This will still require a disciplined, quantitative approach to the markets.

If you are just beginning your studies of quant trading then the following articles will help you grasp the main ideas:

"Algorithmic trading relies on backtesting - the application of pre-defined trading rules to historical data."

Backtesting Strategies

How do we carry out effective backtests?

Backtesting is one of the most important aspects of algorithmic trading development. It allows us to confidently reject a trading strategy prior to trading real capital.

Algorithmic trading stands apart from other investment approaches because we can more reliably provide expectations about future performance from past performance, as a consequence of abundant historical pricing data availability. The process by which this is carried out is known as backtesting.

Backtesting is carried out by exposing a trading strategy algorithm to a stream of historical financial data, which leads to a set of trading signals. Each generated round-trip trade will have an associated profit or loss (PnL). The accumulation of the individual trade profits over the duration of the strategy backtest will lead to the total strategy PnL.

Sophisticated "off-the-shelf" software now exists for backtesting. Quantopian and QuantConnect provide web-based interfaces, while open source alternatives, such as QuantStart's own QSTrader, allow more configuration and customisation.

Understanding the principles behind backtesting is a necessary first step for developing quantitative trading strategies. These articles will help you get to grips with the process:

"Quantitative traders emphasise portfolio and risk management, and optimised execution, over technical indicators. Strategy rules are only one piece of the pie."

Risk Management

How do we effectively manage risk?

Managing risk and preserving capital are essential tools for institutional and retail traders alike. One of the most effective ways to enhance long-term capital gain is via effective performance assessment and risk management.

Many traders - including quants - spend a disproportionate amount of time worrying about "entry and exit signals" and "technical indicators". Risk management and position sizing is infrequently discussed and is sometimes not given due consideration.

Institutions, on the other hand, spend a vast amount of time thinking about risk management and portfolio allocation, which helps keep them in business for decades.

Retail quants should be utilising institutional techniques in their trading. Thankfully, access to freely-available software and risk management techniques has made this straightforward. At QuantStart, we consider risk management to be one of the most important aspects of quant trading and discuss it frequently.

The following articles detail the basics of risk and money management, as well as how to effectively measure performance in backtests:

"Quant funds spend a vast amount of time thinking about risk management, which helps keep them in business for decades."

Trading Strategies

How do you create a profitable set of algorithmic trading strategies?

Finding an edge in the financial markets is not easy to do. It is certainly not a get-rich-quick scheme. It requires a lot of research, testing and refinement to produce consistently profitable algorithmic trading strategies.

Locating strategy ideas is relatively straightforward given the quantity available in the public domain. Academic finance journals, pre-print servers, trading blogs, trading forums, weekly trading magazines and specialist texts provide thousands of trading strategies with which to base your ideas upon.

The main difficulty is taking these ideas, backtesting them and refining them to be consistently profitable when applied to new, unseen "out of sample" data, and taking into account transaction costs. Strategies that work extremely well in backtesting situations can perform terribly when applied to live capital.

For this reason quants do not concern themselves with single strategies. Instead they create "strategy research pipelines" that provide a stream of ongoing trading ideas that fit into a larger portfolio. Our goal in algorithmic trading is to create a methodical approach to sourcing, evaluating and implementing strategies that we come across.

The following articles will outline the research process for producing trading strategies as well as provide two implemented examples of research:

If you want a more detailed set of guides to producing profitable trading strategies then take a look at the books on offer:

Just Getting Started with Quantitative Trading?

3 Reasons to Subscribe to the QuantStart Email List:

No Thanks, I'll Pass For Now

1. Quant Trading Lessons

You'll get instant access to a free 10-part email course packed with hints and tips to help you get started in quantitative trading!

2. All The Latest Content

Every week I'll send you a wrap of all activity on QuantStart so you'll never miss a post again.

3. No Spam

Real, actionable quant trading tips with no nonsense.