Real-Time Options Quote Feed Search
Project Details
Options Trading requires high-throughput processing with low or no latency. Market Data Feeds such as Spryware, Hyperfeed, Red Sky Financial, and Activ Financial send quote streams to their subscribers with pricing and volume information aggregated from multiple exchanges. These feeds were at the rate of 1.2 billion quotes per day, with the opening of the market seeing rates approaching 200,000 messages per second.
In order to evaluate the worth of each option, the option price, the underlying stock price are combined with the interest rate and historical volatility into a model to calculate indicative parameters, such as delta, spread, and implied volatility. One challenge presented by this task is the calculation cost of the model is significant.
Components
The software constructed by CIEX has the following components:
- A Quote Reader that accepts quote data from a network socket and writes to shared memory.
- A Quote Vector process that reads quote data from shared memory into quote vector and runs the model on each quote.
- A Selector that examines results produced by the model trader-specified criteria.
- A desktop client that presents results from the selector and sets new selector criteria as required by the trader.
Challenges
The high data rate and non-trivial computation load present challenges.
Shared memory segments under Linux separate the quote receiving process from the quote calculation/reading process. This enables easy addition of a second quote reader in a multi-CPU server to read from the shared segment.
Communication
Communication between client and server is nicely facilitated with Ice, the Internet Communications Engine.
This is easier to use than CORBA, and results in excellent performance between clients and servers in multiple languages on multiple systems:
- C++
- Java
- C#
- VisualBasic
- Python
- PHP
- Ruby
Server
The server is written in C++ for speed. Some components of the server are compiled without exceptions for additional speed edge.
Client
Two clients exist, one in C++ and one in Python. Both display grids of results. The Python client is more flexible and can define sets of parameters more flexibly.
Documentation
There are 300 pages of detailed program documentation. Each function and class is described, and class collaboration diagrams are provided.