Realtime Application

RealTime Calculations for American Options

This particular project uses the Binomial Tree algorithm to calculate Implied Volatilities and Option Greeks. It is an excellent testbed for the realtime characteristics of Zircon software technology since the average time of each distinct calculation (the granularity at which the program was parallelized) is very short: just 1-2 milliseconds. To be effective in such applications, Zircon software must be able to reach message round-trip times in the sub-millisecond range.

The test demonstrates that Zircon software executes this task with ease, reaching a rate of more than 4,000 model calculations per second.

The setup for this project is as realistic as possible

The input data to the model is a historical 1-min time series of option prices for DIA (DIAMONDS Trust, Series I tracking the DJ30 index).

The bar consists of BID/ASK/MID prices taken for all available put and call options with times to maturity up to 180 days and with moneyness (Strike/Stock Price) in the range [80,120].

For each option in the series there is a matching (in terms of quote time) spot rate of an underlying, risk-free rate (the interpolated LIBOR rate) and a continuous dividend yield.

Actual input is stored in CSV files. There about 150,000 minute bars a day (approximately 400 options * 390 min), and these are continuously supplied into the calculation cycle.

The calculations are typical for trading and risk management applications

As DIA options are of the American type, we use a 100-step binomial tree to infer the following option characteristics (all those calculations are considered to be within one Model):

1. Implied volatility for bid/ask and mid prices, accordingly

2. Discrete up/down/two-sided delta for one IV change in the underlying price

3. Discrete vega and variance vega for a 10% change in implied volatility and variance

4. Discrete gamma using the up/down deltas calculated earlier

We do not reuse the trees for options with the same maturity as each option normally has a different implied volatility. Hence, each model instance constructs and calculates the 100-step binomial tree numerous times (the exact number is not fixed and depends largely on the initial guess for the implied volatility).

Performance and results

Running this procedure on one processor may be satisfying for research purposes when one does not need realtime information for making trading or risk management decisions. We ran a zEnabled version of the program on a Linux machine with 2 quad-core CPUs and one PC. For this setup, the optimal number of zEngines is eight, matching the number of CPU cores engaged. (Generally, when the number of zEngines matches the number of available parallel processing units, we may expect that there will be true parallelism among the tasks; on the other hand, including more zEngines than that would not be expected to improve the overall performance because multiple zEngines would need to have their requests multiplexed serially onto a single processing unit.)

The dependence of system throughput on the number of zEngines used in these calculations (and hence the number of physical processor cores) can be summarized as follows:

1. Zircon software dramatically improves the performance of applications with ultra-short individual model calculation times, down to the millisecond range (an area where conventional approaches, especially ones using XML-based protocols, perform poorly).

2. The performance gains are almost linear in the number of truly parallel processing units (CPU cores) available. This result is particularly significant for cases with short model calculation times because, in such cases, the communications overhead increases in significance relative to the actual total calculation time.

The results are straightforward. The table below contrasts the performance of several Zircon software environments with increasing numbers of processing units (each with an associated zEngine). Noteworthy is the fact that even with a relatively modest infrastructure involving a single Linux machine with 8 CPU cores, a model calculation time of less than 0.25 ms is attained, which should be more than satisfactory for most high-frequency realtime financial applications. Also, this limited test demonstrates the effectiveness of Zircon software's underlying load-balancing and communications protocols, since, with 8 CPU cores, the overall computation is accelerated more than seven-fold. From the user's perspective, such performance gains justify both the adoption of Zircon software technology and the incremental expansion of their computing infrastructure. The Zircon software platform enables clients to derive tangible added value from resource acquisitions.

zEngines

Models per sec

Time per model, msec

Throughput relative to non-parallel case

1

611.6

1.63

1.00

2

1217.2

0.82

1.99

3

1826.0

0.54 

2.99

4

2382.3

0.42

3.90

5

2876.2

0.34

4.70

6

3387.3

0.29

5.54

7

3907.3

0.25 

6.39

8

4341.1

0.23 

7.10

The following plot shows that the speed growth is nearly linear in the number of zEngines present, which is due to Zircon software's efficiency in coordinating and loading newly added processors.

Graph