FX Trading

Monday, May 02, 2011

Only You Can Prevent Flash Crashes

Posted by John Bates

Faster than a forest fire, the May 6th, 2010 flash crash was a breathtaking nearly-1000-point drop-then-surge on the Dow Jones Industrial Average that shocked traders and the general public to their core. Unlike Smokey the Bear, who can sniff out and fight fires before they start to flame, US regulators only became aware of the flash crash after it was over. The flash crash left scorch marks that have scarred the reputation of the bulwark U.S. stock market and singed investor confidence.

Regulators were completely stumped as to the cause. Months of investigations unearthed one very important piece of information: the regulators were unprepared and ill-equipped to deal with this kind of event. They had no method of sniffing out the smoke that could lead to a flash crash fire.

A year ago, the flash crash revealed the first significant sign of growing pains in a new generation of trading. This new generation introduced the capacity to let computer models do the dealing; it allowed clever traders with clever programmers to build complex algorithms that buy and sell in the blink of an eye. All of this progress was made with little thought to the possible repercussions of a mistake.

Thus it was that on May 6th, 2010 when a mutual fund in Kansas entered a rather large ($4.1bn) sell order in E-mini S&P 500 futures contracts on the CME, the reverberations were felt throughout the marketplace. The order sparked a totally human panic on a day when fear was in the air and sentiment was leaning toward the bearish. The fire was then fanned by algorithmic trading strategies and HFT, causing an unprecedented drop within minutes and wiping out $1 trillion in market value before recovering. That a simple mistake could take the market down so fast was unthinkable.

Since the original flash crash we have seen dozens of smaller ones, which barely warranted a thimbleful of ink in the press:

  • A mini flash crash nearly wiped out ten ETFs on Nasdaq OMX and NYSE Euronext on March 31st. The exchanges (quicker off the mark this time than on the May 6th flash crash) cancelled some of the trades in 10 out of 15 Focus Morningstar ETFs that had just been launched. Some of them tumbled by 98% before circuit breakers kicked in. The culprit appeared to have been a human being with fat fingers;  ETF market maker Knight Capital Americas took the blame.
  • Last September the CME Group plugged some new contracts into Globex to try them on for size and they mistakenly went live. They were almost instantly traded - for about six minutes. Futures brokers noticed oddly anomalous spread price activity during that period, when trading is usually slow, and CME pulled them off.
  • In the oil market last year high frequency trading firm Infinium Capital Management's brand new trading program malfunctioned and racked up a million-dollar loss in about a second, The new algorithm went live four minutes just before markets closed on Feb. 3rd and fired off 2000-3000 orders per second before being shut off. It caused a spike in trading volumes by nearly eight times in less than a minute and the oil price surged $1 then slid $5 over the course of the next two days.

And as energy and other asset classes outside equities - commodities, FX, derivatives - become increasingly automated there will be more flash crashes. Increased interdependence of asset classes will lead to cross asset flash crashes – a domino effect where the crashes 'splash' across asset classes, possibly wreaking havoc for market participants and regulators.  As regulators said following the flash crash: "a complex web of traders and trading strategies"  links the fragmented multitude of markets here in the U.S.    

Band-aids have been applied by the SEC; circuit breakers that prevent further trading when a stock moves more than 10% during a five-minute period. Market makers have been strong-armed to ensure they don't disappear when the market wobbles. The joint CFTC-SEC Advisory Committee on Emerging Regulatory Issues has made 14  recommendations on the May 6 Flash Crash including: implementing a limit-up/limit-down system, more extensive market access rules, studying the impact of maker-taker pricing and cancellation rates, and looking at a more cost-efficient audit trail.

These are a good start, but far from address the underlying problem. Like Smokey the Bear, regulators need a way to sense the smoke before the fire takes hold of the marketplace. Luckily there exist responsive and intelligent algorithms that can sense and react instantaneously to market anomalies and anticipate interruptions to liquidity. These rapid response algorithms could help to prevent the next flash crash by alerting risk and compliance managers of impending issues, or by changing trading strategies to accommodate market glitches. They can smell the virtual smoke and help to put out the fire before it starts.

On top of smarter algos, there are a few other splash crash prevention measures:

  • Diligent backtesting – using historic data and realistic simulation to ensure many possible scenarios have been accounted for. A backtesting process needs to be streamlined of course – as short time to market of new algos is key. 
  • Real-time risk monitoring - building a real-time risk firewall into your algo environment. Just like a network firewall stops anomalous network packets reaching your computer, so a risk firewall should stop anomalous trades getting to trading venues. 
  • Real-time market surveillance. Even if trades do not breach risk parameters, they may breach compliance rules, regulations or may be perceived by a regulator as market manipulation.

