1. News
  2. Explained

SEBI, APIs and Algo Trading: Algorithmic Trading, Explained

Dec 11, 2021 12:50 PM 6 min read

On Thursday, SEBI issued a consultation paper on algorithmic trading by retail investors, inviting public comments on the same by January 15th 2022.

Before we discuss what SEBI’s new proposals are - and why they seem to have stirred up a hornets' nest in the brokerage community - let’s revisit the basics.

What is Algo Trading?

As the phrase suggests, algo trading involves using computer programs that follow certain predefined directions to place a trade. These directions could relate to trade volumes, stock prices, price level movements, news stories, tweets, moving averages or any number of technical indicators.

Let’s take an example. Say you want to buy 100 shares of Zomato (LTP: ₹140.55). You can go about this in three ways. One, you search for the stock on your brokerage platform and place your buy order at a particular price.

But say you’re a seasoned trader and know what you’re doing. You expect big price fluctuations in the Zomato stock in the near-term and only want to buy the 100 shares when the 50-day moving average reaches a particular level. And you also want to sell the shares as soon as the RSI indicator dips below 70.

Which brings us to scenario two: you manually monitor the share price and technical indicators in real-time and execute the buy and sell transactions when you see your criteria being met.

Needless to say, that can be a tedious task. Especially trading isn’t your full-time job. Especially when you’re a mutual fund or insurance company and have to routinely execute high-volume trades.

This where scenario three - aka algo trading - comes into the picture. You essentially delegate your work to an algorithm so that (1) trades are executed as soon certain conditions are met (2) instantly and accurately to avoid any abrupt price fluctuations (3) with no scope for human error (4) in a purely mechanical process devoid of emotional or psychological factors and driven by pure data.


Chained to the Algo-Rhythm

The automation of market processes can be traced back to the 1970s, when the New York Stock Exchange began computerising order flows.

In its early days, algo trading was used for simple buy-sell transactions with basic parameters. One popular usage was purchasing a dual-listed stock on one exchange and selling it on another to pocket an arbitrage profit. But with the development of more advanced algorithms, algo trading today is characterised by sophisticated trades that may involve predictive analysis, AI and machine learning. And it's no longer restricted to equity or foreign exchange markets.

FYI: One of the most popular examples of investing based on cold, hard data analysis and algorithmic predictions is probably Jim Simons and Renaissance Technologies, the "most successful hedge fund in the world".

Today, algo trading makes up 80% of all trades in the US by volume. In forex markets, this number is also 80%. As for India, despite being a relatively young trend, algo trading’s share in the market had already reached 50% (by volume) as of 2018.


India's Tryst With Algo Trading

Automated trades began in the country in 2008, broad guidelines for which were announced in 2012.

Initially, these trades were restricted to institutional investors. But there has been increasing retail participation in the algo trading space over the years due to (1) the rise of fintech and discount brokerage services and (2) encouragement by exchanges, which in 2010 began leasing co-location servers to broking firms.


What are the Existing Rules for Algo Trading in India?

Broadly speaking, current regulations enable stock brokers to provide algo trading facilities after obtaining permission from the stock exchange.

All algo orders are required to be routed through broker servers located in India and the stock exchange should have appropriate risk controls mechanisms in place. Additionally, algo orders need to be tagged with a unique identifier to establish an audit trail and differentiate them from non-algo orders.

Now let’s look at what probably sparked SEBI’s new paper in the first place...


What is an Application Programming Interface (API)?

Conventionally, traders would analyse stock movements on one application (say, TradingView) and place actual orders on a different one (say, Zerodha).

But now, brokerages also provide APIs, which are platforms that allow traders to devise their own programs and link their screening software to their brokerage provider to execute trades based on their inputs. API access also enables investors to use third-party applications that suit their feature needs.

Basically, this gives tech-savvy traders a lot more control over their trades and enables them to factor in an array of indicators. It also empowers retail investors to build trading infrastructures akin to the ones deployed by institutional investors - provided, of course, you know what you’re doing. (It’s sort of like how low-code and no-code development platforms decentralise the digital world, except that you’re in for an ugly ride if you don’t know how to code!)


What are SEBI's Concerns?

The main concerns are (1) rising retail participation in API-based algo trading and (2) an increase in unregulated third-party algo trading service providers. The regulator notes that “though the broker can identify the orders emanating from an API, they are unable to differentiate between an algo and non-algo order emanating from an API”.

Translation: More and more retail investors are using third-party algo services or building their own API-linked architectures. But these algos are being “deployed without taking requisite approvals from the exchanges as per the extant provisions”. This means neither the stock exchange nor the broker is able to identify if a particular trade emanating from API links is an algo or a non-algo trade.

SEBI, APIs and Algo Trading: Algorithmic Trading, ExplainedSEBI contends that such a situation could “pose a risk to the market and can be misused for systematic market manipulation as well as to lure the retail investors by guaranteeing them higher returns”. The regulator also argues that an unregulated algo trading market could see subpar programs available off-the-shelf and marketed as get-rich-quick schemes for duping investors.

Moreover, ill-intentioned players could also devise "predatory algorithms" that drive artificial price signals to mislead other algorithms. (One such recent instance involved a trader in London, who spoofed over 150,000 orders that were quickly cancelled. This created a massive “flash” crash, where algorithms lost their footing even as the misleading trader garnered around $40m.)

SEBI also stressed the need for an investor grievance redressal mechanism to make algo trading safe, concluding that “there is a need to create a regulatory framework” for the space.


What are SEBI’s Suggestions?

Primarily, the regulator has proposed that "all orders emanating from an API should be treated as an algo order and be subject to control by the stock broker". Consequently, "the APIs...should be tagged with the unique algo ID provided by the stock exchange."

Also on the table are provisions for making the stock broker responsible for all algos emanating from its APIs and redressal of any investor disputes. As for third-party API players, SEBI has said “there is  limited  understanding  with  respect  to  the  nature  of  services provided by them”, so “brokers may obtain from their clients” details about the same so that a progressive policy framework can be devised.


Up In Arms: Why are Brokers Concerned About SEBI's Proposals?

The suggestions have not been particularly met with unanimous applause. Traders who employ algo and API services are naturally concerned. Brokerages - especially the new-age tech-enabled ones - are also shaking their heads. Most concede that the space needs to be regulated but pointed out that asking brokerages to analyse all API-based trades is impractical.

Zerodha CEO Nithin Kamath, for instance, wrote that proposed regulations, if implemented, will cause "all brokers to stop offering APIs" altogether because getting exchange approvals for any and all algos used by customers using APIs and then validating the same is an extremely tedious and complex process. "[This] will mean our capital markets taking two-step backwards in a technology-first world."

Some struck a more conciliatory note, saying the move could improve accountability in the system. To quote the head of investment platform Dhan: "[It's] a very fair ask. If you are worried because you are doing something wrong, then you shouldn’t be doing that in the first place."

The proposals are in the public domain and SEBI has called for comments from all stakeholders before January 15th. Expect more than a few changes to the proposed rules before the final policy is out.


Congratulations! You've made it to the end. Looking for more takes on Business, Finance, Markets and Investing? Subscribe to TRANSFIN. E-O-D for informative and insightful daily news updates