What is algorithmic trading?
Algorithmic trading is the process of using computers programmed to follow a defined set of instructions (an algorithm) for placing a trade in order to generate profits at a speed and frequency that is impossible for a human trader. The defined sets of rules are based on timing, price, quantity or any mathematical model. Apart from profit opportunities for the trader, algo-trading makes markets more liquid and makes trading more systematic by ruling out the impact of human emotions on trading activities.
In layman terms, AlgoTrading completely eliminates the need for manual intervention. Once the rules of the logic have been coded into the Algo, it will carry out end-to-end automation of trading ie. tracking the market for opportunity, placing the order, monitoring stop loss and risk, squaring off when required.
Algos can be used for trading on any exchange segment- equities, F&O, foreign exchange, commodities as well as cryptocurrency. Indian exchanges like NSE, BSE, MCX, NCDEX, FX, or crypto exchanges like BITMEX, BITFINEX, etc.
How does it work?
Consider the below example:
- Buy 50 shares of a stock when its 50-day moving average goes above the 200-day moving average. (A moving average is an average of past data points that smooth’s out day-to-day price fluctuations and thereby identifies trends.)
- Sell shares of the stock when its 50-day moving average goes below the 200-day moving average.
Using this set of two simple instructions, it is easy to write a computer program that will automatically monitor the stock price (and the moving average indicators) and place the buy and sell orders when the defined conditions are met. The trader no longer needs to keep watch for live prices and graphs, or put in the orders manually. The algorithmic trading system automatically does it for him, by correctly identifying the trading opportunity and executing the trading order.
What are the various applications of algorithmic trading? For whom is algorithmic trading useful?
- Mid- to long-term investors or buy-side firms – pension funds, mutual funds, insurance companies – use it to purchase stocks in large quantities when they do not want to influence stock prices with discrete, large-volume investments.
- Short-term traders and sell-side participants – market makers (such as brokerage houses), speculators and arbitrageurs – benefit from automated trade execution; in addition, algo-trading aids in creating sufficient liquidity for sellers in the market.
- Systematic traders – trend followers, hedge funds or pairs traders (a market-neutral trading strategy that matches a long position with a short position in a pair of highly correlated instruments such as two stocks, exchange-traded funds (ETFs) or currencies) etc. – find it much more efficient to program their trading rules and let the program trade automatically.
How is it better than manual trading?
When trading manually, a trader’s usual work flow will be as follows.
- Looking at charts, quotes or news and trying to find a trade signal as per your strategy.
- Filling in the order details when you DO find a trade signal (money time! Yay!)
- Monitoring your trades to see if they reached your target or went in the opposite direction (as they often do)
- Closing positions to either book profits or cut losses
All these tasks need to be carried out immediately and accurately. Sometimes, even simultaneously.Moreso, if the trader would like to test/implement one more strategy, it is extremely difficult to manage both. In these cases, algorithms perform all the heavy lifting work of performing these tasks.
What are the advantages of algorithmic trading?
- Faster & more accurate : Algos can track even a small change in prices & execute orders faster than humans can.
- Processes large amounts of data : Suppose a trader needs to track 1 minute data for 10 stocks. Doing this manually has a very high risk of error. Using algorithms completely eliminates the risk. Algorithms can also be programmed to process multiple indicators for multiple assets without any loss of accuracy.
- Eliminates human biases & sentiments : Algorithms will follow the instructions given, without allowing any bias or sentiment to influence trading decisions.
- Allows for multitasking : Algorithms can constantly run & execute orders according to given instructions, without any manual intervention. This means that traders can be free to create more strategies, take breaks or spend time doing other things.
What are the disadvantages of AlgoTrading?
- Algo systems work extremely fast. So if a position enters into a loss situation, the overall losses could be substantial. This risk can be minimized by appropriate risk management measures.
- These systems are inflexible. They will operate in exactly the manner you instruct it to. So if the market dynamic has changed, the algo would need to be updated as well.
Are any permissions required for algo trading?
The regulation demands that the broker should take the approval on your behalf, you as a retail trader cannot go to the exchange and ask for approval.
What is Backtesting?
In algorithmic trading, backtesting is the process of defining your idea and testing it against historical data. Doing so, you will immediately see if there was any merit in your idea, or not.
With good backtesting software and coding, backtesting is very easy as soon as you’ve understood the basics of the coding language and trading platform. Still, backtesting is not as simple as testing the idea, and then start trading.
What are the different type of executions possible ?
Paper Trading : A paper trade is simulated trading which allows investors to buy and sell securities without risking real money.
Live – Offline : Assume your broker is not algo enabled. No worries. Once the strategy is ready to take a trade we will reach out to you or your broker using a wide gamut of communication methods (whatsapp, email, SMS, voice call). And then leave the rest to you and broker to take forward in whatever manner you are comfortable with.
Live – Auto oneclick : You are in control every step of the way and can choose to execute these trades only after you give a one-click confirmation.
Live – Fully Auto : Your strategy will be executed automatically without seeking any confirmation from you.
Benefits of Algorithmic Trading
Algorithmic trading provides the following benefits:
- Trades are executed at best possible price
- Trade is placed instantly and accurately with a high chance of execution at the desired level
- Trade is timed correctly and immediately to avoid price change
- Low transaction cost
- Simultaneous automated checks on multiple market conditions.
- Low risk of manual error while placing orders
- The method can be backtested using available historical and real-time data to check the viability of the trading strategy
- Reduced possibility of mistakes due to less human interference. Human traders are generally influenced by emotional and psychological factors which are not the case with algorithmic trading.
Utility
The method is used in multiple forms of trading and investment activities. Following are some – Mid to long-term investors Buy-side firms such as pension funds, mutual funds, insurance companies, etc.
- Short-term traders
- Sell-side participants such as brokerage houses, speculators, and arbitrageurs
- Systematic traders that follow trend
- Hedge funds
- Pairs traders
Risks Involved in the Trading System
Trading comes with a risk. Risk includes
- System failures or issues due to network connectivity
- Time lags between orders and execution
Strategies in Algorithmic Trading
Every strategy for implementing algorithmic trading requires an identified opportunity that is profitable in terms of improved earning or cost reduction.
Following are the most used strategies of algorithmic trading;
-
Trend Following Strategy
The trend is the most commonly used trading strategy.
The trends used are moving averages, breakout, price level movement, etc. This is the most straightforward strategy to implement, as the strategy does not require any prediction of price.
Trades are executed based on a popular trend that is easy and straightforward to implement. For example, 30-day, 50-day, and 200-day moving average are the most popular trends used.
-
Index Fund Rebalancing Strategy
Index funds have a defined period of rebalancing.
This helps the holdings at par with the respective benchmark indices. This method creates an opportunity for algorithmic traders.
The traders tend to capitalize on expected trades that offer around 25-75 basis points profit, depending on the number of stocks in the index before rebalancing.
-
Mathematical Model Based Strategy
Some of the models such as delta-neutral, allow trading on a combination of options and underlying security.
For novice readers, delta neutral is a portfolio strategy that comprises of positions offsetting the positive and negative delta. Delta is the ratio that compares the change in the price of the asset to its corresponding derivative.
-
Mean Reversion
The said strategy is based on the concept of high and low price of an asset which is temporary and the price reverts to the mean value over time. In this strategy, the main component is to identify and define the price range and thereby implementing the algorithm.
-
Volume-Weighted Average Price (VWAP)
The strategy breaks a large order and releases a smaller chunk of order using historical volume profile for every stock. It seeks to execute the order close to the volume-weighted average price (VWAP).
-
Time-weighted Average Price (TWAP)
The strategy breaks a large order and releases a smaller chunk of order using evenly divided time slots between a start and an end time. The strategy seeks to execute the order close to the average price between the start and end times.
-
Percentage of Volume (POV)
In the strategy, the algorithm sends partial orders according to the defined participation ratio and volume traded in the market.
Requirement for Algorithmic Trading
Implementing the method of algorithmic trading requires a computer program. A computer program accompanied by backtesting completes the need from an execution standpoint.
However, the challenge is to transform the strategies mentioned above into an integrated computerized process including access to the trading account for placing orders.
Following are the technical requirements of algorithmic trading – computer programming – required to program the trading strategy using any language. One can use an existing trading platform as well.
- Network connectivity with access to the trading platform to place order
- Access to market data by way of feeds. This is generally monitored by the algorithm to scout for opportunities for placing orders
- Infrastructure to backtest the system before it goes live or trade in the live market
- Access to historical data for backtesting