"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!
In a blog post about CEP being considered a supporting act for BPM and other technologies, Raimer von Ammon of CITT (a spinoff from University of Regensburg, Germany) commented about the EU proposal for a “U-CEP” (Ubiquitous CEP) research programme. In that comment Rainer mentioned the connection between CEP (an IT paradigm around events) and Biology (covering event-driven neural and evolutionary systems - Epigenetics and Brain Research) which form part of the U-CEP EU research programme proposal. Rainer has kindly elaborated some more on this topic, which IMHO is worthy of a separate post on this blog … and I note has parallels to one of James Odell’s posts on the “inside of an agent”…
Two or three recently emerging disciplines yield to a similar paradigm in order to explain how the environment (actually the universe of global event clouds) and their processing by sensors (respectively receptors and the activation of effectors) drive our daily life, but also the whole evolutionary process of life on our earth since the Big Bang.
The discipline of the New Biology or Epigentics has detected - on the basis of the nanotechnology, microbiology and cell biology – within the last years that the life of cells is determined by its physical and energetic environment and not by their genes. Genes are only the molecular “blue print”, the design pattern, on which the structure or architecture of cells, tissue and organs is based. But the environment as a global cloud of signals, energies or so called events are at the end responsible for the way of life of a cell. In each single cell the mechanisms of life are triggered by the processing of the “events” of its environment and not by its genes.
Since “quantum physics” and the “Heisenberg uncertainty relation” we know today that such events are at last energy as eddies of quarks and photons, but we can define different types of events, also on the physical level. Around 3.5 billion years ago the first monads as bacilli and algae lived on the earth, 650 millions of years ago the multicellular organisms as trees and other plants were created as a more complex and more intelligent life, and since around only 100,000 years the today’s human is a united cell structure of 50 trillions of single cells where each cell is doing event processing on the base of its receptors of its cell membrane. So, a human being can allegedly process 120,000 events per second unconsciously (by the right side of the brain), but logically a human can only process around (I guess) 7 or a few information units at the same time (by the left side of the brain).
Against this background CEP is based on a very similar model. EPAs (event processing agents) are actually cells where event adaptors are the receptors of a cell membrane and the event processing logic based on an EPL (event processing language) are the effectors of a cell. EPNs (event processing networks) are actually a united multicellular structure and so on.
The Epigenetics explains how the environmental signals (events) control the activity of the genes. The primacy of the DNA is no longer valid, and the new found information flow is now called the “primacy of the environment”. Recent experiments of The Epigeneitcs have proved that our beliefs and thinking is energy in the sense of environmental signals. The Epigenetics found that all these kinds of environmental signals influence the regulating proteins which control the activity of the genes and that the global event cloud as environmental signals influences and changes the DNS (so called reverse transcriptase).
What is an individual?
According to the Epigenetics an individual is determined by the sum of its receptors in the cell membrane of all its 50 trillions of (specialized) cells. Each individual is unique because it is controlled or driven by the protein machines of its cells as a result of the received events (signals) of the global event cloud of the universe. The global event cloud does always exist and each event is an undestroyable energy which exists always and forever (see Unus Mundus and space-time continuum).
The Epigenetics explains an individual as an analogy of a broadcasting of television programs where the adjustment buttons are the receptors of the cell membranes which determine which program we receive in which manner. If we add or switch off receptors, we receive a different program or we see the same program differently. This can be understood as the incarnation of an individual. On the basis of such a model we can explain phenonemas like reincarnation or time travel as well.
Results of the recent Brain Research
On the basis of recent experiments of the Brain Research, researchers like Wolf Singer, Gerhard Roth et al. claim that a free will does not exist. They believe that their experiments have proven that the brain region which is responsible for a deliberate decision is only later activated when a signal or event is received while the protein machinery as the activity activator was already started “long” before. This cognition that there is no free will could be supported by the Epigenetics and the functionality of a cell membrane and its receptors and effectors/event adaptors and EPA’s as the basis of the whole protein machinery and as the motor of life.
“If you think you think you only think you think” versus “Cogito ergo sum” (Descartes) …”
For the U-CEP course/textbook I’m gathering some materials since some time which I’ll add to the U-CEP doc within the next days; here are some nice video lectures as a basis for U-CEP enhancements/projects, e.g. from Bruce Lipton, I like him as a great guy and great lecturer:
http://epigenetics.uni-saarland.de/en/home/ (German language only)
http://www.tonyb.freeyellow.com/id68.html
http://www.veoh.com/collection/AgriculturalNews/watch/v378752sbRFQa3F# (video)
Great to hear that TIBCO might support such U-CEP ideas, perhaps Larry Ellison or also Bill Gates would be interested in supporting such things … as an investment in the future
Related posts:
A recent CEP RFP requested marketshare data for the “CEP market“, worldwide and in specific territories. Presumably the contracts departments for large enterprises are hoping that software development tool purchases are tracked by some industry body (Nielsens maybe) just like Cornflake packets and Persil washing powder. Unfortunately, this is not the case - and of course the definition of “customer” is itself open to interpretation (someone who uses the software? someone who paid money for the software? a licensee?). Some companies also embed “CEP software” in larger categories of software (e.g. messaging or BAM); others sell only stacks that might include CEP licenses, without necessarily any use of said licenses.
Nonetheless, it is interesting to try and find some data points here. Software companies generally make “customer numbers” claims via press releases and in analyst reports, as well as SEC etc reports, and these can be collated and cross-referenced to try and come to a “big picture”. Doing so finds some interesting details such as:
Related posts:
According to the FT, the Financial Industry Regulatory Association is undertaking a “sweep” of broker-dealers that offer direct market access to high-frequency traders to find out if they have pre-trade risk management controls in place for their algorithmic customers. (Read the full story here: http://tinyurl.com/28rg287). Here at Progress Software we have been advocating the use of pre-trade risk management tools for some time. The prospect of High Frequency Trading (HFT) firms running trades directly through broker algorithms (naked access) to exchanges/ECNs without adequate supervision has always concerned us. Brokerage firms simply give their clients an exchange ID number, which the clients then enter into their algorithms so that they can trade directly with the exchange.
Regulators are right to be concerned. Unfiltered access to trading destinations can end up causing trading errors or worse. Anything can happen with naked access; from fat fingered errors, trading limits being breached, even fraud - all of which can cost brokers, traders and regulators big money.
Although the SEC proposed banning naked access in January, and the Committee of European Securities Regulators (CESR) is likely to follow in its footsteps, there has been considerable pushback from brokers and trading firms. They say that adding a pre-trade risk management step would cause a "latency hop" in the trading process, claiming it would make them uncompetitive. A layer of risk management often adds a third party into the mix, and - consequently - a delay.
But if everyone is required to add real-time, pre-trade risk management, then the competitive disadvantage is moot. The benefits of being able to pro-actively monitor trades before they hit an exchange or ECN far outweigh any microscopic latency hops in any event. The naked access playing field is hardly level. There are trading systems out there that claim to throughput a trade in 16 microseconds from outside an exchange's firewall, while exchange and ECN systems range anywhere from 250 to 700 microseconds (according to measurements by latency management firm Corvil).
Latency is clearly an important issue and complex event processing offers a solution. Brokers can achieve ultra-low-latency pre-trade risk management without compromising speed of access. An option is a low latency "risk firewall" utilizing complex event processing as its core, which can be benchmarked in the low microseconds. With a real-time risk solution in place, a message can enter through an order management system, be run through the risk hurdles and checks, and leave for the exchange a few microseconds later.
It is the ideal solution to a tricky question - how do I manage risk before my trade hits the exchange without compromising speed? The benefits are clear - a latency hop of a few microseconds not only saves money, it can also prepare your firm for the regulatory future.
Already some years ago, we gave a – very “applied” – university course about edBPM together with colleagues from Audi, Deutsche Post, Hamburger Sparkasse and TeamBank:
http://www.citt-online.com/index.php?id=veranstaltungen&id3=industrieaufgaben&id4=more
http://www.citt-online.com/index.php?id=veranstaltungen&id3=exp06&id4=more
Together with Audi, we started a student project about NextGeneration Navigation Systems / Intelligent Cars based on CEP:
http://www.citt-online.com/downloads/myAudiNavigation.pdf
This first idea was actually born together with the showcase of my former BEA Systems colleague Paco Gomez as an automotive application combining BEA’s event server with location-based services.
The first student team of Katja Borschert, Robert Gottanka, Martin Schober and Christian Silberbauer adapted the showcase for the Audi use case. Later some PhD students like Thomas Ertlmair, Thomas Paulus, Christoph Emmerberger and Florian Springer added some use cases and transferred the showcase according to the new CEP solution from Oracle after the acquisition of BEA. We presented these project ideas a lot of times, internationally at the edBPM Expert Meetings in Regensburg, at the ServiceWave 2008 in Madrid, at our Haifa workshop/visit in Israel February 2009 and so on. Unfortunately, the crisis stopped a lot of projects worlwide. Now, at least Germany is booming again allegedly, especially the Automotive domain, so let’s start again…
In the meantime, we are enhancing the idea by ed(B)PM and U-CEP aspects with some more use cases. These use cases are based on the reference model and the first sketch of a taxonomy in http://www.citt-online.com/downloads/62750370.pdf as a determinstic approach based on in advance defined event patterns and reactions as a “concert” of collaborating processes, but also as a non-deterministic approach for so far unknown, but potentially interesting or critical event patterns based on additional AI- or neural network components. This would be our submission e.g. to the 3rd Workshop on Multimodal Interaction for Automotive Applications (MIAA) in conjunction with ACM IUI in Palo Alto next spring 2011. We will do it in cooperation with a large telco carrier probably.
Those ideas are an enhancement of such research project about driverless cars like Audi’s TTS “Shelley” http://www.silicon.de/hardware/server-desktops/0,39038998,41529810,00/audis+geisterhafter+tts+_shelley.htm
Interesting question to be discussed e.g. at our next edBPM/U-CEP expert meetings is also who would be the responsible of such enhanced intelligent machines or cyborgs or robots etc. in the case of problems or damages? CEP/ed(B)PM providers, EPL programmers, …?
http://www.silicon.de/lifestyle/interview/0,39038973,41530460,00/welche+rechte+und+pflichten+hat+ein+roboter.htm
(I’m sorry, but for 2 links you have to try your translation system if you are not a German speaker)
Cheers
Rainer
Just some quick thoughts of what I think will emerge in CEP in the next couple of years:
Looking for all the world like someone yelled "fire" in a crowded nightclub, prop and quant traders are stampeding out of investment banks and headed for the hedge fund world. Some, mainly the prop traders, are being pushed gently out the door as banks prepare for the Volcker Rule (http://tinyurl.com/39ap28d). Others, like the quants (http://tinyurl.com/23c5h6d), are in search of the mega-bonuses that their prop trader or hedge fund manager compatriots are (or were) getting.
Impending changes in regulation are prompting banks to spin off proprietary trading activities, many by expanding their operations overseas where Messieurs Dodd and Frank cannot reach them. I’m very concerned about this “regulatory arbitrage” in which firms may move away from the US to find less strict regulatory regions. We don’t want to lose the lead in this important area of the economy.
Spin offs and regulatory arbitrage may well leave a herd of US traders looking for work and many may end up working at - or starting - hedge funds. The quants, having slaved over hot computers for the last few years to line bankers' pockets, are forming their own trading companies or joining prop trading firms with a profit-sharing deal.
Most of these traders will be in for a rude awakening when they sit down to work. Prop traders joining hedge funds will find that the technology budgets may not be as generous as they were at their last bulge bracket employer's firm. The quants, who are essentially programmers, will face huge challenges in finding firms that have the kind of low latency, scalable architecture that they need to design, tweak and trade with their algorithms. The level of trading freedom is different, too. Hedge fund managers will have something to say about a trader's profits - or lack thereof. Quants may find that designing an algorithm and handing it over to the trading desk is not quite the same as being responsible for the profits that the algo makes - or doesn't make.
Make no mistake, these prop traders and quants are highly intelligent and adaptable people. There will be many challenges to face going forward, but technology need not be one of them. There are instantly useable, scalable platforms that quants and hedge funds can use to build and deploy algorithms. These platforms, such as Progress Apama's Complex Event Processing Platform, offer a robust technology infrastructure to successfully create, test, deploy and manage their algorithmic strategies.
Algorithmic trading software is constantly transforming. As the volume of real-time market data continues to increase, algorithmic trading solutions demand an infrastructure that can respond to market data with near zero latency. To trade effectively in competitive markets requires rapid, opportunistic response to changing market conditions before one's competition can seize those opportunities. The people that are running for the doors and into the arms of hedge funds or other trading firms, will need this advantage. Competition is fierce, and their previous employers already have the technology advantage.
Opher Etzion wrote an interesting blog responding to analyst Phil Howard, which in turn provoked another response by Rainer Ammon. Phil had commented that the recent developments in event processing pointed to a convergence with “BPM” (and - per his own prediction and with somewhat less evidence - Data Warehousing).
From the last point, there is still seemingly a lot of education required for systems integrators and their architects and software designers - especially if they want to be involved in “charlatan event processing applications”! Luckily CEP vendors like TIBCO have partners folk who are more than happy to arrange webinars and talks about CEP and event processing to these folk. Just drop your TIBCO rep a line!
Related posts:
Forbes published an article suggesting some “high frequency trading” programmers have cut deals to earn them more of the profits from operating the trading applications they write. I wonder if CEP tool vendors - especially the ESP vendors usually involved in algo trading solutions - can do the same? I suspect this model is restricted to algo trading though - there aren’t many other apps that are so directly “profit generating”…
Related posts:
[...] Progress RPM suite is a seamlessly integrated, interactive and customizable solution that provides the [...]
So, where’s CEP heading?
That’s a question that I’m asked a couple of times each week. Those that know a bit about CEP are a bit worried that the current solutions have not caught on. Sure, in some sectors they have. For example in the capital markets there are now a decent number or installations from several vendors. But the real mainstream adaptation is not here if you ask the outsiders. We that work with CEP would really love to hear that CEP is now mainstream, but it is not there yet.
At least CEP have left the early adopter stage, the startups are now acquired or living a post-startup life. That is, those that are still alive.
It seems that those that made it as ‘independent’ vendors, have gone after a solution approach and sell more of a solution to a specific domain instead of pure technology.
Many of the bigger vendors have now some kind of CEP capability to offer. Most of them bought one of the smaller vendors a while ago. Notably Microsoft seem to have created StreamInsight inhouse. But from what I hear, none of the big vendors are selling lots of CEP licenses.
So, there is some activity both at the smaller and bigger vendors, but the real rush seems to be a couple of years away.
What I think is required is a better understanding of what CEP is and from that we need to create better tools, using better concepts. The current concepts in CEP looks to me as a first wave of something. Nothing wrong with them. But I would be very surprised if this would be the optimal way to do CEP.
We need better concepts, perhaps an underlying theory and some kind of collecting agreement on what it The Right Way to do CEP. That’s things that will take some time. Perhaps not a valid comparison, but it tool a while before SQL was The Way To Go in the data storage world.
But I’m sure there are interesting concepts coming. The current ideas seems all be rooted in the SQL or rules concepts. But I would love to see a new freash approach to CEP that treats CEP as an own field. I someone would do that I’m sure more creative ideas would emerge than reusing old concepts from other fields.
My be would be to use a small tailor made language as a base and then build some clever abstractions using that… The language has to be small and complete in order to be a good candidate to build future CEP solutions on. Flexible enough to give some headroom to build different kinds of product, but on the same base.
A good idea? A bad one? Do you have other ideas for CEP 2.0?