GUEST BLOG: Greg Frank of Presagium Discusses Trading System Performance Improvements With...

Status
Not open for further replies.
T

the progress guys

Guest


This week the Cap Markets blog is featuring a guest blog from an Apama customer, Presagium LLC. Presagium is a quantitative fund and a commodity trading advisor that strives to capitalize on momentum and reversion in the market. In the post, founding partner Greg Frank shares some details on his company’s use of Progress Apama:

By Greg Frank of Presagium LLC

I was recently asked about our use of the Progress Apama CEP engine, Apama’s library of rapid application development services – the Capital Markets Foundation (CMF) – and Matlab. The question was, in a nutshell, why was that combination compelling and what did we think of the latest version of Apama that offers higher performance from the incorporation of the LLVM compiler engine?

To set the scene, Presagium is a New York based fund for whom computational performance is critical, but we are not an HFT shop. Our strategies rely on execution of complex quantitative analysis for portfolio rebalancing and not pure speed alone. We have been using Apama and its out-of-the-box integration with Matlab for some time now to develop and deploy in-house strategies.

We have always found the CMF a useful library of services to accelerate the development and deployment of new strategies. However, we see the latest version of Apama and the CMF as going further and 1) helping overcome a fundamental threading challenge with Matlab and 2) offering options to increase performance by migrating some code directly to Apama, thereby reducing calls to external components.

Matlab, a well-known and heavily used tool amongst quants in the financial industry, is often used for prototyping algorithms relying on complex calculations. By combining Apama’s strategy development environment and ability to execute through ready-made integration with Matlab, we can use Matlab directly in production without having to migrate those functions into another technology – a significant advantage in reducing the lead-time for new or updated algos.

However, Matlab on its own only provides synchronous calls to its library, meaning the application thread in the calling process (Apama in this case) is blocked until the Matlab function is complete. This may have resulted in market data handling within Apama falling behind as Matlab completes its calculations and market slippage may occur on final trade execution. The latest release of the CMF gets around this by allowing asynchronous Matlab calls from multiple Apama application threads so as not to block the calling application. Our Apama application can keep processing market data and other activities while Matlab is working and we avoid analyzing or trading on potentially stale quotes. This feature has resulted in one of the biggest performance improvements of our system to date.

The other thing we are excited about, also related to performance, is Apama’s recent release incorporating the LLVM compiler engine. Apama’s Event Processing Language (EPL) now compiles and runs as native machine code optimized for the exact hardware it executes on. Progress tells us that as a result, EPL code is likely to execute at the same or faster speeds than equivalent C++ or Java implementations and significantly faster than a call to an external component. Since the majority of our real-time application code is in Apama and we are now confident that it can churn complex calculations on par with analytics libraries, we are now considering migrating some of these custom functions into EPL. This migration not only offers a performance boost but also eases maintenance through standardizing on a common technology platform.

It’s still early days for Presagium’s use of this new release but we’re starting to get our hands dirty and so far it seems that Apama 5.0.1 does live up to the hype.

Continue reading...
 
Status
Not open for further replies.
Top