automated algorithmic trading systems india

How Will Transaction Costs Affect the Strategy?

Every time a strategy buys and sells a security, it incurs a transaction cost. The more frequent it trades, the larger the impact of transaction costs will be on the profitability of the strategy. These transaction costs are not just due to commission fees charged by the broker. There will also be the cost of liquidity—when you buy and sell securities at their market prices, you are paying the bid-ask spread. If you buy and sell securities using limit orders, however, you avoid the liquidity costs but incur opportunity costs. This is because your limit orders may not be executed, and therefore you may miss out on the potential profits of your trade. Also, when you buy or sell a large chunk of securities, you will not be able to complete the transaction without impacting the prices at which this transaction is done. (Sometimes just displaying a bid to buy a large number of shares for a stock can move the prices higher without your having bought a single share yet!) This effect on the market prices due to your own order is called market impact, and it can contribute to a large part of the total transaction cost when the security is not very liquid. Finally, there can be a delay between the time your program transmits an order to your brokerage and the time it is executed at the exchange, due to delays on the Internet or various software related issues. This delay can cause a “slippage,” the difference between the price that triggers the order and the execution price. Of course, this slippage can be of either sign, but on average it will be a cost rather than a gain to the trader. (If you find that it is a gain on average, you should change your program to deliberately delay the transmission of the order by a few seconds!) Transaction costs vary widely for different kinds of securities. You can typically estimate it by taking half the average bid-ask spread of a security and then adding the commission if your order size is not much bigger than the average sizes of the best bid and offer. If you are trading S&P 500 stocks, for example, the average transaction cost (excluding commissions, which depend on your brokerage) would be about 5 basis points (that is, five-hundredths of a percent). Note that I count a round-trip transaction of a buy and then a sell as two transactions—hence, a round trip will cost 10 basis points in this example. If you are trading ES, the E-mini S&P 500 futures, the transaction cost will be about 1 basis point. Sometimes the authors whose strategies you read about will disclose that they have included transaction costs in their backtest performance, but more often they will not. If they haven’t, then you just to have to assume that the results are before transactions, and apply your own judgment to its validity. As an example of the impact of transaction costs on a strategy, consider this simple mean-reverting strategy on ES. It is based on Bollinger bands: that is, every time the price exceeds plus or minus 2 moving standard deviations of its moving average, short or buy, respectively. Exit the position when the price reverts back to within 1 moving standard deviation of the moving average. If you allow yourself to enter and exit every five minutes, you will find that the Sharpe ratio is about 3 without transaction costs—very excellent indeed! Unfortunately, the Sharpe ratio is reduced to –3 if we subtract 1 basis point as transaction costs, making it a very unprofitable strategy. For another example of the impact of transaction costs,

Algorithmic Trading and Automated Trading System Effects

Execution of trades on stock exchanges based on predefined criteria and without any human intervention using computer programs and software is called algorithmic trading or algo trading. While being a subset of algorithmic trading, high-frequency trading involves buying and selling thousands of shares in fractions of seconds.

While it has its detractors, the general consensus is that algorithmic trading is an inevitable evolution of the trading process and markets around the world have implemented various measures to provide a seamless experience to investors. In the US and other developed markets, High-Frequency Trading and Algorithmic trading accounts for an estimated 70% of equities market share. In India, the percentage with respect to the total turnover has increased up to 49.8%.


  • Algorithmic Trading in India: Past, Present and Future
  • Regulations in Indian Stock Markets
  • Algorithmic Trading Platforms
  • How to Start your Algorithmic Trading Journey
  • Frequently Asked Questions about the Future of Algorithmic Trading

Algorithmic Trading in India: Past, Present and Future

On April 3rd 2008, Securities & Exchange Board of India (SEBI), introduced algorithmic trading by allowing Direct Market Access facility to institutional clients. In short, DMA allows brokers to provide their infrastructure to clients and gives them access to the exchange trading system without any intervention from their part. Initially, it was provided only to institutional clients and not retail traders.

Nevertheless, the facility brought down costs for the institutional investor as well as help in better execution by cutting down the time spent in routing the order to the broker and issuing the necessary instructions.