Everyone needs to be proactive in using the correct tools to monitor algorithmic trading. Sensing and responding to market patterns before the aberrations or errors have a chance to move prices is the right thing to do - in all asset classes. Brokers need better pre-trade risk controls to prevent fat fingered trades from getting to market. Algorithmic trading means that the market moves too fast for exchanges or other venues to detect problems before they impact prices.  The detection of abusive patterns must happen in real-time, before any suspicious behaviour has a chance to move the market. This approach should be taken on board not just by the regulators, but by the industry as a whole. Only you can prevent flash crashes. 

 

Wednesday, April 13, 2011

Can Anything Be Done To Prevent A Second Flash Crash?

Posted by Dan Hubscher

May 6th, 2010 lives in infamy in financial markets; a precipitate dive on the US stock market wiping a trillion dollars off the value of equities in just under 30 minutes stunned the industry.

The speed at which such an astonishing crash took place was partly in thanks to the ever-shrinking timeframes in use in electronic trading methods such as algorithmic and high frequency trading (HFT).  These techniques eventually find a welcome home in many markets due to lower costs, smaller spreads, and the ability to capture alpha.  But the damage that results when automation goes awry - or is used improperly - shows that high speed trading does require high speed controls. 

As the days and weeks wore on after the flash crash, regulators realized that they had neither the tools nor the authority to look closely enough and explain what had happened. HFT and algorithmic trading were so embedded in daily market transactions that the volume of trades simply could not be tracked easily.

Since the flash crash, US regulators have been traveling two roads.  On one road, the regulators remain focused on cleaning up domestic equities trading, to prevent another flash crash.  On the other road, regulators are reforming OTC derivatives trading in response to the global financial crisis, by mimicking the market structure and transparency of the equities market, as if the flash crash had never happened. Meanwhile, markets have continued to evolve as HFT continues to spread out across exchanges around the world.

Not only are algorithmic and high frequency trading taking a growing share of activity in equities, but they are also spreading into other asset classes, such as commodities, currencies, and a wide variety of complex derivatives. The proliferation of HFT in new asset classes begs the question: are we now headed for a second flash crash?

The honest answer is: probably. And not just in equities. The interdependence between some of these asset classes also means that the crash could 'splash' across them. The use of high frequency trading strategies has already achieved dominance in stock exchanges, and migration into other asset classes and other national markets causes concern. For example, we have already seen algorithmic trading spreading beyond equities and commodities to currencies and fixed income.

A mini flash crash in Japanese yen in March was eerily reminiscent of the May 6th equities crash. If liquidity in the FX market, which trades trillions of dollars daily, could instantly dry up then there is clearly a need for better monitoring and controls in that asset class.

Measures needed to prevent a second flash crash from taking place include both regulation and technology. Market surveillance and monitoring across the board has to include regulators, trading venues, and brokers in order to be effective.

Being responsive - and responsible - means being proactive; measures have to be put into place before the next flash crash. To make this happen, sophisticated real-time surveillance is a must for monitoring anomalous market patterns, including abuses and errors; for checking sponsored access clients' credit risk; and for balancing market position limits. None of these techniques replace the need for standard compliance tools such as historical looks and material penalties for those who stray from regulatory mandates.  But the flash crash has showed that there’s an additional need to protect our markets from the damage that can’t be fixed at the end of the day.  Don't wait until it is too late, that's like driving while looking in the rear-view mirror.

-Dan

Monday, February 07, 2011

The Trouble with Algorithms: Wild Children or Reckless Parents?

Posted by Dan Hubscher

Algorithms and high frequency trading have been blamed for everything from the credit crisis to the May 6th flash crash and high speed market abuse, and have attracted unwanted interest from regulators on both sides of the pond. But questions remain whether these tools are really computer models gone wild or whether they are the spoiled children of reckless parents - regulation.

According to Dictionary.com, the definition of reckless is to be utterly unconcerned about the consequences of an action. One could argue that the Regulation National Market System was designed without regard to some of the consequences down the line. Blaming the wild children, algorithms, is to ignore that the parents - RegNMS - were somewhat reckless in designing the system.

In a blog on the TABB Forum on January 24th,  Steve Wunsch of Wunsch Auction Associates explained that the system was working the way it had been designed.

