By Viraj Bhagat
Much has been said about Algorithmic trading and quite something has been written about it. Although there are introductory videos and guides available online, there exist only rare courses like EPAT™ that really aim to turn people into professionals.
This article lists some of the most relevant questions about Algorithmic Trading. These have been put forth by many individuals in our Ask Me Anything (AMA) session on Algorithmic Trading which provided an open platform to get their queries addressed by industry biggies. You could also check out this article about 7 things you didn't know about Algo Trading.
But all of this is much lesser when compared to the human intellect that churns out countless questions due to it’s very inquisitive and exploratory human nature. And why should it not? It is in our blood to ask questions. People are often faced with questions related to Algo Trading and struggle to find the right answers and solutions for them. Before we proceed with the FAQs of Algo Trading, here are some questions that clear the picture of it:
What’s going on with Algo Trading today?
- 75% of global trades are executed via algorithms.
- 35-40% turnover on Indian exchanges is via Algo Trading
- Growth in leaps and bounds with a multitude of institutional investors, individual investors, traders, etc.
Why go for Algorithmic Trading?
What are the most commonly used Algorithms for Trading?In India, Algorithms that use Application Programming Interfaces (API) are the most commonly used ones. Here, the investor selects the strategy, which he then programmes and are executed by the Broker.
What affects Algorithmic Trading?
But it doesn’t stop here. This is just what you should be knowing about Algorithmic Trading. Following are some of the most commonly asked questions which we came across during our Ask Me Anything session on Algorithmic Trading. The questions range from basics to some really interesting and professional ones.
You might get a Deja vu, looking at some of these questions and think… “Haven’t I thought of this before?”
If not, you’ll probably wonder “Why haven’t I thought of this before?”
So, here goes:
Frequently Asked Questions about Algorithmic Trading
Reply: Latency is how much time you are losing out when you are sending out an order. Basically, it is the time taken by the order to reach the trading destination or exchange or how much time it is taking to process market data, order routing and much more.
Q1. What is Latency?
Latency helps you to identify the appropriate infrastructure will set up your own desk. It also helps you to identify if you should be picking up a momentum based strategy or a market making strategy. All these questions become easy to answer once you know what latency your strategy can accommodate.
We have mixed all the concepts of all the different trading strategy paradigms with the latency.
Beyond the definition: What are the types of Frequency Trading?
LFT (Low-Frequency Trading) - If your trading strategy can accommodate a latency of half a second or a second without too much deterioration in the performance we can call it Low-Frequency Trading
MFT (Medium Frequency Trading) - If your strategy cannot accommodate that much but still accommodate a few ten milliseconds of latency, then you are talking about Medium Frequency Trading Strategies
HFT (High-Frequency Trading) - If your strategy cannot afford to have the disadvantage of even 1 microsecond that means we are entering into the game of High-Frequency Trading
Reply: It is not absolutely true to say that High-Frequency Trading (HFT) generally beat manual day traders, it all depends on what kind of day traders we are talking about here. If you are talking about the day traders who are taking benefit from the arbitrage opportunities or market inefficiencies, then yes, machines can do such things much faster.
Q2. Is it true that HFT/Algorithmic traders generally beat manual day-traders? Therefore if conventional trading reduces under a certain threshold HFT/ Algorithms lose their interest in that market? If it is, what is that threshold?
For e.g. If you are a manual trader and a good one, you can send one order in a second, in case you are really good then maybe 2 orders in a second and in case you are "superman" then maybe 3-4 orders in a second but not beyond that. While on the other hand a machine is usually limited by the throttle rate set by the exchange.
A machine can send thousands of orders in a second so there is no match here but if we are talking about the traders who are analysing the data and executing their orders in a manual way but are much more researched and are doing a lot of homework on their side, then no, it doesn’t matter.
To answer the second part of the question regarding the threshold, what we have seen is that greater the high frequency trading volume participation more are the number of players who are there for e.g. If you take the exchanges in the developed markets like the New York Stock Exchange (NYSE) you will be able to see that in some of the exchanges almost 80-85% of the volume is happening through algorithms with most of the HFT firms focused on these markets. In case of any threshold, all the HFT firms would have gone away. Same is the case in the developing markets, in India as well almost close to 45-50% of all the exchange volumes in the leading exchanges happens on algorithms especially on the derivatives side.
So the use of algorithms is not reducing. It is not true that in case there are too many algorithms than the HFTs will run away. The competition will heat up, some HFTs will go out of business and some will remain but that’s it.
Reply: This is again an extension of the last question. Will the market be counterproductive? Not really!
Q3. What if the market is excessively algo traded? Will it be counterproductive?
When you say algorithms it essentially means that you have automated the executions, an algorithm does not always mean high-frequency trading. So if you are a retail customer and you are trading using an API offered by any broker, you are not really trading on a high-frequency basis hence you are not HFT but you are definitely algo, it just brings more efficiency.
If there is too much of algo and you are trying to trade the inefficiencies in the market then it can be a challenge just because finding those efficiencies can be really difficult but otherwise, it won’t be counterproductive. Another thing to add is that even for the inefficiencies, targeting them becomes a game of technology and infrastructure. So these factors give you a certain advantage.
For e.g. the kind of network you can have, the kind of systems, hardware that keeps on becoming more expensive.
So if you are focused on eating on the market inefficiencies more the HFT in the market it will be difficult to spot inefficiencies because the moment it is there, it is gone, and someone will take it away.
Reply: Yes, you can quantify technical indicators and it’s very simple because it is a set of mathematical formulae, whether they are quantitative or not it can be seen upon. But you can definitely quantify and automate them.
Q4. Can I quantify technical indicators? How about patterns and waves?
Yes, you can also quantify patterns and waves. Patterns with relatively much more ease; if you can think of something then the machine is capable of doing it because like our brain machine also works on logic. To elaborate on that some of the algorithms can be more complex when you are coding the logic and some of them can be easy to code.
For e.g. if you are drawing a trend line then it’s fairly simple, you are looking for two points and y=mx+c is what your formula for a trend line is and if you know the intercept you can create a line or if you know the two points you can calculate the intercept and create a line. That part being is not difficult, you can calculate the local maxima and local minima then you can draw the line. In case you are looking at something which has a lot of room for subjectivity that it can be more difficult.
Similarly on the wave side if you are trying to code an Elliott wave and have defined the wave rules very explicitly then it’s not that difficult but if you have kept a lot of room for subjectivity then, in that case, it will become very difficult. In fact, there are some tools available that are used for coding the patterns for these waves and we have also started working on such things which you should be able to see in the near future.
Reply: It all depends what works for you. If the ready-made software is already working for you and you are happy with the performance then you just need to keep on evolving and experimenting because the same thing won’t work all the time.
Q5. I am a WA LARP trader; do I need to learn algo since there are readymade software available?
Reply: Definitely! In fact, this is one of the benefits of automating your strategy.
Q6. Would algorithmic automation help to overcome the emotional shortcoming in trading?
Controlling the emotions, giving you the scalability, giving you the bandwidth that you can use to work on the strategies while execution is carried out by the machines are some of the key benefits that you get by automating at any scale.
Unless if you are interfering with your port all the time then nothing can help you but assuming you are not doing that then yes automation can help.
Reply: Is algorithmic trading for retail traders? Probably yes, if you have the right skills.
Q7. Is HFT for a retail trader? Is algorithmic trading for retail traders?
But HFT for retail traders is definitely no because HFT is more of a technology game. Don’t get misled by someone if they say now you are a retail trader, you can go for HFT. This can be if the person doesn’t know what HFT exactly means or he doesn’t know what a retail trader means.
You would need to spend a reasonable amount of capital before you go and start trading HFT strategies. That does not mean you cannot do algo, algo you can.
But if you are planning to do cash future arbitrage or calendar spread or some basic put call arbitrage using a retail platform then probably you would not be seeing much success based on that.
Reply: In most of the HFT firms, if you are on the high frequency and low-latency side C++ is the preferred language, since it is the fastest and you are concerned about every microsecond. In case you are not concerned about that then you can have any other language, it doesn’t matter, and it doesn’t add that much latency that you should be concerned about. So yes, C++ language can be used.
Q8. Can C++ language be used for algorithmic trading? Does Java matter in algorithmic trading?
Can it be the only one that can be used? If you are doing HFT then most likely yes but not otherwise.
Another important thing to know is that these programming languages are not just here to code algorithms or strategies but it also helps in doing a lot of research and analysis, so that is something which is more popular in R and Python. Even in the HFT test you will see a lot of analysts using R and Python for backtesting and evaluate the trading strategies. When it goes to production, the algorithms are coded in C++ for HFT. But for medium and low frequency any of the languages should be fine.
Reply: This is just limited information here but what I would suspect or what I would guess here is that something wrong in the backtesting parameters or the output parameters, there can be some room for optimization there.
Q9. I trade a system wherein the hit ratio is 45%, avg profit/avg loss=1.75. Trades are 2-3 / month but there are back 2 back losses at times even seen up to 7 losses in a row. This particular difficulty stops me from increasing my trading quantity even when capital is positive. Can u suggest a solution?
In the quant trading strategies, you look at the sortino ratio as well as different ratios including the one basic thing that every trader looks at is the drawdown. So there is one basic but not so popular concept of in-sample and out-of-sample trading which is that you do not optimize your backtesting on the whole dataset that is available to you, you take it down to in-sample and out-of-sample data. In the in-sample data you do all the optimizations you want to do and then you run the strategy on the out-of-sample data on which it has not been optimized and you check how the performance is or in your case how the drawdown is. If the drawdown is too high then you need to curve a bit volatility in your strategy which is too high for a risk and if it is showing results which are giving back to back big losses in the out-of-sample data. So this is something that can help you and you might get some confidence in scaling up your strategy.
Reply: As we discussed earlier the HFT ratio just tells you about how much competition you can expect. If your strategies are plain vanilla arbitrage strategy then the HFT ratio would suggest that it might not be a good idea to venture into that market. If your strategies are not plain vanilla arbitrage strategy but are more intelligent, use more data analysis results and use more statistical data with some decent predictions, then, in that case, it might not matter that much.
Q10. How can we understand if a market/trading venue is saturated in terms of HFT/Algorithmic trading? For example, as an HFT firm, I’m considering to enter into a new market. How important for me the existing HFT ratio in that market?
High HFT definitely means that if you want to venture into the plain vanilla arbitrage strategies or even to certain extend market making strategies, you would need to have a technologically very strong infrastructure base on your end.
Reply: Total bid quantity and total ask quantity are simply what is there to buy and to sell for people out there, it does not give you an indication that how much has been traded. It just tells you the market picture that ok these many people are out there for these many quantities they are there to buy on the bid side and sell on the ask side.
Q11. What is the exact meaning of total bid quantity and total ask quantity? Who those are about to purchase but nothing bought yet to sell and vice versa where their numbers will be counted? Who those are already purchased but not sold yet and vice versa where those are there numbers will be counted?
Reply: Definitely, Yes.
Q12. In India do you see any decrease in conventional trading volumes after HFT traders entered into the market?
In India, you used to have these big proprietary trading houses which would employee 500-1000 dealers, these are the guys who kept on doing in and out. Jobbers is what the common term here.
These jobbers would be reading the screen with not too much of analysis but will be taking a position and try to exit within a few seconds or a few minutes of time. Also prior to doing a lot of arbitrage strategies all those things were very popular but with algos, all these things are very much and easily replaceable by the machines, so that’s what has happened. Those kinds of firms had to shrink but most of them have changed their strategy and business model and moved more on the quant oriented side. So that was the change we saw in India.
Reply: I think that’s a pretty strong background from the algorithmic trading point of view. I would assume you already have a good grasp of statistics and programming, now quant trading is the thing you need to pick on. So if you have a good understanding of statistics it should be relatively easier but still depends on where you will be starting from on the financial market side. I can’t answer how many months it will take but you got 2 out of 3 so the priority is on your side.
Q13. I am a software professional from data science background how soon I shall be able to make a modest algorithm?
Reply: If you are talking about the PE ratio or typical fundamental like the growth and macro-economic data (like GDP), you can feed that manually or you can feed that using data software as well. There are companies that do provide you data (machine-readable economic data), so you can feed that data and the algorithm will read your data as and when it gets published and you can pre-code your strategy based on the results and send orders accordingly. So all of this is possible, not so common in the retail space but there are tools that are coming up now that can be used in retail as well. Some tools can also read or scrape the data on news or web directly.
Q14. Is fundamental indicators data fed to the programme manually?
Reply: This will fall more on the recreation side than anything else. It is certain that as an Indian you cannot send out money to trade into margin products listed on the foreign exchanges. Unless you have an RBI approval I don’t think that you can do that. But if there is a company (global company) out there which has outsourced its trading to you then probably you can but I am not sure. One thing I am sure of is that you cannot send out money, you can send out money for investing but you cannot send out money for trading on margin.
Q15. What are the advantages and disadvantages of doing HFT for the non-Indian markets from India?
Reply: Absolutely not!
Q16. Shall a trading venue have concerns about losing its retail trading volume after HFT entering the market?
I don’t know any empirical evidence about that since retail is generally not known to do arbitrage. Retail does take positions; they buy stock, trade in commodities. They are generally taking directional bet most of the times but in case there are no HFTs in the market, then the bid-ask spread that retail traders will be paying will go relatively higher.
If the HFTs are there then the markets will be much more efficient which means they will be paying far less bid-ask spread. In fact, there was a study by Aite Group (leading analysis agency in the HFT domain) about 2 years back which mentioned that an average American retail trader saves almost close to 250 USD just because of the better bid-ask rate that is happened due to the presence of high frequency and algorithmic trading.
The market is much more liquid in the presence of HFT because HFT has the technology and infrastructure which reduces the risk factor that narrows a market. In case, something drastic happens, a big change in the economy, particular stock result, management decision, anything of this sort, the HFTs can react much faster. They have the confidence since they can afford to create narrower markets 99.99% of the time, which would not be the case if you add speed bumps or take away that confidence or comfort for the high-frequency traders. So again, that’s why you see much tighter markets when you have HFT otherwise the bid-ask spread rate is much higher.
Reply: If you find someone doing something illegal or not conforming to the rules or regulations than obviously that is incorrect and that should not happen, it is independent of which domain whether it is financial markets or e-commerce or high-frequency trading or fund management.
Q17. Flash boys novel paint HFT as unethical, do you subscribe to that view? Should having system(s) with higher computing power give you the right to confront the little Joe?
The ‘Little Joe’ typically says a lot about the transition cost being paid because a lot of HFTs are there. The HFTs are taking away the arbitrage opportunities because they are making the market more efficient. As far as my personal view goes the retail trader cannot be hurt by anything that the HFT does, the advantage that an HFT gets over a medium frequency trading firm or a broker or retailers is of micro or milliseconds.
A retail trader sends its order through a web-based browser which means they already have a latency of a few milliseconds so you as a retail trader are not going to get affected. If an HFT is doing anything getting an illegal access is a different thing but even in that case I doubt if the retail trader will get hurt as brunt will be borne by other HFT firms who are following the rules, the illegal access will give them an edge of few microseconds which is a big deal for other HFT firms but not for the retail trader.
Even in the case of colocation facility I will have an advantage of few milliseconds and there is nothing unethical in that and if you are putting me 100-200 miles from the market then I will definitely lose on some time but I will have my quotes set wider accordingly.
Reply: It depends on what kind of quant analyst you are but typically it would be for the most part of the day. It would be a mix of R and Python; it can be C++ or other languages as well. There are huge numbers of languages out there; some of the platforms have multiple languages while of them would be creating a model based on VB script as well. Languages might differ but coding can be of a decent amount.
Q18. How many hours does a quant analyst spend on coding per day?
Reply: There are a lot of them; again you would have to filter them out based on low frequency, mid-frequency and high frequency.
Q19. What are the different types of algorithms that can be used for automated trading?
In case of high-frequency, the focus would be more on the arbitrage and market making as well as some of the directional strategies which would need a huge amount of faster computing.
In medium and low-frequency side you can automate any strategy from the automation point of view. Using the factor models you can even automate your fundamental investing to analyse as well as implementing the algorithm. Not sure how much will you benefit from that but from the analysis side you can gain a lot because you can scan through a lot many annual reports and lot many fundamental data for a lot of stocks which you cannot do manually but from an execution point of view it does not help that much. The point is that you can automate all kinds of strategies.
The popular ones include momentum-based strategies, statistical arbitrage, greek based options strategies, dispersion and sentiment-based strategies. There is a whole list of popular strategies about automated trading which is out there and yes we do cover a lot of web intercourse as well.
Reply: From the recipient point of view if you are doing it manually and someone is out there doing algo then the benefit to you is the bid-ask rate and liquid market. In case you are on the other side where you want to do your own trading using algorithms, in that case, it gives you much more scale and the number of stocks on which you can run each strategy on. So instead of monitoring 5 to 10 stocks or 5 to 10 strategies that you can work on manually, you can take and multiple by 100s. Also, the emotional power and the analysis side can do a lot of wonders with the algorithms even if you are not doing the execution part with the algorithms.
Q20. How is Algo trading helpful for retail traders?
Reply: If you are an NRI you can do algorithmic trading that should not be a problem, you need to connect with the right broker who is able to cater NRIs and I think most of the brokers are able to do so. In case you are not of Indian origin and you want to trade in India then you can come as an FPI category 3.
Q21. I am an NRI doing trading in India via PIS platform, how can I do algorithm trading?
Automation is allowed but there are some restricted stocks which you cannot invest in but that is a very small portion.
Next StepWe’re pretty sure, you’ll have some questions for us as well, and we would be glad to help you with them. In case you require any further guidance for an algorithmic trading career, feel free to contact us. If you are a trader, a programmer, a student or someone looking to pursue and venture into algorithmic trading then we have the Executive Programme in Algorithmic Trading (EPAT™) for you.
QuantInsti® aids people in acquiring skill sets which can be applied across various trading instruments and platforms. EPAT™ does just that. Its comprehensive curriculum covers training modules like Statistics & Econometrics, Financial Computing & Technology, and Algorithmic & Quantitative Trading and equips you to be a successful trader. Learn more about it here.
Disclaimer: All data and information provided in this article are for informational purposes only. QuantInsti® makes no representations as to accuracy, completeness, currentness, suitability, or validity of any information in this article and will not be liable for any errors, omissions, or delays in this information or any losses, injuries, or damages arising from its display or use. All information is provided on an as-is basis.