## Tuesday, October 16, 2012

### Preventing shocks or becoming resilient to them?

My previous blog post, on not cancelling trades after a fat finger trade, elicited some interesting email conversations. In a nutshell, there are two views of the world. One camp argues that it is important to prevent fat finger trades and other such weird episodes. This requires building an array of preventive measures. The other side argues that the costs of prevention are high, and what's really important is to make a resilient market that is able to absorb shocks.

Prevention is difficult for two reasons:

1. NSE and BSE are some of the biggest exchanges of the world. We should be pleased that India has two of the great factories of the world doing order matching. But as a side effect, NSE and BSE are at the limits of what today's CPUs can do. Many, many orders are placed, compared with the number of trades. Pre-trade checks are expensive because the number of orders is high. Fairly trivial notions of pre-trade checks can triple the hardware requirements or worse. We have to ask ourselves: Is it worth driving up the cost of transacting by 3x or 5x or 10x in order to do those checks? In addition, pre-trade checks introduce delays ("latency") which are not good for the trading process. When an order is placed, the person wants an instant confirmation that it was placed into the order book and ideally matched. More work in screening orders before the trade increases the latency suffered by traders. This, in turn, increases the risk faced by various trading strategies, which has adverse implications for market liquidity and market efficiency.
2. What validation rules would you write, pre-trade? There is a danger of fighting the last war. New kinds of problems will inevitably surface in the future. Will we keep on increasing the burden of pre-trade computation, over the years, as the list of potential difficulties goes up through time?
There is a shades-of-gray dimension here. It appears obvious to us that if a computer program is buggy, and puts in a wrong order, this should be blocked. But what when a man-machine hybrid (the typical human trader that operates a computer) makes a mistake? What about a pure human trader that makes a mistake (e.g. saying on the phone "buy me 25 million shares of Infosys" when he meant "buy me 25 million rupees of Infosys")? Where do you draw the line?

It is better, instead, to see that mistakes are an inevitable part of financial markets. I would argue that pre-trade computation should be kept to the bare minimum, and that it is instead important to focus on deeper initiatives that will make the market more resilient. We need more eyeballs, more capital, more limit orders, more arbitrageurs, more algorithmic trading, more short selling. This is what will make the market resilient. A resilient market is one that is ready to accept a diverse array of unpredictable shocks in the future. Until a few weeks ago, we never imagined an order for 17 lakh nifties could be placed. The market did well in absorbing this completely unanticipated shock. The market should be a flexible, intelligent, resilient construct that is ready for all sorts of unexpected events of the future.

Some people say: "We should put in infinite expenses in order to screen orders". This reflects a lack of  economic thinking. The strategies of prevention and cure need to be evaluated from a cost/benefit perspective. Each features tradeoffs. Driving up the charges of an exchange by 3x to 10x, and increasing the latency suffered by every market participant, is a big cost. This should be weighed against the benefits.

I am reminded of a great story told by the Chilean economist Raimundo Soto at a NIPFP/DEA Conference in 2009. He started by describing a cautious 80-year old person, who is very careful about what he eats, who avoids stepping out of the house, and so on. He stays alive, but is perennially afraid that a small sickness will bring him down. And, indeed, when one small common cold comes along, it can have catastrophic consequences for him. Compare this with a 15-year old prancing around the world, tumbling in the dirt, taking risks, and living a great life. He is exposed to many illnesses, but rapidly bounces back from each of them.

Raimundo Soto said that the analysis of capital account convertibility should be rooted in the desire to become this 15 year old rather than this 80 year old. We should be asking: How can the system be made more resilient to shocks? We should not aspire for a Chinese Wall of capital controls that cuts India off from the global financial system; instead we should be doing the things that make India resilient to international shocks - such as develop a sophisticated Bond-Currency-Derivatives Nexus.

In similar fashion, too much of the conversation in India, after the Emkay fat finger trade, is about asking How can such shocks be prevented? I think we should aspire to be like the 15 year old and not like the 80 year old. The really important question is: How can the system be made more resilient to such shocks?

#### 11 comments:

1. Totally agree with you:
"We need more eyeballs, more capital, more limit orders, more arbitrageurs, more algorithmic trading, more short selling."

On the more eyeballs side, I have done some analysis on the flash crash using the minute by minute data and what that tells about the depth of order books. http://quantplus.blogspot.in/

I would like to explore this topic further by obtaining trade-by-trade data from NSE. If you have some recommendations / pointers, those are much appreciated.

Thanks!

2. There are many actions that can be taken pre-trade to prevent such shockd. These include:

1. Not permitting market type orders for algo and institutional orders

2. Not permitting market orders beyond a certain percentage of the size of the full order book

3. Not permitting market order execution beyond a certain percentage of the previous days Closing Price (A similar move planned for US markets by the SEC)

4. Not permitting single orders (regardless of the type of order) beyond a certain quantity and value for retail and institutional orders respectively. The quantum can be determined statistically based on historic data on order sizes and values.

