- This line was added.
- This line was removed.
- Formatting was changed.
Marketcetera’s Complex Event Processing module incorporates the ESPER CEP engine. Complex Event Processing (CEP) systems provide a useful set of abstractions that allow traders to reason about events that occur over time including the ability to group, correlate, and calculate statistics over these events.
The CEP system can be thought of as a DBMS “turned sideways”. In fact, the Event Processing Language (EPL) used by the Marketcetera CEP module looks a lot like SQL, with SELECT, FROM, WHERE, GROUP BY, HAVING and ORDER BY clauses although the results are expressed in event streams rather than tabular result sets. Streams replace tables as the source of data with events replacing rows as the basic unit of data. Since events are composed of data, the SQL concepts of correlation through joins, filtering and aggregation through grouping can be effectively leveraged. The INSERT INTO clause is recast as a means of forwarding events to other streams for further downstream processing. External data accessible through JDBC may be queried and joined with the stream data. Additional clauses such as the PATTERN and OUTPUT clauses are also available to provide the missing SQL language constructs specific to event processing.
Marketcetera’s CEP module is designed for high volume event correlation where millions of in-coming events would make it impossible to store them all to later query using classical database architectures. Algorithmic traders create CEP queries to continuously analyse the in-coming fire hydrant of market data and pick out just the particular events that matter to the trader. CEP queries can incorporate both real-time and historical data can be structured to trigger custom actions when event conditions occur among event series, in our case typically sending an order to the exchange.
- Run calculations over moving windows of time
- Correlate events (A happens before B which happens before C)
- Assess trends over time (price has been decreasing)
- Quantize data (I just want one representative tick per minute)