In 2010, it was estimated that over 80% of the volume in the public equity markets was traded algorithmically. Furthermore, out of the best performing hedge funds, a very large percentage rely on algorithm-driven trading. This list includes:
- Bridgewater Associates, the worlds largest hedge fund, that manages about 150 billion US Dollars
- AQR Capital Management, the second largest fund with $70 billion under management
- Renaissance Technologies, the third largest hedge fund,
- Two Sigma Investments, the fifth largest hedge fund
- and many more.
Moreover, the deployment of algorithmic trading is expanding at a rising rate. This rapid growth is not expected to stop in the foreseeable future.
And now you want to join the party as well? If that’s the case, you have come to the right place! There has never been a better time to learn algorithmic trading than right now.
In this article, I will present you with a step by step guide for how you as a retail trader can get involved in the exciting world of algorithmic trading. You will learn how to acquire the skills necessary to develop your own trading algorithms and much more.
Algorithmic Trading vs Discretionary Trading
Before we dive into the nitty-gritty of learning algorithmic trading, I just want to draw a comparison between algorithmic and discretionary (manual) trading.
One major advantage of algorithmic trading over discretionary trading is the lack of emotions. The computer program that makes the trades follows the rules outlined in your code perfectly. There is no second-guessing or hesitation. If a buy or sell signal is found, it is followed by a reaction of the algorithm.
This can not be said about manual human traders. In fact, dealing with your psychology while trading can be one of the toughest things. Often, the quality of your decision making is impaired by emotions such as fear and greed.
With that being said, the complete mechanical nature of trading algorithms can also act as a disadvantage. Trading algorithms don’t think about their trades like humans do. They simply check pre-programmed conditions and take action if certain criteria are met.
This means if the creator of the algorithm made a mistake or forgot to think about certain things, this can lead to bad trades that no human in their right mind would ever take.
A different aspect in which algorithmic trading definitely comes out on top is the aspect of time. Not everyone, certainly not retail traders, can afford to watch the markets all day. This, however, is no problem for a computer program.
A further advantage would be the ability to backtest and optimize your algorithmic trading strategies. This can’t really be done in the same way for manual trading strategies. This means algorithmic traders can take advantage of the insane amounts of data that are accessible in our world today.
|Algorithmic Trading||Discretionary Trading|
|100% Mechanical||Emotional Decision Making|
|Watches Market All The Time||Time Constraints|
|Ability To Backtest Your Strategies||Can’t Backtest To The Same Extent|
|Consistent Approach||Inconsistent Approach Due To Human Nature|
|The Trading Is As Good As Your Code||The Trading Is As Good As You|
Furthermore, algorithmic trading takes a much more consistent approach to the markets than discretionary traders do. If a trading algorithm would be confronted with the exact same situation twice, it will make the exact same decision every time. This can not be said about human traders because their decision making is heavily affected by human factors such as their mood, past experiences, prior trades, emotions etc.
In conclusion, both discretionary and algorithmic trading have their pros and cons. I wouldn’t necessarily say that either one is 100% better than the other. In my opinion, this really depends on the code and the trader that are being compared. At the end of the day, an algorithmic trader is only as good as his algorithm and a discretionary trader is only as good as himself. A good trader can beat a bad
If algorithmic trading is for you, depends on who you are and what your personal preferences are. For an even more detailed breakdown of the differences and similarities, check out my guide to systematic vs discretionary trading.
Now without further delay, let me present to you how to learn algorithmic trading.
How to Learn Algorithmic T
rading – Video Lesson
You can check out the following video lesson that I created to visually present what algorithmic trading is and how to learn algorithmic trading:
Step 1: What is Algorithmic Trading?
The first step is understanding what algorithmic trading even is or at least, understanding what kind of algorithmic trading is relevant for you. For instance, in recent years,
You can check out the following video if you are interested in learning more about high frequency trading.
So when I am talking about learning algorithmic trading in this article, I am not talking about high frequency trading (because retail traders can’t use it). Instead, I am talking about developing trading strategies that can be translated into an algorithm that can be used by you. The goal with this algorithm is to let it trade profitably for you. You won’t make any trades manually. All the trading is automated and performed by your algorithm.
To drive this point home, here is an example of a very simple trading algorithm:
If SPY's price crosses above its 30-day moving average:
-Buy 100 shares of SPY
If SPY's price crosses below its 30-day moving average:
-Sell 100 shares of SPY
Like I just said, this is a very simple trading algorithm and I would not recommend trading real money with this
Step 2: Understanding the Basics of Trading
This step applies to any kind of trader. It really doesn’t matter if you want to learn algorithmic trading or become a discretionary trader. You need to understand the basics first. Understand how the markets work and learn some basic finance topics.
Here are just a few examples of things that you have to understand:
- How the markets work
- Supply and demand
- Asset types (e.g. stocks, futures, options, forex…)
- Buying and selling
- Bid/ask spreads
- Importance of liquidity
- Basic technical and fundamental factors
- Basic finance
- Trading on margin
- Risk management
As a trader, you need to know this stuff! Generally, I recommend building a solid knowledge foundation before risking any significant amounts of real money. Otherwise, I can tell you with a relatively high level of confidence that things won’t go too well.
Step 3: Learning to Program
There is simply no way around it. If you want to become an algorithmic trader, you will have to learn to code, unless you already have sufficient programming experience. But don’t worry. Learning to program can be fun and it is a very good skill to acquire anyway. Besides that, learning to program really isn’t that hard either.
Which programming language should you learn for algorithmic trading?
The language that you should learn for algorithmic trading purposes depends on what exactly you are planning to do with it. However, in my opinion, a very good and versatile language to start with is Python. It is easy to learn and you can do a lot with it. Furthermore, one of my favorite algorithmic trading platforms also solely supports Python for its algorithms. But more on that further down.
Alternatives to Python would be Java, C++, C# or even R. In an ideal world, you would learn more than one programming language. However, this isn’t necessary if you don’t want to do so. But believe me, after you learned one programming language such as Python, you will have a much better time learning a second or later even a third coding language.
A great place to start learning how to program is Udemy. Udemy is an online learning platform with thousands of courses on a wide variety of different topics including programming. Usually, you can get a course for as cheap as $10.
You can check out Udemy’s course catalog here.
Step 3.5: Learning Data Science
Before finally being able to start developing your own trading algorithms, you should learn how to deal with data. This can be just as essential as learning how to program. To develop your strategies, you will want to take advantage of the available data that exists in our day and age. However, to do so effectively, you should ideally acquire some data science skills.
Once again, no matter what you do, this is a useful skill to learn regardless. If you don’t learn how to handle large amounts of data, you could fall into some common pitfalls that could severely hinder your trading algorithms from performing as intended. So acquiring some basic data science knowledge is part of learning algorithmic trading.
Once again, a great place to learn about data science is Udemy. I know that having to learn all these different things might seem overwhelming. But don’t worry. At the end of this article, I will provide you with a link to a course that covers almost all the topics mentioned in this article. I have personally taken this course and can only recommend it.
Step 4: Develop Your Own Strategies/Algorithms
After learning how to program and about basic trading concepts, it is finally time to develop your own trading strategies in form of algorithms. But
Algorithmic Trading Platforms
To develop, backtest and optimize trading algorithms, you will need access to large amounts of trading data and access to a platform with a solid infrastructure that supports this. Luckily, you won’t have to acquire any of this yourself.
In fact, you can gain access to the just-mentioned things without having to spend a dime. Here are a few different platforms for algorithmic trading:
Quantopian is a web-based platform that allows you to backtest and create your own trading algorithms. Quantopian is probably the most popular and most used platforms when it comes to algorithmic trading for retail traders. They also offer the opportunity for your algorithms to participate in trading contests in which the creators of the best
The very best algorithms are even offered a chance to get funded with investors’ money. If you achieve this, you will obviously receive a certain percentage of the profits achieved with your algorithms (typically 10%).
Furthermore, every trading algorithm that you create on Quantopian is your intellectual property.
Sadly, Quantopian does no longer support live trading. Therefore, they are now primarily a platform that can be used for research and development of your algorithms instead of actually trading your strategies.
Cost: Free (except for some premium data)
Assets: Equities and Futures
In my opinion, QuantConnect is the best all-round quant trading platform. They support Equities, Forex, Futures, Crypto, Options, and CFDs trading. They allow you to paper trade and live trade your algorithms through various brokers including Interactive Brokers. They also host competitions and have a great community behind them.
Cost: Free & Paid (for live trading)
Language: Python and C#
To learn more about which platform is right for you, check out my article on the best algorithmic trading platforms.
A few examples of brokers that support algorithmic trading are:
- Interactive Brokers
- and more
With that being said, you really shouldn’t be concerned about signing up to a broker that has algo trading capabilities yet. Go through all the other steps first. Real life implementation is one of the very last steps.
Develop your own trading algorithms… finally!
Now it is finally time to develop your own trading strategies/algorithms. This is much more than just coming up with one good idea for a strategy. You also have to translate that idea to code, backtest it, optimize it…
Here are the steps necessary to create a winning trading algorithm:
- Come up with an idea: This will be the foundation of your trading strategy. Ideally, you find some kind of edge/inefficiency to exploit.
- Code it: The next step is to translate your idea into code.
- Backtest it: Next, it is time to test your algorithm on historical data.
- Optimize: You should continuously try to improve and optimize your
- Add safeguards: It is essential to add risk management to your trading algorithm. Add safeguards so that you can’t lose more than a certain amount of money on a single trade. Examples here would be stop-losses, dynamic position sizing, trailing stop losses, exposure and leverage limits etc.
- Test and optimize, optimize, optimize…: Don’t forget to backtest and to not stop optimizing! You should really stress-test your algorithm with a wide variety of different events to make sure it can handle the real world.
- Paper trade: Before letting your algorithm trade with any real money, let it trade with some no-risk, imaginary money. This will also allow you to find out if you overoptimized your
algoto the backtest data.
- Start small: Assuming everything else so far went good, it is finally time to start feeding your algorithm some real money. With that being said, make sure to start small.
- Increase size: If you are satisfied with the algorithm’s performance, you can slowly begin to allocate more capital to it.
- Optimize and monitor: Especially, in the beginning, it is very important to monitor your algorithm(s) so that you can see if it does what it should do. Ideally, all bugs should have been fixed in the previous steps. Nevertheless, you should oversee it and even consider intervening if there are problems.
I recommend checking out my article on how to develop a trading strategy to learn more about developing a profitable trading strategy with a real edge.
Here is how Quantopian’s integrated development environment looks like. This is where you can create and backtest your trading algorithms:
The world of quantitative trading is a very exciting and rapidly expanding one. I can only commend you if you want to get into it. I really hope this article gave you a good introduction to the ins and outs of algorithmic trading. Furthermore, I hope you now know how to continue your journey to learn
Here is a brief recap of the 4 steps you need to take to become an algorithmic trader:
- Understand what algorithmic trading is. (✅)
- Understand the world of trading. (❌)
- Learn to program and data science. (❌)
- Develop your own trading strategies/algorithms. (❌)
It is important to understand that all these steps go hand in hand with each other. Your ability to create robust and profitable trading algorithms highly depends on your understanding of the markets and coding/data science skills. The more you learn about programming and trading, the more tools you will have in your trading
Earlier in the article, I promised that I will provide you with a link to a course that I took that covers all of the above steps. So that’s exactly what I am going to do now:
The course is called Python for Financial Analysis and Algorithmic Trading. Just like the name implies, it covers everything from a crash course to python to some data science and how to use Quantopian to develop your own trading algorithms. Note, however, that if you are completely new to programming, you might want to take another course that is more tailored to learning how to program before taking this course.
The course has almost 20 hours of video material, 121 lectures, exercises, downloadable resources and more. Usually, you can gain access to the course for $10-$20.
If you prefer to take a different course, you can browse thousands of other courses on Udemy by clicking HERE.
Some of the links within this guide are affiliate links of which I receive a small compensation from sales of certain items. There are no added costs for you and these affiliate links do not influence the objectivity of my content. I do only recommend products that I have personally tested and used.
22 Replies to “How to Learn Algorithmic Trading Fast and Easy”
I started trading a few years ago and it was fairly profitable for me. I have since taken a back seat from trading but do keep updated with what’s going on in the industry. It was great to read your detailed article about algorithmic trading it has certainly given me a buzz to get back involved again. Thanks
I have read the whole content you represent here about learning algorithmic trading. I have seen many friends and some times myself for losing our money for emotional trading. I have been always searching a better way of making consistent profit and I have already completed all basic knowledge of programming. I am interested to learn this algorithmic programming. I am going to purchase this training soon.Thanks for posting great informative article.
I am happy to hear that you enjoyed this guide. Algorithmic trading is a great solution for emotional trading.
I trade US tech stocks but I’ve never heard of Algorithmic Trading before – very interesting article (and thank you for introducing me to the concept!).
I agree with you that one of the biggest downfalls of Discretionary Trading is the human nature involved in it – people see money as money instead of trading ammo, so they make rash decisions when trading with it. In my book – anything that can remove this sort of human nature in trading is a good thing!
I couldn’t agree more. I truly believe that the biggest challenge of discretionary trading is the human/emotional factor. Humans simply aren’t built or raised to become unemotional, completely rational thinking traders.
I have just started with learning Forex trading and this is a very informative article, but it raises a lot question for people who are relatively new to trading. I have some of them here:
Can this be compared to the algorithms that come pre-installed with a lot of Forex trading apps?
What do you mean with retail trading and how does this fit into algorithmic trading?
Do you buy these algorithms and what price range are they?
I also don’t have time to browse the markets constantly so this is a viable method for making trades.
Great questions. Yes, this can be compared to algorithms that come pre-installed with certain apps. The main difference being that you develop them yourself instead of just using algorithms that were developed by someone else.
With retail trading, I simply mean ‘normal’ individual traders such as you and me. The opposite would be professional institutional traders that trade for banks, funds or other firms.
You can buy trading algorithms and the prices can vary hugely. However, I don’t necessarily recommend buying trading algorithms or generally, just using someone else’s algos. The reason for that is that, if you do this, you won’t understand what the algorithm is doing and why it is doing it. Furthermore, the algorithms that are available to purchase for retail traders often aren’t of the best quality. I encourage you to follow the steps outlined in this article and develop your own algorithms.
An excellent and thorough article on learning about algorithmic trading. I do not think I have ever read a better and more concise explanation of the process and, in the introduction, the differences between algorithmic and manual trading.
Your step-by-step explanation helped me understand in detail what is involved and things to watch for. I do like the idea of taking the emotion factor out of trading, as these can really throw your investments for a loop as the market swings up or down…
Having said this, I likely would go for an out-of-the-box solution, as my time is limited. I know that limits the scenarios I can try to what is offered with the platform, but on the other hand, it would fit into my time limitations. I totally agree that a wise investor will gain knowledge before jumping in.
I have taken the time to learn about the finer points of investing and trading, but not to the level of programming. It is a cumulative process, and well worth the effort, as you will save yourself from losing a lot of cash when trading. Good article, good advice, and a good read. Thanks!.
Thanks so much for the kind words. I really appreciate it and it is great to hear that you enjoyed the read.
Algorithmic trading is indeed not just something a beginner should jump into if he or she does not have an idea about it as it is very difficult to understand at first because not only do you have to develop your own trading strategies you do also need to translate that idea into coding. This is very difficult i wish i had someone to put me through privately
Thanks for the comment. I agree that a beginner shouldn’t just start trading algorithmically with real money right away as this can lead to financial ruin. However, learning how to trade algorithmically really isn’t that hard. I recommend taking one step at a time. For instance, start by learning about the world of trading and ignore everything else in the beginning. If you don’t want to spend anything on a course, you could use free resources such as TradeOptionsWithMe.
Thanks for such an interesting and informative post on how to learn Algorithmic Trading. It’s very obvious that Algorithmic Trading is getting popular for its many benefits over manual trading.
quora – How-much-trading-in-the-stock-market-is-algorithmic-trading-and-how-much-is-non-algorithmic, this discussion on Quora would be very beneficial who want to follow the Algorithmic Trading.
It’s really unbelievable that in the U.S.equity market, the percentage is as high as 65 to 70%.
Basically, I think it’s going to be a big success for Algorithmic Trading, as mainly it is controlled by computer programs, and will be no surprise if it totally takes over manual / Discretionary Trading.
Thanks for your insights. I too believe that algorithmic trading will only become even bigger in the future.
Awesomely explained Louis,
I’m still new in forex trading so I haven’t reach algorithmic trading yet, I’ve never heard of the term. I only trade when my group gives out signals but I love learning new things to increase my trading knowledge. The Phyton course looks super awesome, I can’t wait to join!
Just to make sure we’re on the same page (I’m a slow learner), when it comes to algorithmic trading, does it mean that the computer trade for us or do we trade according to the computer’s algorithms?
Thanks for the question. When you create algorithms to trade, you don’t do any trading yourself. Everything is automated and done for you by your algorithm. Note, however, that you will always have the ability to intervene if something goes wrong or if you are unsatisfied with certain trades.
I really love the article. I read this a month ago and have started my learning journey on Udemy.
I’m just curious about… Do you use the algorithmic trading in real money now?
I am happy to hear that you like this article. I have not used any algorithmic trading with real money yet. However, I am planning on testing some of my trading algorithms with real money very soon.
When tastyworks releases their API, I might even be able to trade algorithmically directly through tastyworks.
I have tastyworks and TOS.
Is there any example using Python to call API and do the actual trading in either platforms?
Thanks for your question. tastyworks does currently not have an open API yet, but they have already announced that it will be one of their upcoming features.
thinkorswim (TD Ameritrade), on the other hand, does have an API to trade with. As far as I know, you need a very big account or high trading volume to access the API. I recommend contacting their support team to clarify what the exact minimum requirements are. The API language is not python, but it shouldn’t be too hard to learn.
I hope this helps.
Thank you for your blog this was very good for beginners. I have been algo’s trading for a while with Interactive Brokers using a combination of C, Python and Java. But I want to move into using QuantConnect with Python and Interactive Brokers. You are an Options guy like me are there any course that teach QuantConnect Python with Options on Udemy or else where.
Also QuantConnect has an offline version called LEAN. Do you know if the offline version can be used with Interactive Brokers. Also are there any course on how to setup and use the offline version with InteractiveBrokers?
You sound very skilled and as you are into Option trading and Algo trading, maybe there is a market for you do build a couse in either of the area. I think there would be a demand.
Personally I am hoping that TastyWorks will release an API or IBridgePy will expand there API to support TastyWorks. I find InteractiveBrokers the data and brokerage cost high compared to other brokers now. IBridgePy does support TD Ameritrade (Think or Swim) (ToS), but does not allow traders from Australia to join.
My plan is to find away to move away from my C built testing and trading platform, because my historical data is limited compared to QuantConnect. Test my strategy ideas on QuantConnect and then deploy them on LEAN with IB or rewrite them for TastyWorks API or IBridgePy if and when they support TastyWorks.
Thanks for the comment. Yes, the local version of LEAN also allows you to trade through IB. You can check out QC’s YouTube channel for some short tutorials. They are actively working on improving the docs and video support for this feature.
I am also hoping that Tastyworks will release an open API soon.