April 29th 2008, this facility had already become popular with some of the top global players signing up for the DMA facility. FI’s & FII’s like UBS, Morgan Stanley, JP Morgan and DSP Merrill Lynch were the entities awaiting approval. Edelweiss Capital, India Infoline and Motilal Oswal Securities were among others who had submitted their request to the stock exchanges. It is worthwhile to note that Foreign Institutional Investors (FIIs) were allowed to use DMA facility through investment managers nominated by them, from February 24th 2009.

By July 31st 2008, leading brokerages along with stock exchanges were preparing the ground for operationalising Direct Market Access (DMA). Brokerages such as Citi, Merrill Lynch, Morgan Stanley, JP Morgan, Goldman Sachs, CLSA and Deutsche Equities had started holding test runs of their DMA software, in an attempt to synchronise it with the systems at the stock exchange.

NSE’s Contribution To The Industry

The National Stock Exchange (NSE) started offering additional 54 colocation server ‘racks’ on lease to broking firms in June 2010 in an effort to improve the speed in trading.

Deutsche Bank, Citi, Morgan Stanley, Goldman Sachs, and MF Global were among the foreign broking firms which availed of the facility. Motilal Oswal Securities, JM Financial and Edelweiss Capital figured among the prominent domestic firms who signed up for the racks.

Local brokerages like Globe Capital, SMC, Global Vision, East India and iRageCapital had also opted for the facility. Not surprisingly, with a few weeks of offering this facility, there was a long period of waiting up to 6 months to get a space on the server racks!

It was clear to the Indian exchanges and regulatory bodies that Algorithmic Trading is well-received by the institutional clients and banks in the country and its demand would continue to rise. This was the time when exchanges started improving their offerings in the automated trading domain, financial technology companies started offering automated trading platforms and SEBI continued to regulate the markets.

May 12th 2010, NSE moved to enable the Financial Information Exchange (FIX) protocol on its trading platform boosting transaction speed for overseas investors using direct market access.

In simple terms, the FIX protocol helps in converting the language of the orders given by the Foreign Institutional Investors (FII) in the language understood by the NSE, in effect reducing the time taken for the transaction to be executed.

Changes to the Brokerage Industry

Broker commissions had started shrinking as a result of an increasing number of institutional clients warming up to the Direct Market Access (DMA) concept. To keep up with the times, they started offering automated software to the clients.

The new entrants to this space are discount brokers who are essentially brokers who provide facilities at very low brokerage charges. They are able to do this by providing only minimal facilities, unlike full-service brokers who usually provide support as well as training programs for their clients.

Regulations In Indian Stocks Markets

Every year SEBI comes up with regulations to be followed by traders and brokers to keep the trading industry safe and risk-controlled. To read about SEBI’s recent announcement regarding the algorithmic trading industry in India, go to the post here.

Risk management is critical with algorithmic trading. That is why, for any algorithm to be approved by the markets, exchanges require a firm to undergo a series of stringent tests if it intends to trade through algo trading. These tests include the number of orders that would be placed per second, the maximum order value of any order placed, and the maximum traded quantity during a particular trading day.

A brief summary of the latest SEBI circular (SEBI/HO/MRD/DP/CIR/P/2018/62) dated April 09, 2018 is given below:

Managed colocation service

It is suggested that exchanges should change the pricing structure of their co-location renting to make it accessible to small and medium-sized members as the current practice of renting the entire server rack to one entity leads to a high cost.

Latency measurement

In order to provide greater transparency when it comes to reporting the latency for colocation and proximity hosting, it has been suggested that the exchanges should provide minimum and maximum as well as the mean latencies along with the latencies at 50th and 99th percentile.

Tick-by-tick data feed

SEBI has suggested providing tick-by-tick data feed free to the members of the exchanges.

Unique identifiers for algorithms

SEBI has instructed that all algorithmic orders reaching their platform should be tagged with the unique identifier which is assigned when the specific algorithm was submitted for approval.

Future Of Algorithmic Trading In India

With several amendments over the years, India provides a good opportunity for algorithmic trading due to a number of factors such as colocation facilities and sophisticated technology at both the major exchanges; a smart order routing system; and stock exchanges that are well-established and liquid.

Given the rapidly growing trend and demand of HFT and Algorithmic Trading in developing economies & emerging markets, there have been efforts by various exchanges to educate their members and develop the skill sets required for this technology-driven field.

