Sunday, April 09, 2017

The Riveting Rhythm of an Algorithm

Sudhir Raikar, IIFL | Mumbai |

Algo Trading represents a captivating convergence between Finance, Math and Technology. Before we explore its inherent potential, we need to explode a few myths. Here’s a primer for beginners.

The role of algorithms in addressing the needs and requirements of scores of disciplines across all walks of life – from commuting to computing – cannot be overemphasised. The answer to any challenge, common sense has it, is essentially a list of logically sequenced rules which is what an algorithm is all about. Named after Persian Mathematician Al-Khwarizmi’s set of arithmetic rules for Arabic numerals, algorithms evolved as potent tools for automated analysis, thanks initially to Charles Babbage’s pioneering Differential Engine and later Alan Turing’s dynamic Universal machine.

Today, the internet has truly unleashed the algorithmic potential in ways that were hard to imagine only a few years ago. Search engines, social networking platforms, e-commerce portals, hardware, software and middleware vendors - just about every entity relies heavily on the power of algorithms to identify preferences, define trends, influence target communities and build competitive edge in an ever-evolving marketplace. Data mining and analytics have taken a big leap forward with the recent marriage between algorithms and artificial intelligence.

Talking of the bourses, algorithmic trading is a sterling example highlighting technology’s enabling role of enhancing financial decision making in a highly unpredictable environment. Algo trading is an emotion-free, bias-free, scrupulous and validated mathematical analysis of humungous volumes of market data. Apart from expediting the analysis and execution processes, it helps market players make better decisions across diverse spheres including market making, inter-market spreads, arbitrage, hedging or speculation – whether bullish, bearish or range-bound.

Algorithms analyze market data based on pre-defined parameters and mathematical models which could be diverse in nature – from purely fundamental to the pattern-based. The models are the same, but the algorithmic value-add comes from the precision, flexibility and speed of analysis. Contrary to popular perception, algorithmic logic is fairly simple to understand even if they are intricate to develop and design. Simply put, algorithms study the stock market by weeding out emotional, subjective and irrelevant factors from the analysis. For Algo trading, it’s elementary to define the set of rules for trade entries and exits as also to gainfully employ historical data to build trading strategies.

Now that we have some idea of the essence of Algo trading, let’s explode the popular myths surrounding the term. Based on the clarity of thought, it would become much easier to explore the Algo market space for identifying and engaging with credible vendors and value providers.

Myth 1: Algo trading is fool-proof

Risk is integral to Algo trading like it is to any form of market activity. When it comes to unpredictability, they become as infallible as the weather prediction at times if not more often. The market can beat the models in several unfathomable ways and it’s necessary to take a holistic view of the overall portfolio. You may win some claims, you may lose some stakes but if you end up being a net winner, you have reaped the rewards of Algo trading, much like the common investor who spreads his or her portfolio across sectors and businesses to profit from diversification. And like how one needs to evaluate one’s portfolio potency from time to time, even the mathematical models governing Algo trading need to be regularly assessed for their dynamism and suitability in line with the targets and sectoral specifics of every investment. Another issue of concern and consideration is the caustic Algo warfare wherein certain crafty algorithms regularly look to outsmart the others to make a killing based on the illusions they create. There have been instances of algorithmic manipulations in the market that essentially profit from misleading other algorithm-driven traders as well as common investors. For instance, some Algos create artificial buying pressure on certain counters to influence other players to make aggressive purchases in anticipation of attractive price highs. Once the intended triggers have borne fruit, the mayhem architect quietly exits the scene having reaped a fortune.

Myth 2: Algo trading is only for the big fish

This is more the result of a fear psychosis emanating from ignorance. Essentially an enabler, this tool is pretty democratic in its utility value and proves gainful provided one is prudent about risk management and constant evaluation. Expert help is available to the retail investor to reap the rewards of Algo trading like it is accessible to treasury houses, family empires and HNIs. Like it’s very common today for common investors to engage in technical analysis based on candlestick patterns and moving averages, they can do well to gain some familiarity about Algo trading as well. As it is, this space is gradually opening up its vistas to the retail investor. There are many companies, predominantly in the West, that now offer an unambiguous design environments and programming templates to common traders for developing customised Algo trading strategies. Many vendors are trying to optimize the coding and back testing time to make Algo trading more attractive for everyday investors who wish to get a flavour of the game without any help from computer whiz kids or mathematical geniuses. In the time to come, we may have more and more user-friendly platforms allowing common investors to input asset types, indicators and algorithms in order to track meaningful patterns and predict movements for specified time frames.

Algo trading is naturally suited to asset classes with limited number of participants with the time, inclination and wherewithal to develop quant-based strategies for high-volume trades in an extremely volatile scenario. There’s no surprise that retail investors are invariably not part of this segment dominated by hedge funds and arbitrage houses. However, this fact does not imply the absence of a level playing field as many like to believe. Even without quant-based trading, small traders could never match the might of the top-notch brokers and institutional investors. More importantly, a small investor looking to make steady long-term gains has no reason to compete with the big guns. He/she can still make gainful long term gains from fundamental analysis as also take benefit of the Algo space to sharpen his/her analytical abilities. No wonder, Algo strategies hitherto applicable to high-frequency trades of a few seconds are increasingly being extended to conventional trading of a larger time span – whether days, weeks or months.

Myth 3: Algo trading technology is copybook

Technology for Algo trading, hard as one may like to believe, is far from standard. Right from the choice of language to system architecture, much depends on the trading specifics including trading frequency and volumes.

Readers will find the following thought piece highly informative in understanding the technology considerations of setting up a Algo trading environment including performance, ease of development, resiliency and testing, separation of concerns, familiarity, maintenance, source code availability, licensing costs and maturity of libraries:

Myth 4: Algo trading is disruptive

This is more an expectation than a myth but still far from reality. Algo trading for all its promise is a great complement to conventional trading. In every trade, the human gut feel is of the greatest essence while the quantitative analysis is a great validation tool to remove ambiguity and bias. With the passage of time, Algo trading will only gain from strength to strength for its value proposition is indisputable in making trading decisions fast, reliable and cost-effective. As our trading and investing psyches evolve, we will be keener to take advantage of analytics to sharpen our financial decision-making. But that certainly won’t make Algo trading disruptive as the place and premium of human intuition and insight is irreplaceable especially in situations which are beyond machine comprehension including political instability and natural calamities. As for the future, it clearly belongs to those who show the maturity and alacrity to become masters of both worlds. This tribe will always be in minority but will rule over the majority.

On Dementia

There’s not an ounce of doubt about the crucial role of technology in providing a wide range of utilitarian health care solutions. In the c...