Saturday, March 12, 2011

New Post from Marco (ruleCore)

An interesting post from founder of ruleCore, a CEP implementation focusing mainly on transportation problems explains what not to do with CEP.

Regards

Rhino from Kaziranga.

Nice Post from Mr. Opher Etzion

One of the father figure from CEP R&D community Mr. Opher Etzion outlines when and why CEP technology should be used. Please note first example in first row of the table.

Regards

Rhino from Kaziranga.


Friday, March 11, 2011

Welcome and Lets Talk CEP

Hi Everybody,

Welcome to first blog post of Complex Event Processing based OpenSource project cep-trader

In my first blog post, as maintainer of the project blog, I would like to take opportunity to introduce myself, my approach of postings here and how I think about application of CEP in trading as a trader and strategy developer. This blog will serve me as a place to express the wishlist from a pure trader's perspective.

I started my career as a trader at a proprietary trading house at Mumbai, India in year 2000. I was promoted as technical analyst in year 2004. Here I got opportunity to do functional analysis for automating our several trading strategies. After gaining expertise in creating proof of concept, developing, back testing, doing feasibility analysis, and real time testing of very complicated chart pattern based trading strategies, I shifted to high and medium frequency trading firm in year 2007 at NOIDA, Delhi. Here we work with world's few of the best analysis, strategy design and execution frameworks including Progress Apama in context with CEP technology.

As a pure trader I always wished many very simple features with most of the trading platforms I used, but observed that, because software architects/ business analysts were not experienced traders, they missed out powerful features frequently putting constraints on the ability to write powerful trading strategies. In My next posting, I will compare my experience with APAMA and ETALIS to explain how simplicity matters a lot and why most of the current commercial CEP products are nothing more than technology demonstration applications, total garbage, not something which can be used easily by actual user.

Why I think CEP is next big thing in Algorithmic Trading Industry.

I am a trader turned strategy developer. In my perspective, a trade opportunity is my perceived imparity in the buying and selling force in my timeframe of the trade. Most of such imparities, if objective, can be determined with help of mathematics which is called as quantitative analysis. Till now quantitative trading strategies were upper limit for sophistication of algorithmic trading strategies.

Quantitative analysts, with their powerful grid computers worked day and night to find out imparities in markets with help of highly complex techniques. They, together with computer and electronic engineers implemented their trading strategies on ultra-fast computers to initiate a deadly race where few microseconds matter in long term survival of their trading firms. This high frequency trading race helped in making almost arbitrage free markets and bringing practically unlimited liquidity in the markets.

However, most market imparities cannot be determined with mathematics. They can be only exploited with so called “subjective” trading strategies.

But most of the algorithmic trading till now relied on traditional programming languages where trade idea was also deployed in some general purpose language. This thing was biggest constraint in automating most of trading methods because it was not possible to express them in these general purpose programming languages.

This would be like I have to sit on chair in the way chair would feel comfortable, not in the way I would feel comfortable. :-)

As a simple example, I would take a strategy we implemented recently. One very old trader working in our firm shared this idea with us with which he trades very profitably. He does not use any chart and trades just on his observation of order flow. His methodology was to sense the level where lot of stops are placed and take advantage of short term sharp move resulting from large scale stop order executions. It was a combined behavior of order flow, execution at bid/ask, rate of increase in volume.

Can somebody tell me how I could automate this strategy with so many subjective observations in sliding time windows with too many rules without putting 4 programmer team for 2 months?

No way with any traditional programming paradigm and any traditional algorithmic trading platforms…

This is where CEP comes into picture. We deployed this strategy with help of ETALIS because it is much easier and expressive than SQL based CEP languages. It took only 60 lines of actual strategy program in ETALIS language. You can easily imagine, it could have taken thousands of lines in traditional programming languages and still would not have worked as effectively.

Moral : Where difficulties and complexity in quantitative trading strategies hits limits, difficulties in subjective/non-quant trading strategies just start..........

We can call these strategies as “subjective” just because we trained our brains to think in terms of the programming languages we know. We can say that they are based on just “intuition” because we are not able to define/sequence their rules in programmable ways. We can call them “too complicated” because we wonder how our programming language can handle such logic flow without getting messed up with thousands of lines of codes.

But still those strategies are simpler to express than their quantitative sisters. They are very much rule based. They are highly objective if we can correctly define them.

And they are much more profitable than quantitative strategies.

Till now we were not having a programming paradigm which takes time, space and distance into account and let us help express our ideas.

I think CEP will fill this big void in today’s computerized world. Not only in financial trading, but this technology is working wonderfully in most of the fields where traditionally programmed applications have either badly performed or failed, like weather and geological predictions, health diagnosis, military and civilian intelligence, situation analysis, smart homes….and much more.

As per my observation, only core trading logic expressed in ETALIS language or in APAMA script reduces coding size over C# by factor of 10-60 !! We know that markets keep on changing in matter of days hence life of a trading strategy is also small. They need to always undergo small modifications sometimes daily.... In such cases, short codes help lot..

********************************************************************************

What I don’t expect and expect from a good CEP based trading application.

I don’t want another chart based trading system. There are too many and better systems out there capable to handle large array programming and complicated chart pattern analysis. Chart pattern analysis is not complex event processing.

I don’t want another quantitative/mathematical trading system. In this segment also we have much better, state of art, and highly complicated programs which can even control space mission to K-PAX. J

What I would Love

I would love a simple dashboard connected with execution mechanism where I can express my ideas as I think in least complicated, English like syntaxes.

I want to have traditional as well as special rule expression clauses like during, between, afterwards, parallel with, along with, finishes, begins with…..

I want to have sophisticated time window functions.

I would like the dashboard to look like MS SQL Studio where I can write/modify my strategies and run it on the fly with just a click of button.

************************************************************************************

In my next posting tomorrow, I would express my observations of couple of commercial and few open source CEP implementations in a trader/strategy developer’s perspective. As well, I would propose for few more concepts we can assemble in a CEP trading engine which can increase it’s power and ability to program highly complicated algorithmic trading strategies.

Thanks and Regards

Rhino From Kaziranga