Complex Event Processing

Discussion in 'Automated Trading' started by januson, Aug 2, 2010.

  1. nitro

    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.
     
    #11     Aug 2, 2010
  2. januson

    januson

    Yes... exactly :)
     
    #12     Aug 2, 2010
  3. januson

    januson

    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!
     
    #13     Aug 2, 2010
  4. As far as I know Marketcetera is partly based on Esper so that might be a place to look.

    Possible stupid question, but what do you mean by "realtime" linq? My search did not result in any obvious references to it.
     
    #14     Aug 2, 2010
  5. bone

    bone

    "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.
     
    #15     Aug 2, 2010
  6. got this spam emailed to myself today by P Widdy's website. Don't know how useful it is or how much of it is an advert, considering it resides on Streambase's website :D
    I haven't bothered watching it as I have seen this sort of sheah before from Streambase and their webinars...

    http://www.streambase.com/customers-city-index-view-now.htm
     
    #16     Aug 4, 2010