Updated: Feb 12, 2022
Algo trading, also known as algorithmic trading, is a method of trading securities (stocks, futures, options, etc.) that uses computers to execute trades based on pre-determined criteria automatically.
Algo traders use a variety of strategies, including market making, trend following, and arbitrage.
As trade volume has increased in modern markets, algo trading has become an essential part of helping banks and hedge funds get an edge over market competition. Nowadays, even many retail traders started using algo trading.
First, we'll introduce the basics behind algorithmic trading and then explore a simple example of how you can use Amibroker to build your algo trading system.
What is Algorithmic Trading?
Algorithmic trading is a simple method of executing trading orders (buy or sell) using automated pre-programmed trading instructions to send orders whenever some criteria are satisfied.
They were developed so that day traders do not need to watch a price chart continuously and subtract emotions in trading.
Popular 'algos' include Volume Weighted Average Price (VWAP), Straddle, Strangle, Iron Condor, VWLO, and more.
History of Algo Trading
The history of algorithmic trading, or algo trading, can be traced back to the early days of electronic trading. In the late 1990s, exchanges and institutional investors started using electronic order matching engines to automatically trade securities. These algorithms were simple at first, but they soon became more complex and sophisticated.
Today, algo trading is a key part of the financial markets. It accounts for a large percentage of all trades in equities, futures, and options.
In India, algo trading started when the leading stockbroker Zerodha give API access to all the retail traders in 2016.
“No human is better than a machine. No machine is better than a Human with a Machine.“
What is an Algo Trading System?
Two of the most vital factors in building an algo trading system are research and development.
First, you must carefully study your market to understand how it functions. Then, you will need to backtest your strategies using historical data.
From there, you can adjust your algo trading system to become more efficient before putting it into use on the market.
Unless you are an experienced trader who already understands how markets work, it is unlikely that your first algo trading system will be profitable.
Therefore, be prepared to spend a significant amount of time getting everything right before you know for sure if your system works or not.
While the two most important aspects of building an algorithmic trading system are research and development, many other factors can affect your algorithm's success.
Research & Development - One should have a trading concept or strategy that can be expressed mathematically.
Historical Data - A minimum of 3-5 years of historical data of the instruments are required to access the performance of a trading strategy.
Backtesting Tool - This includes tools such as Amibroker or Python running in your backtesting environment. These tools can help you generate market scenarios, analyze market efficiency, and more.
Libraries - There are various tools to help you with your algo trading system. For example, if you're using Amibroker, then you should check out the Amibroker library. If Python is your cup of tea, then be sure to check out the PyAlgoTrade library.
Trading Account - You need to ensure that you have an account that allows you to place orders at the time periods you've specified in your algo trading system.
How to Build an Algo Trading System?
An algo trading system is an automated, computer-based method of executing trades.
The goal of designing and building an algorithmic trading strategy is to create a system that will allow you to enter the market in a disciplined way while increasing your odds for success.
There are three main components involved in building a robust algorithmic trading system:
1 - Defining Your Strategy
An algo system strategy is a set of rules that will tell your computer when to buy/sell, as well as how much to trade.
A good strategy clearly defines risk parameters, entry/exit points, position-sizing, etc.
It is very important to convert your trading idea into a boolean expression. After the conversion, backtest with historical data. If it displays positive expectancy, then it can be deployed to live trading.
2. Selecting the Best Market Data Feed
The next step is choosing a market data feed that can provide you with the necessary data to implement your strategy.
For example, suppose your strategy requires getting quotes on options or futures contracts. In that case, you will need to use a broker which provides access to these asset classes.
3. Building the Back-End Infrastructure
In order to have a functioning algo system, you need to be able to program and integrate your strategy with a platform capable of sending dozens, hundreds, or even thousands of orders per day.
Today, several brokerages offer various tools and APIs to help you build the infrastructure necessary to deploy and automate your strategy.
Traders have to connect the below components to execute an algo trading strategy:
Algo Software - It can be Amibroker, Python, Excel, or Java.
Live Datafeed - A service provider that gives accurate live data. Accelpix and Truedata are the best in India.
Trading Account - A stockbroker who provides API access at less price. Zerodha, Upstox, Fyers, and Alice Blue are some of the good brokers in India.
Algo Trading vs Discretionary Trading
In some ways, algorithmic trading is a natural evolution of the traditional stock market trading strategy.
The basic idea behind algorithmic trading is to program a computer with complex rules governing buying and selling stocks based on specific criteria.
Algorithmic trading is distinguished from traditional discretionary trading by using complex sets of rules, which often look at data beyond simply recent price movements, and by the fact that computers usually execute such orders.
However, it does not always replace human decision-making on which securities to trade, when and how much to buy/sell, at what price.
Discretionary traders rely on their own analysis of the markets to choose securities to buy or sell. For example, their trading may be guided by news events, changes in market sentiment, or fundamental analysis.
Although algorithmic trading is typically based on an objective set of rules, there are versions that are discretionary. The computer system will only initiate a trade when the trader requests it to do so within parameters set by the trader, who can override the system at any time.
Robo-Advisors: An Algorithmic Form of Fund Management?
A robo-advisor is an online algo management service that provides automated order placements services at low costs.
The main advantage is that, with robo-advisors, you don’t need any coding knowledge or skills to start algo trading.
Everything can be done online by setting up an account with the robo-advisor service of your choice.
They have some inbuilt trading systems, and a trader can pick any system. It will automatically take trades in his trading account whenever the criteria are satisfied.
Although robo-advisors sound like some futuristic, sci-fi concept - and they can certainly provide you with an edge in the trading world by fielding orders quickly and without emotion.
How Much Money Do You Need to Get Started?
It depends on the trading strategy deployed by the algo trader.
If the trading strategy is built to take only options buying trade in nifty/banknifty, then Rs.50,000 is enough to buy 1 lot of CE or PE.
If the trading strategy is developed to do option selling, approximately Rs.1,50,000 is needed to sell 1 lot of CE/PE in Nifty/Banknifty (at the current price level).
If a trader is deploying a short straddle or short strangle, he would require Rs.2,00,000 capital to trade 1 lot.
Suppose you are a trader with small capital. In that case, robo-advisors can be more affordable than setting up the algo system by yourself because their fees are negligible compared to the overall infrastructure cost.
Algo Trading: A Good Choice for the Everyday Trader?
Every trading strategy has its advantages and disadvantages. For example, discretionary traders can jump on opportunities as they arise but may end up with a sub-optimal entry point if they fail to time their trades properly.
On the other hand, algo traders typically enter at order at optimal times but do not have the ability to jump on opportunities as they arise.
However, it is important to note that many factors are involved in creating a robust algo trading system. Some strategies work better than others, and there are various pieces of infrastructure that you will need to implement your strategy.
If building an algorithmic trading system sounds like too much work for you, you can always turn to pro traders who have already done the hard part and created profitable systems they are willing to share with you.
To begin investing through a robo-advisor, you will need an account with those particular brokers (as they have signed with only a few brokers).
Mostly, there is no cost involved when setting up your account because the robo-advisors can provide their service at a lower cost by using technology and minimizing human interaction.
Algo Trading Course via Amibroker - A Detailed Guide
Amibroker is the famous software used by most traders to build their algo systems.
Below are the videos which help you learn amibroker from basics.
That’s all for now. But before you go, I wanted to leave you with a special offer.
If you’re interested in learning more about profitable trading systems, then have a look at my online course called “Trade Like Crazy.”
It covers everything from the trading idea, Amibroker AFLs, and backtesting results. You can find out more information by clicking on the link here.
Thanks for reading and I hope you found this article helpful!