What is Algo Trading and how does it work

Get started with Algo Trading

What is Algo Trading

What is Algorithmic Trading or Algo Trading?

Algorithmic trading helps to make trading decisions in the stock market by using advanced mathematical tools and models . It is also known as automated trading or black-box trading. Algo trading uses a computer program that follows a predefined set of rules to place orders. Market data is continuously scanned for some specified set of conditions and when these conditions are met , buy or sell order are fired 

Algo trading can make good profits at a speed and frequency that is impossible for human beings. In this trading, all the predefined rules are based on timing, quantity, price, etc. All the institutions that have to perform large numbers of orders daily will use this method of trading. 

The algo trading system works by collecting data from the exchange based on which a procedure is formulated, and the trade is executed. 

Previously, for trading, the data was collected manually and orders were placed using a telephone for the trade execution. But now, Algorithmic trading has come into reality. The complete process of collecting market details and executing orders has become automated.

Upstox

Components of Algo Trading System

There are three essential parts of Algorithmic Trading Platform, which help to find the data to place the orders are

  • Market Data Adapter
  • Complex Events Processing Engine
  • Order Routing/Management System

Lets understand these components one by one

Market Data Adapter: 

This is the initial segment, which takes the data from the exchange and converts it into a trading system format to understand. It is essential to know because data received from the exchange is raw and comprises parts of data packets. When the adapter processes this data, it will automatically store in the orders.

Lets understand it with an example. Currently NSE(National stock exchange) provides live market data on its servers in form for files . Data vendors develop systems that read these binary files and convert them into readable data . This data is consumed through API(application programming interface) provided by these data vendors. 

So basically, when you want to design your own Algo trading system , the first step will be to gather market data . You can get it from data vendors authorized by exchange or directly from exchange and feed the data to your program for further processing.

Interestingly, for small retail investors, Many discount brokers in India are coming with API that can be easily consumed to fetch market data at nominal prices for “PERSONAL” use.

Example Zerodha provides Kite API for easily fetching market data.

Complex Events Processing Engine: 

This is the main part of the Algo trading system, and here the whole magic takes place. The market data , which is fetched , is now analyzed based on complex data points analysis and technical indicators analysis . Usually we write custom algorithms , or set of rules , based on which Buy or Sell view is generated in any stock or financial instrument. 

Let’s take an example to understand it better.

I may design a trading rule where i buy a stock when

  • Its current market price crosses 200 day moving average 
  • Todays volume is more than 5 days average volume 

So what we do is, we scan every few seconds the latest price and market data and then check if any stock meets above 2  rules . As soon as such conditions are met , we get signal for buy or sell 

This is just a very simple example. In real time , Algorithms scam hundreds of data points every second and look for opportunities in stock markets.

Order Routing/Management System: 

This is the final level in the procedure, which collects the instructions from a complex events processing engine and converts the order into a programming language. Orders are then fired to the exchanges directly , or through some third party broker .

Usually , orders in algo trading are placed with clear entry and exit levels. 

What is algo trading - Algo trading process
Algo Trading Management System

How can you do Algorithmic Trading?

To start algo trading, you have to formulate your strategy like 

  • For which set of stocks you want to trade through algo 
  • Design Entry and Exit Rules 
  • Backtest your strategy on Past data and see if its working well
  • Deploy the strategy in Real markets with Risk and money management

Remember ,  you have to backtest your strategy thoroughly using the previous data to know whether it is giving good results for the current market. Once it is completed, you should convert it into an algorithm program  and position it to the server, where it will keep on searching until it detects a relevant match for your trade. Once that is determined, your trade is completed and automatically transferred to the exchange.

Lets understand by example how to start algo trading in India for Retail Investor

Step 1 : Sign up for a API with a broker (example  Zerodha Kite)  . This api will give you access to market data as well as execute orders in your broker account (zerodha is itself a broker) . If you want just market data through API, you can also contact data vendors like Globaldata feeds.

Step 2 : Design an algorithm or strategy rule which you will use to buy or sell stock. Once you backtest this strategy , you can convery into a Python programming language code that will process data obtained in step 1 and generate buy sell signals.

Step 3: Use your stockbrokers API to send orders.

Example

A trader might use algo trading to execute orders quickly when a particular stock strikes a specific price. The algorithm will command how many shares to purchase or sell based on the predefined instructions. 

zerodha

How is algorithmic trading Beneficial in the stock market?

  • Human errors and emotional activity can be avoided completely.
  • A high volume of trades can be easily placed, whereas it is not feasible for the human trader.
  • Algo trading performs at high speed with accuracy.
  • Algo trading is highly effective in processing the previous data, which can be backdated from the last ten years.
  • Highly Disciplined, since the instructions are programmed previously.
  • While doing algo trading, you never miss a single trade that suits your parameters.
  • You can observe all the stocks in the exchange every moment for a given standard.
  • You can do your job because there will be manual interference in your trading.
  • Reduce Transaction Cost

ALSO READ: What is Support and resistance

Recommended Brokers

zerodhaNo 1 STOCKBROKER IN INDIA
Zerodha
Free equity & mutual fund investments | Flat ₹20 intraday and F&O trades
Rating
★★★★★
APPLY NOW
Angel BrokingGET FREE DEMAT ACCOUNT
Upstox
Fix brokerage of Rs. 20 per trade
Rating
★★★★
APPLY NOW
angel-brokingGET FREE DEMAT ACCOUNT
Angel Broking
0 Brokerage on Equity Delivery | Rs 20 per order for Intraday‎ and F&O trades
Rating
★★★★★
APPLY NOW
Investobull.com is a one stop place for all Finance resources We write on Finance , Trading , Investments and Economics. Follow us on Twitter , facebook and Youtube