"What really went wrong in the stock market on May 6? Prices aside, all of the plumbing was working fine. Not only were there no fat fingers, rogue algos, manipulators or terrorists at work, there were no significant breakdowns of order routing systems or data systems or any other elements of the stock trading infrastructure," wrote Wunsch.

Meanwhile, the National Commission on the Causes of the Financial and Economic Crisis in the United States released its report (Jan. 27th) and HFT was not mentioned at all. Nor were algorithms, as such, but 'computer models' were vindicated. The report said: "The crisis was the result of human action and inaction, not of Mother Nature or computer models gone haywire."

And it criticized regulators for not doing their jobs: “Widespread failures in financial regulation and supervision proved devastating to the stability of the nation’s financial markets.”

The result of the credit crisis and market meltdown in Sept. 2008 was the Dodd-Frank Act, which attempts to prevent another Sept. 2008.  But the flash crash insinuated itself into the picture, pointing out that no one had baked that possibility into the market reforms.  And, ironically, the market reforms set the stage for more flash crashes.

At the Tabb Forum Derivatives Reform Event a couple of weeks ago, a lot of people commented that Dodd-Frank puts in place a market structure that injects the equities and futures markets model, along with fragmentation, price transparency, streaming  quotes, into other asset classes. This theoretically invites algorithmic and high frequency trading and the threat of more flash crashes. At the event Peter Fisher of BlackRock said that what keeps him up at night is a flash crash in the interest rate market, citing the market structure argument, but specifically pointed out that this possibility was not envisioned in Dodd-Frank. 

With more and more asset classes becoming tradable electronically, partly thanks to mandated swap execution facilities (SEFs), the possibility of truly wild or rogue algos and market abuse becomes increasingly inevitable. And, as we pointed out last week, the very real possibility of a flash crash splashing across asset classes - we call it a "Splash Crash" - rears its ugly head.

Although the evidence against algos gone wild is thus far anecdotal for the most part, the belief that they can and will go wrong permeates the industry. Market abuse such as insider trading and manipulation are undoubtedly more prevalent. Fat finger errors are easier to prove, and are a fact of life in a high speed, high stress electronic marketplace.

Stay Calm and Remain Vigilant

The antonym of recklessness is vigilance. The regulatory parents must be more vigilant when it comes to their arguably brighter and naughtier children - algorithms and HFT. With algorithms and HFT come the possibility of mistakes and abuse. Many more firms outside of the equities world are embracing HFT and their inexperience can cause market disruptions. A flash crash in oil or other commodities - or even foreign exchange - is not to be scoffed at. In fact, many commodities markets are much less liquid and homogenous than equities, and can be even more vulnerable to mistakes or manipulation.

 There are a number of best practices that can be used to mitigate against algos going wild:

  • Diligent backtesting – using historic data and realistic simulation to ensure many possible scenarios have been accounted for. A backtesting process needs to be streamlined of course – as short time to market of new algos is key.  
  • Real-time risk monitoring - building a real-time “risk firewall” into your algo environment. Just like a network firewall stops anomalous network packets reaching your computer, so a risk firewall should stop anomalous trades getting to trading venues.
  • Real-time market surveillance. Even if trades do not breach risk parameters, they may breach compliance rules, regulations or may be perceived by a regulator as market manipulation.

An algorithm is a tool in a trader's toolkit, not a naughty wild child. If the regulator parents are vigilant, and algos are subject to practical controls and monitored constantly for performance and for errors, market participants can sense and respond to market patterns before the aberrations or errors have a chance to move prices.

-Dan

Tuesday, February 01, 2011

Beware the Splash Crash

Posted by John Bates

We have had the flash crash, the breathtaking 1000-point drop-then-surge that happened on May 6th, 2010. In the near future we will have a new worry - prepare for the “Splash Crash”, which will cross asset barriers in a single bound.

As asset classes outside equities - energy, commodities, FX, derivatives - become increasingly automated there will be more flash crashes. Increased interdependence of asset classes will lead to cross asset flash crashes – a domino effect where the crashes 'splash' across asset classes, possibly wreaking havoc for market participants and regulators.  

As regulators said following the flash crash: "a complex web of traders and trading strategies" links the fragmented multitude of markets here in the U.S.  And, like dominoes, when one goes the rest follow. The dominos are no longer limited to one asset class. Algorithms are becoming increasingly sophisticated, encompassing all of the elements that may impact a trade in a certain instrument. If a trader wants to take a substantial position in a foreign equity, for example, there are many ingredients that can affect its market price.

