To maintain a competitive edge, hedge funds must be able to review their investment strategies in real time during the trading day. For example, a fund that employs the strategy called pairs trading may have thousands of long and short positions in equities that are viewed to be under and over-priced and therefore of interest for investment. The market constantly re-prices these equities throughout the trading day, resulting in a rapidly changing profit and loss profile. The challenge in this environment is to isolate critical changes from the massive volume of fluctuations occurring every fraction of a second.

One such fund in New York employs more than a thousand different equity investment strategies that are constructed using the pairs trading model. The company's managers make use of their domain knowledge in dozens of different industries to create clusters of stocks that they view together as a strategic group. These strategies typically consist of a set of target equity investments, both long and short positions, and associated business rules regarding parameters such as total amount invested, target allocation among investments, and acceptable value ranges. This company has traders who manage the strategies and identify trades, with each trader monitoring and managing many strategies during the trading day.

Although the company uses an in-memory data grid (IMDG) to manage its equity positions and enable fast updates as trades occur, this company's IMDG does not have the ability to perform real-time analytics. Instead, the company has to flush data to a relational database to analyze its positions and determine whether a given strategy is "in range" according to its business rules. Timeliness of the analysis is of prime importance because when a strategy goes out of range, a fast response can have a huge impact on profits. Using the relational database, the company obtains response times of about fifteen minutes. Since investment markets can experience significant fluctuations in fifteen minutes, traders often need to eyeball market fluctuations. Unfortunately, this has proven to be difficult to scale across a large set of strategies. To solve this problem, the company needs the ability to analyze its equity positions in a scalable IMDG at market-speed, instantly alerting traders when a strategy goes out of range so that timely trades can be placed to re-optimize the strategy.

ScaleOut Analytics Server™ (SOAS) provides the real-time analytics required to deliver timely results for the company's traders. ScaleOut Software developed a sample Strategy Alerts application (which can be downloaded above) as a proof of concept that demonstrates this functionality. The application holds the equity positions and parameters of the company's hedging strategies within SOAS's scalable IMDG. Using the product's scalable, real-time analytics, it updates all equity positions every second from a stream of simulated market data and evaluates the rules for each strategy to determine if an action is needed. It combines the results into a stream of alerts delivered to the traders using a graphical display. The following figure shows the components and data flow of the application:

SOAS reliably stores the hedging strategies within the IMDG as a large collection of objects distributed across a scalable farm of servers; each object contains details of a strategy's core exposure and its long and short positions. The application's ability to perform parallel computation using a SOAS feature called Parallel Method Invocation (PMI) is the key to achieving scalable performance and real-time results. PMI provides an easy to use, highly-optimized computational model that automatically pushes computational logic to every server in the grid for parallel execution. It eliminates the need for applications to explicitly code parallel computations and move data between servers at runtime.

A PMI executes every second to distribute a snapshot of the latest market prices to all strategy objects, update each strategy's prices, and evaluate each strategy for an alert condition. Using a highly efficient distributed algorithm, the PMI collects the set of strategies currently alerted and returns them for reporting. By using PMI's parallel computation model, the application's throughput can be increased dynamically to handle a growing workload just by adding servers to the IMDG. These servers automatically take on an incremental portion of the overall load, thereby ensuring that execution time does not increase as the workload grows.

The application includes a very simple user interface to demonstrate the proof of concept. (A production application would include many more features and could be tied to a trading system to trigger automatic trades.) The user interface allows the user to examine the strategies and to identify which strategies are currently alerted. It also reports the total number of strategies and the overall throughput of the application, as measured by the total number of positions evaluated per second across all strategies. The figure below shows a snapshot of the user interface with two strategies highlighted to identify alerts due to out of range conditions. It also shows the details of a selected strategy and the specific equity that triggered the alert within the strategy.

By using ScaleOut Analytics Server instead of their relational database, this proof of concept application demonstrates that strategy analyses can be performed once per second instead of requiring the current fifteen minutes. All analytics are run on data held in the IMDG in memory without the need to move data to a separate analytics platform. Automatic alerting in real time relieves traders of the burden to continuously monitor the status of their strategies, enabling them to operate the fund much closer to market-speed, optimize its performance, and maximize profits.

We invite you to download the sample application and try it out on either a Windows or Linux workstation. The download includes the binaries needed to run the application, together with a detailed description of its design and instructions. Note that ScaleOut Analytics Server runs on both Linux and Windows.

To run the application you also will need to download an evaluation copy of ScaleOut Analytics Server, which will enable you to host an IMDG on a single computer. To test larger workloads and scalability across multiple servers, please feel free to contact us at info@scaleoutsoftware.com to obtain a multiple server license key for evaluation purposes.