Complex Event Processing

For those that don't see the benefits, the point is that making statements declarative as opposed to imperative makes things easier and productivity goes up. In addition, the code becomes self-documenting and can even be read by traders. Finally, once you get the engine bug free, you can be certain that compound statements are also bug free.

I am no fan of (N)Esper, but realtime Linq is extremely interesting to me, and I see little if any advantage of a CEP over realtime Linq.
 
Quote from nitro:

For those that don't see the benefits, the point is that making statements declarative as opposed to imperative makes things easier and productivity goes up. In addition, the code becomes self-documenting and can even be read by traders. Finally, once you get the engine bug free, you can be certain that compound statements are also bug free.

I am no fan of (N)Esper, but realtime Linq is extremely interesting to me, and I see little if any advantage of a CEP over realtime Linq.

Yes... exactly :)
 
Quote from rosy2:

ok. what would that code look like if it wasnt in a CEP query? can you post it here? thanks

I wrote a small class for summation:

Code:
 public static class Summation
    {
        //static KeyValuePair<int, double> value;
        static double[] values;

        public static double PriceSummation(this IList<Common.Entities.Bar> bars, int length, int currentBar)
        {
            //3   2   1   0
            //4   6   9   14
            //length--;

            if (currentBar == 0)
            {
                values = new double[bars.Count()];
                for (int i = length -1; i >= 0; i--)
                {
                    values[i] = values[i + 1] + bars.ElementAt(i - currentBar).Close;
                }
            }
            else if(length + currentBar <= bars.Count())
            {

                values[currentBar + 1] = bars.ElementAt(length - 1 + currentBar).Close;
                values[currentBar] = values[currentBar - 1] - bars.ElementAt(currentBar - 1).Close + (bars.ElementAt(currentBar + length - 1).Close);
                
            }
            

            return values[currentBar];
        }
    }

This class can then be used in an Average, something like:
Code:
for (int i = 0; i < values.Count(); i++)
            {
                values[i] = bars.PriceSummation(length, i) / length;
            }

I can see your point :D Slowly the sun is shining through!
 
As far as I know Marketcetera is partly based on Esper so that might be a place to look.

Quote from nitro:
I am no fan of (N)Esper, but realtime Linq is extremely interesting to me, and I see little if any advantage of a CEP over realtime Linq.

Possible stupid question, but what do you mean by "realtime" linq? My search did not result in any obvious references to it.
 
"Can anyone direct me actual case studies where CEP has been succesfully implemented"

I personally know of a group that uses Apama by Progress Software for CEP trading strategies ( shared office space with them ).

About $18K per month to lease the software.
 
Back
Top