Consider news events such as the BP oil spill or the current political crises in Egypt and Tunisia. The impact of these events has illustrated the close relationship between the oil price, equities, foreign exchange, commodity futures and the bond markets. Extreme and possibly unexpected events coinciding can trigger a cascade. We saw with the flash crash how instability in European economies caused nervousness in the market and then an algorithm did something unexpected – causing a cascading effect across futures and equities markets. As the cross-dependencies grow and algorithms become more inter-twined, so the risks for a “splash crash” grow.

It’s not hard to consider a splash crash scenario given the growing inter-linking of markets. For oil companies, such as BP, equity trader’s positions can be affected by the price of the pound and UK interest rates, as well as the dollar and any countries currencies where it is exploring or supplying oil. Oil prices will impact the bottom line, therefore the share price. Political events such as wars in oil-producing countries are important, as are disruptive events such as oil spills, and can impact oil, equity, bond, commodity future and foreign exchange prices. What if China's economy falters and its oil consumption is predicted to fall? Oil prices globally fall, dragging the US dollar higher. Oil derivatives predicting that prices would stay high for the next year or two or three also fall. Share prices for the whole oil sector including BP, Exxon Mobil, Texaco, Chevron, Philips, Sinochem, etc. collapse. Debt markets are stunned and bond rates rally.

All of these factors can be programmed into an algorithm that monitors and makes trading decisions on the BP position. If large banks and hedge funds also have substantial positions in BP, the dollar, the debt and the derivatives and they also have algorithms that will kick in when certain parameters are met. If enough instability and unexpected conditions occur and then one of these algorithms does something strange or unexpected, the cascading impact could be enormous across all asset classes. For example, massive automated sell orders for oil shares, energy futures and derivatives and buy orders for USD and Treasuries. Trading systems could clog up, limited bandwidth could choke orders, exchanges could freeze up - splashing across all of the affected asset classes. Pandemonium.

Splash Crash Prevention Tips

Luckily there exist ever more responsive and intelligent algorithms that can react instantaneously to market anomalies and anticipate interruptions to liquidity. These rapid response algorithms could help to prevent the next flash crash by alerting risk managers of impending issues, or by changing trading strategies to accommodate market glitches.

On top of smarter algos, there are a few other splash crash prevention measures:

  • Use real-time pre-trade analytics and risk management. If the mutual fund in question on May 6th or its executing broker had done a thorough back-test of its trading strategy, using some of the dire indicators present, it might have thought twice about selling so aggressively - possibly preventing the crash.
  • "Light up" the algorithmic trading process. Visibility during the trading process is crucial. Surveillance technology exists than can monitor the markets for anomalous behaviour and alert the parties involved if it is spotted. Give the regulators the tools, too. 
  • Homogenize trading rules across all exchanges and ECNs. When one halts trading they all halt - for the same amount of time.

 

Monday, December 13, 2010

Calming 'Regulation Anxiety'

Posted by Dan Hubscher

There is a new kind of emotional disorder going around the financial markets - the previously unnamed fear of something ominous now that new financial rules have been laid down. Let's call it regulation anxiety.

Regulation anxiety has led to all sorts of new types of behavior in banks such as laying off proprietary trading staff, hiring ex-SEC lawyers, and laying on extra lobbyists to besiege Capitol Hill. The syndrome is so widespread that it has finally attacked the foreign exchange market - the market that performed the best during the financial crisis despite a lack of almost any regulation. And although the FX market 'ain't broke' it will undoubtedly get 'fixed' under new rules. It is these fixes that are causing panic attacks in the FX industry.

A survey of FX professionals at the Bloomberg FX10 conference in October showed marked anxiety over the impact of regulation and also possible changes to market structure.  More than 80 percent of those polled said they were concerned about the impact of recent regulations on their businesses.  They were also against structural reform and at odds as to which industry model is best for the future.  According to Bloomberg, the majority of the respondents were opposed to an exchange-traded model or a clearing house model, with only 19% believing the FX markets should have both clearing houses and exchange-traded requirements.

FX is a unique asset class in many respects; being (to date) almost totally free from regulation and benefiting from high liquidity on a global scale. Traders - wholesale, institutional and retail - are attracted by the ease and convenience of online currency buying and trading. The statistics bear this out with an average turnover of around $1.5 trillion per day – a clear indication of the strength of the market.

FX liquidity and volatility is growing day by day and trading foreign exchange in fast-moving, highly volatile times carries a high level of risk. As such it may not be suitable for all types of investors, institutions and buy-side firms. As a result, sell-side organizations that are serving the quickly-growing needs of hedge funds, proprietary traders, and other firms that take on these risks take on their own additional risk. There is a need to manage their own increased risk intelligently without erasing their competitive advantages.  