With many different trading platforms and tools available in the market, each claiming to be better than the other, a person who is testing the water in the field of Algo trading may be spoilt and confused by choice. Therefore, we have compiled a list of some of the most popular platforms and algo trading softwares that are being used in the market today (specifically for Indian equity markets), so as to level the playing field and give a clear picture to the users.

To keep up with the racing times, it is necessary that you keep yourself abreast with the latest skills and technology that will help you pave your success in Algo Trading and you need to be in the fastlane for that – like Naoya Ohara who experienced success with the Executive Programme in Algorithmic Trading (EPAT).

The obvious advantage is that an individual trader can create their algorithmic trading strategies in another environment but use the brokers API to place live orders in the market. At the same time, one should consider the cost associated with using the API as well as the general downtime, if any, when you use the API.

As you can see, depending on your requirements and level of expertise, you have a plethora of options to choose from. But how do you get started in algorithmic trading? In the next section, we will try to understand this.

How to Start your Algorithmic Trading Journey

Financial knowledge

Gaining an in-depth understanding of the financial market/instrument to come up with a hypothesis on which you can base your trades. You need to have/develop some knowledge-based edge in any market in which you wish to win over the rest of the participants.

Coding your strategy

Gaining an in-depth understanding of the financial market/instrument to come up with a hypothesis on which you can base your trades. You need to have/develop some knowledge-based edge in any market in which you wish to win over the rest of the participants.

Backtesting your hypothesis/strategy on historical data

Getting hold of quality data is important and is often not free (especially tick-by-tick data). You can try paid sources like Quandl or can check with your broker if they provide historical data. You can also use a third party backtesting engine to make your life simpler such as the one provided by Quantra Blueshift or Quantiacs.

Parameter optimization

The natural result of backtesting and validating is that it will either lead you to completely discard your hypothesis (90% of the time or more!!) or that you have managed to extract actionable signals from the pool of data you started with. You can then optimize your strategy parameters keeping in mind that your strategy should work well on out-of-sample data as well to avoid overfitting/data snooping bias.

Choosing the right broker and platform

It is very important to do thorough research on this beforehand, as your overall efforts should make business sense after all the overhead costs are taken into account. Make sure you only pay for the features you use to execute your strategy efficiently. In short, keep the trading costs low & operations nimble.

Going Live & Risk management

Once you are satisfied with your algorithm, let it do its job in live markets! Manage risks efficiently using limits, stop-loss and Var/Expected shortfall monitoring. Keep an eye on the larger economy/sector for structural shifts/regime changes in which case you might have to alter or scrap your strategy altogether. Remember that every strategy has a limited lifetime.

Keep learning and developing new skills

As they say the best investment is investing in yourself. Look to enhance and update both your domain knowledge and technical skills required to act on that knowledge/information. For example, pick up a book by the likes of Ernie Chan or do an online course to beef up your coding skills.

Granted, you might have a lot of questions now, with respect to algorithmic trading. Let’s try to preemptively answer them.

Frequently Asked Questions about the Future of Algorithmic Trading

Here are some of the most commonly asked questions which we came across during our Ask Me Anything session on Algorithmic Trading.

Is Algorithmic Trading legal in India?

Definitely Yes! April 03, 2008 is when SEBI allowed algorithmic trading in India, so since then it has been legal.

How tedious is it to get legal approval for any automation? How confidential and secured it will be if it goes to automation after approval, is approval process and infrastructure cost affordable for retail traders?

The approval process is not that costly, but yes the infrastructure, if you are going for HFT can be a big burden if you are a retail trader or individual trader but you can do automation and that would not be a huge cost as such.

Assuming this is from an Indian market perspective, India has a peculiar regulation which says that you have to approve each and every strategy before you take it live. This is different from most of the developed market regulations in which you have to get the platform approved and then you can code any strategy you want to on that platform. Same goes for other developing markets like Thailand where you have to get every algorithmic trading strategy approved before you can automate. 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. The cost depends on the broker but technically it’s not that costly.

What are the approvals you need before going algo?

We touched upon this in brief in one of our previous questions but it depends on which geography you are trading into. In case you are trading in the CME, SGX or Eurex then the approval required is more of a conformance test which means that you will be taking approval for your trading platform. Once it is approved you can code whatever strategy on it and send out orders.