5. A unique way of adaptive exceptional handling. Consider two orders as follows:
a. An institutional limit order for say Rs 10 Cr with the limit price being within 10-20 bp of the LTP
b. An institutional limit order for say Rs 10 Cr with the limit price being beyond 500 bp of the LTP

Clearly one could treat these two orders differently. Credit card companies do this all the time. If I am routinely transacting for petrol for Rs 1,000 or Rs 2,000, they don’t call me to verify my 14th transaction of the month. However, if I suddenly have a Rs 2 lac transaction with Tribhovandas Zaveri (clearly an exception) alarms go off and they call and check with me.

Exchanges can also use this kind of adaptive intelligence and either accept and process an order or put it aside and have a conversation with the dealer/ member concerned. In any case beyond a certain point where the market will see huge spikes (as in Emkay) they should have a different mechanism. This kind of adaptive intelligence is well within our reach.

6. A group of knowledgeable practitioners should get together and come up with practical ways to deal with these situations. SEBI would be well served in facilitating such discussions.

1. These things are easy to come up with but are actually much harder than meets the eye. Here are some examples:

"1. Not permitting market type orders for algo and institutional orders"

Umm, are you nuts?

"2. Not permitting market orders beyond a certain percentage of the size of the full order book"

This requires that processing every ORDER requires analysing the full book. The number of orders is huge. Think of the processing cost.

and so on.

"6. A group of knowledgeable practitioners should get together and come up with practical ways to deal with these situations. SEBI would be well served in facilitating such discussions."

You have to be very careful about Indian politics. Imagine all the weirdos who would have their own agendas in meddling inside the systems of NSE and BSE.

2. Imagine all the weirdos who would have their own agendas in meddling inside the systems of NSE and BSE.

Don't we have enough of those already. Hence "knowledgeable practitioners"

3. If this cannot be prevented in developed capitalist countries, what makes you think it will be prevented in our local markets!!!

In today's world of HFT, its institutional buyers and algo trading firms decide how markets work. It will be foolish to expect any major changes apart from some minor things here n there to satisfy masses and media.

Rules are decided and crafted by BIG players NOT by retail investors....

1. Emkays case was a not an algo trade mistake but a fat finger. IMHO and 2 cents worth, it was avoidable. As Ajay points out the systems behaved as designed and expected. But if we create and anticipate scenarios we can make things even more bullet proof.

2. Sure, it was avoidable. But, the argument is whether its worth avoiding? If the system behaved as designed and expected, there is no issue. Its already bullet proof.

Philosophically, this is similar (with some differences) to Taleb's arguments on robustness of financial systems (as well as arguments by behavioralists like Kahneman). They argue that stability is not necessarily a good goal for a complex system. But, redundancy and robustness are worth aspiring for. The way I interpret it is that a system which can work under shocks is preferable to a system in which shocks are prevented. I think its true for complex systems.

3. You make a good point. What would be the benefits of a system in which shocks are prevented. I can think of some reasons for. Perhaps there are many more against.

Most people (including investors, media and for that matter some of the "regulators") are not able to understand this "normal designed behaviour" of the market or for that matter the incredible resiliency of the market which caused it to bounce back. You can read many crazy views in the media and perhaps equally crazy solutions. Dealing with this situation is perhaps worse than dealing with the few milliseconds of market drop. Countless hours are being spent in analyzing, reviewing, investigating the system that behaved as designed. if the system were to be tweaked to prevent shocks like the one felt on Oct 5, we would save this entire debate.

At the same time it is important to find solutions to the un-intended consequence of this event, which is the triggering of stop-loss orders. This requires debate and a workable solution.

4. Economists seem to live in their own world. As the world is entering a recession, they would need to answer tough questions like how HFT is useful for the economy, and answer the questions in simple terms. Till now, the traditional economics based on greed has failed to bring prosperity to the hard-working masses.

1. Usefulness of HFT for the economy! Once we start with questions like this, there are more broader ones to be considered.

1. Should exchanges be for profit and be listed entities. Apart from inherent conflicts of self listing, there are also priority conflicts between shareholders interest and the interest of investors.

Exchanges are primarily (at least in India) expected to be Market Infrastructure Institutions with widely distributed institutional ownership. That is changing with the new approvals.

2. The relevance of derivatives has also be be considered. Hedging requirements are fine, but what happens when we start prop or speculative trading in derivatives? Unfortunately, trading in derivatives is viewed by most as a maturation of the market.

3. Non margining of institutional trades in the cash market on T day also poses systemic risks to the market. I Have not seen any discussion on this critical aspect of the safety of the central counter party..

5. Good thoughts -all. It was a pleasure to read this blog and the comments here. I will be visiting here often now.

Please note: Comments are moderated. Only civilised conversation is permitted on this blog. Criticising me is perfectly okay; uncivilised language is not. I delete any comment which is spam, has personal attacks against anyone, or uses foul language. I delete any comment which does not contribute to the intellectual discussion about the blog article in question.

Please note: LaTeX mathematics works. This means that if you want to say $10 you have to say \$10.