At the same time increased automated order volumes from the buy-side represent revenue opportunities for sell-side firms. But attracting that order flow away from competitors requires unique services, aggressive pricing and the ability to find the best prices in a highly fragmented market - not to mention the speed and scale needed to keep up in a high-risk environment.

There are solutions available which enable sell side institutions worldwide to rebuild their FX eCommerce platforms in line with the requirements of the most challenging customers and prospects. This is with a view to automate and customize their trading operations to become more competitive. There are now technologies that combine FX trading venue connectivity with a bird’s eye view of the market in real time; aggregating fragmented liquidity and including smart order routing algorithms, enabling every element of an eCommerce platform to automatically find and leverage the best prices.  

And, a very few include a rich development framework for both business users and IT. The flexibility for the business user allows traders to create and rapidly deploy proprietary FX and cross-asset trading strategies that help them competitively engage with clients.

There have been numerous recent examples of banks looking to take advantage of these solutions. For example, Royal Bank of Canada (RBC) recently deployed a new FX Aggregation solution to support its foreign exchange dealing operations. The Progress Apama FX Aggregation Solution Accelerator  is completely customizable and has been modified for RBC to meet its specific requirements. RBC's new system has significantly increased the efficiency in which its traders obtain the best FX prices for their clients.

RBC is the latest in a growing list of global and regional banks, which have deployed this type of platform as a foundation for eCommerce. Other organizations that have deployed FX solutions driven by technologies from Progress Software (namely its Apama product) recently include BBVA, UniCredit and ANZ, who can now access multiple sources of liquidity and dramatically improve their ability to handle increased trade volume.

The best way to deal with anxiety is to address the root cause. In this case, regulation. Regulation is coming, change is coming. Since the FX world is now facing looming regulations with dramatic impact, you’re going to need to adapt your business models and supporting applications quickly in order to survive – for instance by building flexible rules within your FX trading systems to identify and manage risks, whatever they may turn out to be.  If you do, you’ll be ahead of the pack and will be able to create competitive advantage.

-Dan

Thursday, November 04, 2010

A postcard to Jeremy Grant

Posted by Giles Nelson

Jeremy Grant, editor of FT Trading Room at the Financial Times, recently asked for explanations "on a postcard" about why speed is a force for good in financial markets, or put another way, to explain what the benefits are of high frequency trading. I've just come back from Mexico where I was addressing the Association of Mexican Brokers and during my visit I thought I'd write that postcard. So here it is:

 

Dear Jeremy

I saw your request for postcards recently, and as I'm travelling I thought I'd drop you one. There's not a lot I like doing more than explaining the benefits of so-called "high frequency trading".

I would suggest that you think of high frequency trading, or HFT, as being just the latest stage in the evolution of electronic trading. And this, as you know, has evolved very rapidly over the last decade because of cheaper and faster computers and networks. It's led to many innovations and benefits: electronic crossing networks, algorithmic trading, online retail trading, smaller order sizes, the overall increase in trading volume, more price transparency, greater trader productivity, more accessible liquidity, spreads between buy and sell prices tightening, broker commissions reducing, competition between exchanges and so smaller exchange fees - none of these things would have happened without electronic trading. MiFiD couldn't have happened; it simply wouldn't have been financially viable for the many alternative European equity-trading venues to launch without cheap access to networks and computers. Without these we would still have greedy, monopolistic exchanges with high transaction prices.

HFT is just the latest step in a technology driven evolution. You can't just look at it in isolation.

"Ah", you exclaim, "but high frequency trading is a step too far. Trades happening far faster than the blink of an eye. Surely that can't be right?"

So what if trades happen quickly? Things "going too fast" is a common concern. In 19th century Britain, people were worried about trains going faster than 30mph. They thought that passengers would suffocate or that as the train reached a corner it would simply come off the rails! And to those that say trading happens too quickly, at what speed should it occur? If not micro or milliseconds, should it be a second, a minute, an hour? Who's going to decide? Any choice is entirely arbitrary anyway; time is infinitely divisible.

There are plenty of things that happen too fast for humans to comprehend - human nerve impulses travel at more than 100m per second, yet we function successfully. Why? Because we have the monitoring systems in place that ensure the information from the nerves is processed correctly. Put a finger on a hot coal and it will be retracted immediately - quicker than we can consciously think. And if a 200mph train goes through a red light then warning bells will ring and the train will be automatically stopped.