In case you are in geographies like India or Thailand then you will need to get your strategies approved and for that what you will be doing is creating a document for each strategy and sending it out to the exchange for approval. If you are a member of the exchange yourself you can send it directly and if you are not a member with the exchange then you send it through a broker. The process in India involves (can vary for different exchanges) to get the strategy signed from the auditor, participate in a mock trading session, then you demo it with the exchange, post that you get an approval from the exchange and then you start trading. That’s the rule you have to follow for each strategy.

How is a strategy confidential if it is going through the approval process?

The exchanges generally do not focus much on the strategy but more on risk management. The focus is that your strategy should not create havoc for the market or for them, which is the key concern for the exchange and not what your strategy does. They would ask you about the strategy at a broad level but I don’t think it goes to a level where your IP is threatened.

How risky is algorithmic trading towards manipulation such as colocation?

Colocation is not manipulation. It’s just a facility provided to you. It’s like saying how risky it is if you are travelling by air by spending more as compared to someone who is travelling by train to a destination, you are reaching faster but you are paying for it and you are getting it so it’s a fair market, you pay for what you get.

For those who colocation matters and for most of the exchanges across the globe it is not that expensive hence the exchanges also have been pretty responsible. Even in India you can get half racks (which is 21 units) you can place a good number of servers in half rack and that comes to around 50,000 rupees a month. I am not saying it’s very cheap but it is not that stringent if you are trading into strategies which are depended upon colocation for which every millisecond matters.

Disclaimer: All data and information provided in this article are for informational purposes only.

automated algorithmic trading systems india

Algorithmic Trading System Architecture

A traditional trading system consists primarily of two blocks – one that receives the market data while the other that sends the order request to the exchange. However, an algorithmic trading system can be broken down into three parts:

  1. Exchange
  2. The server
  3. Application

Exchange(s) provide data to the system, which typically consists of the latest order book, traded volumes, and last traded price (LTP) of scrip. The server in turn receives the data simultaneously acting as a store for historical database. The data is analyzed at the application side, where trading strategies are fed from the user and can be viewed on the GUI. Once the order is generated, it is sent to the order management system (OMS), which in turn transmits it to the exchange.

Gradually, old-school, high latency architecture of algorithmic systems is being replaced by newer, state-of-the-art, high infrastructure, low-latency networks. The complex event processing engine (CEP), which is the heart of decision making in algo-based trading systems, is used for order routing and risk management.

With the emergence of the FIX (Financial Information Exchange) protocol, the connection to different destinations has become easier and the go-to market time has reduced, when it comes to connecting with a new destination. With the standard protocol in place, integration of third-party vendors for data feeds is not cumbersome anymore.

automated algorithmic trading systems india

What is Low latency trading systems and how Algorithmic Trading used to tackle

Network-induced latency, a synonym for delay, measured in one-way delay or round-trip time, is normally defined as how much time it takes for a data packet to travel from one point to another. Low latency trading refers to the algorithmic trading systems and network routes used by financial institutions connecting to stock exchanges and electronic communication networks (ECNs) to rapidly execute financial transactions.Most HFT firms depend on low latency execution of their trading strategies. Joel Hasbrouck and Gideon Saar (2013) measure latency based on three components: the time it takes for

  • Information to reach the trader,
  • The trader’s algorithms to analyze the information, and
  • The generated action to reach the exchange and get implemented. In a contemporary electronic market (circa 2009), low latency trade processing time was qualified as under 10 milliseconds, and ultra-low latency as under 1 millisecond.

Low-latency traders depend on ultra-low latency networks. They profit by providing information, such as competing bids and offers, to their algorithms microseconds faster than their competitors. The revolutionary advance in speed has led to the need for firms to have a real-time, colocated trading platform to benefit from implementing high-frequency strategies. Strategies are constantly altered to reflect the subtle changes in the market as well as to combat the threat of the strategy being reverse engineered by competitors. This is due to the evolutionary nature of algorithmic trading strategies – they must be able to adapt and trade intelligently, regardless of market conditions, which involves being flexible enough to withstand a vast array of market scenarios. As a result, a significant proportion of net revenue from firms is spent on the R&D of these autonomous trading systems.