Tuesday, 8 September 2009

Event Processing

KaiTrade introduces a range of high performance event processing tools which are now available for beta. The new tools add on to the TS Data (Time series data) processing already in KaiTrade and include:

  • A price aggregator to aggregate data into time/volume bars
  • Calculation library to enhance the bar data with moving averages, Bollinger bands, etc.
  • Pattern matching algorithms to make sense of the data and identify trading opportunities.


Since these functions will work with KaiTrade's existing strategy processing, a trader can compose and execute complex strategies across multiple asset classes with ease.


The price aggregator is able to work from the last price and volume, and so the system works with a wide range of brokers offering real power at a reasonable price.

  1. Price Aggregation

    The price aggregator takes raw data and converts it into a set of bars based on time or constant volume.

    Where a broker or vendor provides time series data, the aggregator works directly with the information from the vendor.

    Usually, the broker or vendor provides the last trade price and volume. In this case the price aggregator puts the data into bars based on the period requested — for example, a stream of last price values can be built into two-minute bars with all the usual datapoints (e.g., Open, Close, High, Low, HLC3, etc.).

    Since the aggregator works with the existing KaiTrade TS Data Set, existing applications can make full use of the data we provide.


  2. Calculations Library

    A calculations library is available to provide some of the common functions needed — for example moving averages, Bollinger bands, ATR, etc. — we have designed the system to allow the end user to add their own calculations using our API.

    The calculations are invoked using the expression evaluator; these calculations are called when bars are added to a set or are updated, and publish their results as curve values in the TS Data Set containing the bar and curve data.

  3. Pattern Matching

    Pattern matching lets the trader identify trading opportunities. Individual pattern matchers work on bar data generated by the price aggregator and curve data added, using the calculation library.

    We have a set of commonly used pattern matching algorithms such as cross detection and bar counts, and as always, the user can add their own pattern matching algorithms to the system using the API. We will have the option to use C# script in Q1 2010.


    The pattern matchers can publish their results as:

  • Conditions (or triggers) that are used in KaiTrade's strategies to enter and exit trades.
  • Inputs to other pattern matchers, in this way you can chain more complex matching schemes together.


Since you can easily associate a trading strategy (for example, a bracket order) to a pattern matcher, it is simple to provide automated trading and order management to provide a complete trading solution.



  1. Putting it all together

    These features give a trader enormous power. Let's say they want to use moving averages to trade the S&P eMini


    It's as simple as ABC — see above:

    1. Choose the product and click on the subscribe — this will access the last price and volume to create a set of bar data
    2. Choose and configure the calculations you want — in our example we have added moving averages
    3. Choose and configure the pattern matchers — in our example we are looking for crosses


    You can add strategies to the computation; these will then automate your trading. When you run the strategy, by subscribing to the data, a chart is generated and triggers are fired according to your settings — see below.


  2. Multiple vendor

    A major advantage is that in most cases the trader can choose the firm or vendor they wish to trade through. Since KaiTrade does the heavy lifting, the vendor does not need to provide charts or historic data.


    Unlike other solutions, KaiTrade already provides cross-asset support — you can trade futures, stocks and FX from a single platform.