And so to the main point. Trading speed, per se, is not the problem. But, yes, problems there are. Markets, particularly in Europe and the US are now very complex. These markets are fast moving, multi-exchange, with different, but closely interlinked asset classes. It is this complexity we find difficult to understand. Speed is only one facet of this. We imagine that an armageddon incident could occur because we know that the markets are not being monitored properly. Regulators freely admit this - Mary Schapiro recently said that the SEC was up to two decades behind in its use of technology to monitor markets. And because we know that the people in charge don't know what's going on, we get scared.

It doesn't have to be like this. The same technological advances that led to the evolution of HFT can be used to ensure that the markets work safely, by ensuring that limits are not exceeded, that an algorithm "going crazy" can't bring down an exchange, that a drunken trader can't move the oil price and that traders are dissuaded from intentionally trying to abuse the markets.

Doing things faster is a human instinct. Faster, higher, stronger. The jet engine, the TGV, the motorway. Would we really go back to a world without these?

Monday, October 11, 2010

When Does a Rogue Become a Scoundrel?

Posted by John Bates

Now that the Dodd-Frank Wall Street Reform Act is signed into law, there lies a mountain of work ahead for regulators. Making sense of the 2,000+ page document and turning it into viable recommendations and regulations will be an arduous process.

 

The Commodity Futures Trading Commission's second Technology Advisory Committee meeting titled “Technology: Achieving the Statutory Goals and Regulatory Objectives of the Dodd-Frank Act,” will be held on October 12, 2010 at 1:00 p.m., in Washington, D.C. (http://tinyurl.com/2vfdp4n). At the meeting, my committee colleagues and I will discuss some of these goals and objectives. Specifically, as a result of the SEC & CFTC's report on the May 6th flash crash, CFTC Commissioner Scott O'Malia has said that he wants to take a look at whether algorithms that cause disruption in markets - rogue algorithms - should be treated as if they were rogue traders.

 

Commissioner O’Malia said in the announcement of the October 12 meeting: “While I do not believe that the flash crash was the direct result of reckless misconduct in the futures market, I question what the CFTC could have done if the opposite were true. When does high frequency or algorithmic trading cross the line into being disruptive to our markets? And, along those same lines, who is responsible when technology goes awry? Do we treat rogue algorithms like rogue traders?"

 

This is an interesting topic. When does an algorithm 'go bad'? Is it the algorithm's fault? Of course not, an algorithm does not decide to go rogue. It is down to human error - either in the programming or the execution thereof. In the case of the flash crash a mutual fund chose a 'dumb' execution algorithm preset with inappropriate parameters to execute a large futures sell order in a market that was - by all accounts - ready to plummet. This circumstance illustrates how rogue algorithms can evolve as an unintended consequence of circumstance and/or human misjudgment.

 

When a trader goes rogue it is more deliberate. It can be because he is losing money and hiding it - as in the case of Jerome Kerviel at SocGen, or maybe he had too much to drink at lunchtime and was feeling invincible - like Steve Perkins at PVM. The former lost the bank over $6bn, the latter lost his brokerage $10m. These were very human errors, effectively the work of scoundrels.

 

What rogue traders and rogue algorithms have in common is that both can, in many circumstances, be detected early - or even prevented - through the use of better technology. Comprehensive pre-trade analysis, including backtesting algorithms under a wide range of circumstances, could have prevented the 'dumb' May 6th algo from having its way with the market. Thorough real-time risk management and monitoring could have spotted Kerviel's limit-busting trading patterns and his hiding the trades. Pre-trade risk controls would have kicked the PVM trader out of the system before he got in too deep.

 

It is no longer acceptable to blame rogues and scoundrels for market anomalies or for banks, brokers and buyside firms losing money. The technology is there, it simply needs to be used.

 

Wednesday, September 15, 2010

I Would’ve Got Away With It Too - It If It Wasn’t for You Pesky Kids….

Posted by John Bates

Strange things are happening in the markets! As you know if you’ve been following this blog, quite a few scares, horrors and apparitions have been sighted in equities, futures, FX and oil markets over the last few months. But fortunately the Mystery Machine has rolled into town and Scooby, Shaggy and the gang are investigating…

 

The latest spooky mystery is “phantom orders” that appeared to scare participants on the CME (read more about it here). For 6 minutes on Tuesday unexplained orders, that could have been caused by a “fat finger” error or an “algo gone wild”, caused CME to use Rule 587 which gives them powers “including without limitation, closing the market, deleting bids and offers, and/or suspending new bids and offers”. So although they weren’t sure what was going on – the CME were at least able to respond.

 

