Channels ▼


WPF and the Need to Visualize CEP/ESP Data

Matt is director of technology for Lab49 (, a company that builds advanced technology applications for the financial services industry. You can read his blog at

Algorithmic trading leverages real-time market feeds, sophisticated analytics, and direct links to electronic networks to capitalize on even the smallest inefficiencies in the market.

The requirement for near-instant analysis and response to continuous streams of market data has encouraged several software vendors—StreamBase, Apama, Truviso, and Coral8, to name a few—to develop products that support techniques such as complex event processing (CEP) and event stream processing (ESP). These products apply business rules, generate events, and execute code in real time as new messages arrive, and can process hundreds of thousands of messages per second.

While these products have become invaluable in the execution of algorithm trading systems and monitoring of execution strategies, extracting information from the large complex datasets that are generated by these trading styles and identifying underlying market movements is critical to gaining a competitive advantage. Current vendor software offerings typically provide dashboards that prove to be too simplistic to satisfy real-world demands. Further, the ability of banks to extend the vendor-offered dashboards and integrate with their existing trade visualization infrastructure has been inhibited by the use of technologies (Adobe Flex, for example) that are not a part of the typical GUI developer's toolkit.

When it comes to building GUIs, Java and .NET dominate investment banks. The broad deployment of Windows to the trader's desktop has resulted in the Windows look-and-feel being considered by many as a standard part of the user experience. This drives developers towards the use of Visual Studio 2005, .NET 2.0, and WinForms as the core development platform for the creation of smart client GUIs. WinForms has proven itself as a platform for developing today's desktop applications. However, for developing next-generation visualization applications, we need to look towards .NET 3.x and Windows Presentation Foundation (WPF) technology.

WPF is the .NET technology for building GUIs. It offers declarative programming (XAML), rich composition and customization, and easy deployment. The framework uses Click-Once functionality already available in the .NET 2.0 stack. Depending on the hardware available, there's also the added bonus of hardware acceleration. In short, WPF combines the best of DirectX, WinForms, Adobe Flash, and HTML in a single environment and both the GUI designer and GUI developer can share a common set of XAML files.

Adopting WPF now also has strategic advantages. WinForms as a technology is unlikely to see any further significant development post .NET 2.0, so investing in this technology to underpin the next-generation of smart-client GUIs would be a soon-to-be legacy investment.

Why use WPF for CEP/ESP visualization? Traders today have essentially outgrown the data grid. The frequency of data updates, the size of trading portfolios, and the many analytical results that traders and/or portfolio managers need to keep track of means that the data grid is just not expressive enough. An algorithmic trading solution could offer them a view of their trading volume using a grid. However, identifying the latest updates on a grid usually involves flashing the background color of a cell to help provide a visual clue to traders—not exactly the most elegant solution, given today's 256-MB+ video cards that most PCs carry. Enter WPF.

An improvement over earlier Windows programming environments is WPF's retained graphics system. It cuts down on the number of redraws a UI element should incur—obviously an advantage given the possible high throughput a CEP/ESP UI may want to visualize.

What benefits does WPF offer over WinForms? Apart from the advantage of WPF (XAML) being a declarative programming language, WPF reduces the need to create new controls due to the usage of Styles. A style enables the creation of a reusable representation of a desired control appearance and behavior. WinForm controls each have a particular shape and border. It offers the concept of controls that attach to a shape defined in an external template. Dependency properties are another feature that, once used, you wonder how you ever coded without them. Triggers, events, and data binding within WPF all help to take UI engineering to another level.

If you are building new UIs today, have a serious look at WPF. The WPF argument is further strengthened with the release of Visual Studio 2008. You need only to look at the gaming industry to recognize how powerful this platform can be for graphical applications—a potential we should leverage in financial markets.

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.