QWFIX C++ HFT CME, HFT Trading, Research and Management

QWFIX HFT CME is an entire suite of high frequency trading platform, fully certified, running in production for CME trading. The main features include:

  • QWFIX C++: Pure C++ algorithm execution engine
    • Sub 5 microsecond tick-to-trade latency
    • Simple, flexible order management (OMS) API
    • Strategy engine API; implement and QA a new algorithm within 2 days
  • GUI based configuration, real-time monitoring and research tools
  • Research tools
    • Realistic C++ based online simulator (test and QA your production code with real-time market data)
    • Realistic .Net based offline simulator API (test your algorithm with historical market data)
    • Post-trade analyzer API (analyze your historical trade log)
    • GUI based historical tick-by-tick market data analyzer


The design and implementation of QWFIX focuses on simplicity without sacrificing performance.


QWFIX uses the following techniques to achieve sub 5 microsecond tick-to-trade performance.

  • Lock free threading model: All performance critical code uses spin locks only
  • Customized memory management: All performance critical code uses customized and lock-free memory management with preallocated memory pool
  • Advanced Architecture: Threading model, I/O model and memory management are designed to collaborate to achieve best overall performance
  • OS/Hardware optimization: Designed to work with Linux RT Kernel and Solarflare network card with OpenOnLoad driver

Programmer Friendly API

QWFIX C++ API is extremely simple and easy to use. It usually takes one day to implement a new algorithm, test and QA it in the next day, and put it in production in the third day.

Order Management API

One order manager is created for each instrument on each trading day. API is provided to send, cancel and modify orders. Static information, such as Symbol and SecurityDesc, is only initialized once when the order manager is created, in order to improve performance.

Strategy API

Multiple strategies can run simultaneously. Each strategy is identified by a unique number (integer, I usually use a date number such as 20110101).

Implementing a new strategy is extremely easy. Programmer only need to subclass a Strategy object and implement their own event handlers.

High Performance Logging

Logging is fast and easy. It takes two lines of code to add an entry to system log. It takes about 200 nanosecond and will be written to disk asynchronously. The logged entry can be viewed with GUI real-time management tool; or retrieved with post trade analysis API.

Configuration & Management GUI

Enterprise Manager

Enterprise Manager is used to configure the QWFIX system. It features the following:

  • Customizing FIX schema (dictionary). CME may occasionally change the requirement for FIX message by adding or modifying required tags in message
  • Customizing FIX sessions. Specify the initiator and acceptor CompID, IP addresses, scheduler and other parameters
  • Customizing FIX engine.


QWTradeMonitor is used to manage automated trading process in real-time.

QWTradeMonitor can also be used as a debugging tool during algorithm implementation.

Real-time Log Alerts

The real-time logs/alerts generated by remote process can be monitored with the GUI tool. Note the same logs can also be retrieved through post-trade API programmatically.

FIX Message Viewer

Each FIX message communication can be viewed with full details, including 3 timestamps. Please not how fast it is from before message creation (timstamp1) to the send() call returns (timestamp3) for the logon message. Note it takes a little longer to process Logon message. For order related messages it only takes about 2-3 microseconds.

Real-time Remote Market Data

Market data can be displayed along with brief order information (total orders and total quantities) at each price level.

Real-time Orders, Execution, Position and P&L

Every order, every execution and every field in the FIX message can be monitored in real-time, along with real-time position and P&L.

Real-time Control

Remote trading strategies can be fully controlled by QWTradeMonitor.

Researching Tools

C++ Online Simulator

QWFIX C++ online simulator can be used to realistically test and QA production automated trading system.

.Net Offline Simulator

.Net offline simulator can be used to realistically research trading strategies.

.Net Post Trade Analysis API

.Net post trade API can be used to do post trade analysis. It takes about 10 lines of code to retrieve every detail of the entire order flow. Orders can be grouped by different strategy. Each order or execution can be matched against the exact market data at the moment when it was processed.

Every status change can be further analyzed visually with the GUI based research tool QWTradeAnalyzer.

GUI Based QWTradeAnalyzer

QWTradeAnalyzer can be used to analyze tick-by-tick historical market data.

  • Multiple instruments can be synchronized by timestamps to explore spread/cross-asset-class trading opportunity
  • Orders and executions can be synchronized with tick data for trading strategy research or post-trade analysis.


About weiqj

High Frequency Trader; Hardcore Programmer; CME Individual Member
This entry was posted in High Frequency Trading. Bookmark the permalink.

3 Responses to QWFIX C++ HFT CME, HFT Trading, Research and Management

  1. Dave says:

    Nice system features. Would you elaborate on how you are measuring the sub-5 us tick-to-trade latency and what is included? For example, is it measured solely in the software from after socket read to before socket write (i.e., no round-trip OpenOnload/SolarFlare latency), what type and speed of processor were used, does it include decoding FIX/FAST and maintaining an order book to some depth for one instrument, is the strategy logic minimal (only sending a FIX order message in reaction to a price just received), is any logging occurring, etc.?

    • weiqj says:

      Dave, You are right about the latency. It is measured solely in the software from after socket read to before socket write. It’s measured on my dual 3.33GHz Xeon. It does include the FIX/FAST decoding and full-depth order book construction (about 1us).
      The operations are performed in more than 1 thread. It doesn’t improve latency but will improve throughput (like pipeline in processor execution units).
      The system not only log every raw FIX message, but also log every order operation. Order log contains some additional information, such as strategy (more than 1 strategy can run simultaneously) and market data MsgSeqNum at the exact time, for later post-trade analysis.
      Logging is done asynchronously, of course.

  2. Sameer says:

    Hi weiqj,
    I first came across QWFix from algotradinggroup.com I must say it made an impression on me. Ever since, I was trying to log on to qwtradingsystem.com, but it is down 😦

    I have worked on couple of OMS ( flextrade, omnesys, activequant, marketcetra etc) but none of them come even close to this one in terms of latency.

    Since Algo trading is getting hotter in India with so many global hedge funds coming into play, I think you should test it with Indian exchanges as well. The current vendors offer solutions in 100s of microsecs ( close to ms actually ), and I think a performance comparison of QWFix against the top players for the most common strategy ( pair trading probably) could give QWFix the recognizability it truly deserves.

    Connecting to the Indian exchanges could be a challenge though, since they deviate from the usual FIX protocol ( I had quite a few sleepless nights making my adapter work for them. )

    Also, is the GUI written in java ( the screenshot reminded me of the jframes look 🙂 ?


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s