Another report this week shows how those involved in alleged market abuse are starting to be unmasked. Last week I wrote a blog posting called “Algos Can Get Stuffed” which was also featured on the Tabb Forum. In it I talked about the possibility of firing orders into the market with the intention of misleading the market or slowing the market down – and even how some link this phenomenon with the flash crash. This week a trading firm called Trillium was fined by FINRA for using illegal trading practices (read more about it here).  Trillium was fined $1m for sending orders aimed at deceiving investors. Nine traders entered buy and sell orders in patterns that aimed to manipulate the prices of instruments. And they did this 46,000 times! This “layering” enabled Trillium to trade at a profit once they’d manipulated the price.

 

These 2 incidents show that awareness of the problems we’ve been writing about on this blog have increased radically. Trading venues are more aware that algos gone wild and fat fingers can cause market panics and manipulate prices. Regulators are more aware that high frequency trading can be used as a weapon for market manipulation.

 

But we can’t rest on our laurels. Maybe we got lucky this time. As market data volumes continue to increase we need to have more advanced capabilities to detect problems and abuse as it’s happening, and recommend actions to take in response. Let’s ensure the Mystery Machine is fitted with the latest real-time surveillance equipment. Let’s enable the gang to unmask more villains at the haunted “high frequency manor” inspiring the legendary outburst of “I would’ve got away with it if it wasn’t for you pesky kids….”

Wednesday, September 08, 2010

Algos can get stuffed!!

Posted by John Bates

As regulators continue to look into the causes of the May 6th flash crash, some high frequency trading approaches are coming under scrutiny. In particular the concept of “quote stuffing”, where algorithms send so many orders into the order book that the market cannot possibly respond, has come under fire from market participants and the press.

 

