![]() |
|
| Trading Decision Support Systems | ||||||||
|
Trading systems are very important to broker/dealers, to hedge funds and to a great many other Financial Services companies. The SQLstream RAMMS solution offers a powerful framework, methodology, and mechanism for developing and deploying decision support systems (DSS) for trading. SQLstream's solution uses the natural expression of relational queries over streams of incoming messages comprising market data. ExamplesHere are some SQLstream examples that demonstrate the power of windowed aggregation applied to Trading Decision Support Systems. Moving AverageOne of the classical operations performed on stock market trade data is calculating moving averages. Here is a SQLstream statement to calculate the moving average for a stock over a rolling ten minute window:
The keyword STREAM is added to the statement to indicate that a stream of results is required rather than a TABLE of results. Streams can be viewed as infinite tables to which messages are continually added. Selecting the STREAM yields the streams of changes (additions) made to the table. Two Moving AveragesNow we extend this definition to two separate moving averages. We shall add one for the thirty minute moving average, and then compute them at the same time continuously.
Moving Average Cross-Over PointsIn SQLstream, it is straightforward to capture the stream of moving average cross-over points, widely believed to signify important transitions in stock prices. We first create a window (twoRows) comprising the last two messages, current and preceding. We then compare the preceding message's moving average with the current message's moving average, using the .FIRST operator. A cross-over has occurred when the sign of the difference between the two moving averages has flipped. That condition reflects the change where one moving average was previously larger than the other but, using the current message's moving average, that previously larger value is now the smaller.
SQLstream PowerSQL provides a powerful declarative paradigm for market data processing. The provided examples help demonstrate the power and expressiveness of SQLstream's SQL:2003-based SQL when applied to streams of trading data flowing continuously in time. Once queries are written within SQLstream, they are easy to reuse as views, which can then be cascaded into other Views to feed other executing queries. Beyond the SQL-based logic, however, applications sometimes require specific procedural logic or particular algorithms, which SQLstream readily accommodates through user-definable functions and stream transforms written in Java. These adapters and plug-ins are written using SQLstreams Software Development Kit (SDK). SQLstream's RAMMS will dynamically load and link in any such plug-ins as they are referenced and required within SQL statements, providing seamless integration. These various capabilities enable SQLstream to operate as a great integration platform for managing all of the queries and views that are the key building blocks of trading decision support systems. SQLstream provides an easy way for you to manage your dynamic data assets, queries, and views. |
||||||||