The SEC, having reportedly decided that quote stuffing probably did not have a major role in the flash crash, is now taking aim at the practice to see if it puts some investors at a disadvantage by distorting stock prices (http://tinyurl.com/264kr3o). The CFTC is looking at data from database developer Nanex and mulling how to address quote stuffing in futures markets (http://tinyurl.com/3a7w7sv).

 

Meanwhile, concerning incidents continue to happen in the market. As recently as last week there was an incident that caused Christopher Steiner at Forbes to write a story called “Did we dodge another flash crash on September 1st?” The story describes how on September 1st at 10am quote volumes ballooned - as they did on May 6th. In fact quotes reached 275,000 per second, as opposed to 200,000 on May 6th. Unlike the flash crash though there wasn’t a dramatic fall in prices. However, the bids and offers did cross for a time – leading to high frequency traders taking advantage of arbitrage opportunities. This data was exposed again by firm Nanex – and left the market wondering if quote stuffing by high frequency traders was behind the spikes.

 

The world is waking up to the fact that high frequency and algorithmic trading have quietly become part of the market fabric, and the world does not seem to be too happy about it. HFT and algorithms are being "demonized" said the FT article, and I agree. I also think the hype is overblown.

 

Once trading became automated, trading strategies naturally morphed to take advantage of the available technology and higher speeds. High frequency statistical arbitrage techniques can also mean more order cancellations, some of which may - wittingly or unwittingly - fall into the quote stuffing category. Those involved in intentional quote stuffing as a strategy need to be held to task. But to demonize all strategies or call for banning them is a step backward. What is needed is a framework by which to police them - and to prevent them from going wrong. The technology to do this is already available. For example, an area I’ve had a lot of experience in is the use of complex event processing to provide a platform for high frequency, multi-venue market surveillance. With such a system quotes can be monitored to determine how many quotes per second there are on each ticker symbol, the ratio of quotes to trades, when large spikes are emerging and many other interesting real-time analytics and patterns that it’s useful to track in real-time.

 

But regulation of high speed trading practices has fallen short to date. Regulators have not had the funds, the technology, the power or the expertise to follow and control high speed trading. However, it is good to see that progress is now being made. CFTC commissioner Bart Chilton wrote last week in an article entitled Rein in the cyber cowboys: “There may be some cyber cowboys out there and they could be giving respectable traders a bad name”. His colleague CFTC commissioner Scott O'Malia told Reuters last week that, if traders are flooding the market with orders with the intention of slowing others down, the regulator would consider addressing quote stuffing under new rules in the financial regulation bill that deal with disruptive trading practices.

 

It is possible that quote stuffing is causing more problems that just slowing down the natural flow of trades. Trading behavior patterns suggest that these quotes are a distraction to other traders. There are patterns evident where the quote "stuffer" continuously traded first - possibly by distracting others. And the disruption can cause the bid and offer to cross – providing a nice arbitrage opportunity for those who are not distracted! All of this needs to be looked into further. I fully support the CFTC and SEC's efforts to get to the bottom of not just the flash crash, but HFT and algorithmic trading practices. They are now integral in the equities and futures markets, and increasingly so in FX, fixed income and energy. What we need is better policing of the markets to protect the honest ranchers from the cyber cowboys.

Tuesday, August 31, 2010

Taming the Wild Algos

Posted by John Bates

"And now," cried Max, "let the wild rumpus start!"

— Maurice Sendak: Where the Wild Things Are

 

It’s not just equities and futures markets where strange stuff happens! An “algo gone wild” was spotted in the oil market (it actually happened earlier this year) and intrepid Reuters journalists got to the bottom of it.

 

High frequency trading firm Infinium Capital Management is at the center of a six-month probe by CME Group (and reportedly the CFTC) into why its brand new trading program malfunctioned and racked up a million-dollar loss in about a second, just before markets closed on Feb. 3. The algorithm, which was brand new, went live 4 minutes before the end of trading. It fired in 2000-3000 orders per second before being shut off. The oil price surged $1 then slid $5 over the course of the next two days. Read about the full story here:

http://www.reuters.com/article/idUSTRE67O2QQ20100825

 

I know the CEO of Infinium Chuck Whitman from the CFTC technology advisory committee – he’s a good guy and very knowledgeable. I believe him when he says his wild algos had no malicious intent – the algos were just broken and shouldn’t have been put live.

 

With algorithms and HFT comes the possibility of mistakes. Many more firms outside of the equities world are embracing HFT and their inexperience can cause market disruptions such as the Feb 3rd CME issue. A flash crash in oil or other commodities - or even foreign exchange - is not to be scoffed at. In fact, many commodities markets are much less liquid and homogenous than equities, and can be even more vulnerable to mistakes or manipulation. In the case of Infinium, the algo caused a spike in trading volumes by nearly eight times in less than a minute. It was a classic case of the algo running wild until it faltered and 'choked'. This is not how HFT strategies are supposed to work.

 

There are a number of best practices that can be used to mitigate against algos going wild:

 

The first best practice is diligent backtesting – using historic data and realistic simulation to ensure many possible scenarios have been accounted for. What does the algo do in a bull market, a bear market, at the open, at the close, when unexpected spikes occur, during a flash crash, when non-farm payrolls or other economic news is released etc. etc.? Of course there’s always the possibility of a “black swan” scenario – but then there’s always the possibility of an earthquake in London – but I bet the buildings aren’t built to withstand one – it’s a matter of covering likely possibilities as best you can. A backtesting process needs to be streamlined of course – as short time to market of new algos is key.

 

A second best practice is building a real-time risk firewall into your algo environment. Just like a network firewall stops anomalous network packets reaching your computer, so the risk firewall should stop anomalous trades getting to trading venues. These anomalous trades might be human or computer generated – such as “fat finger” errors, risk exposures (for a trader, a desk or an institution) being breached, or even algos gone wild (e.g. entering spurious loops and spitting out anomalous orders). Real-time risk monitoring is a second level protection for those problems you don’t catch in backtesting.

 

A third best practice is to use real-time market surveillance in your algo environment. Even if trades do not breach risk parameters, they may breach compliance rules, regulations or may be perceived by a regulator as market manipulation (by accident if not design). Detecting these patterns as they happen enables good internal policing by trading firms, rather than investigation or prosecution by regulators.

 

An algorithm is a tool in a trader's toolkit, and it needs to be taken care of as such. If it is well-oiled and the trader or quant or risk manager monitors its progress then the algo will do its job quickly and nicely. If the trader/quant/risk manager doesn’t properly prepare the algo or ignores the algo and lets it get rusty, so to speak, it could lose its edge and run amok. Algorithms must be monitored constantly for performance and for errors, and sometimes tweaked on-the-fly to ensure best results. A good algorithmic trading platform will enable trading firms to do just that.

 

Trading firms are not the only ones who need to be on guard for possible algos gone wild. In the case of Infinium, the regulators and the exchange were also slow on the uptake. This shows that everyone needs to be proactive in using the correct tools to monitor algorithmic trading. Sensing and responding to market patterns before the aberrations or errors have a chance to move prices is the right thing to do - in all asset classes. Be like Max and tame the wild things!