Market Data Basics¶
Market data can be loosely defined as all the information disseminated electronically by a financial institution: broker, exchange or counterparty.
In industry parlance, market data can be divided into two major groups with regards to its nature:
Tick Data is primarily the information about orders in the matching engine of an exchange or broker. It comprises the most volume of data disseminated by an exchange and in the majority of cases is current for a very tiny moment in time due to being updated frequently.
Reference Data also called metadata by some, is all the information about the underlying financial instrument to which tick data refers to. In that sense, reference data complements tick data with the necessary economical meaning. Reference data tends to be mostly static or infrequently updated, most often daily. Examples are symbol, product codes, nature, primary exchange, trading hours, dividends, closing prices, stock splits.
Market data can also be classified with respect to its contemporaneity.
Data collected in the past and stored for analysis is called historical market data.
Data that has just been streamed and is deemed the last, current state of the exchange matching engine is called realtime market data.
In that sense, you can have historical tick data, realtime tick data, historical reference data and realtime reference data.
The purpose of tick data is to present the client with sufficient information to reconstruct the state of the exchange’s matching engine.
Exchanges build up a set of securities to be traded and store this information in a database which can be queried through several methods, typically through an FTP download but also disseminated in realtime through its market data gateway directly to listening clients.
Upon market open, exchanges receive orders from clients and forward them to the matching engine. If no trade happens immediately, the order is recorded and an update is forwarded to the market data gateway which formats a message to be sent to all market participants with information about the newly added liquidity.
Notice that only incremental updates about the new differences are sent. Thus it is essential that on the trading firm/client’s side there is software that is able to reconstruct the complete state of the matching engine inside the exchange from these tidbits of information.
There are typically services provided by the exchange that disseminate the entire state of the matching engine but that is extremely slow to be used continuously.
That’s where LightQR shines, keeping a perfect reproduction of the exchange’s matching engine on the client’s side. Our software updates the mirror image in few nanoseconds even for a large number (hundreds of thousands) of symbols maintained, which translates in lower IT costs and superior trading performance.
Tick data can be disseminated in several forms:
Level 1. Data has the best market prices for buy and sale, sometimes accompanied by the respective quantity of contracts (or shares) and very infrequently by the number of shares. The volume of data tends to be very low.
Level 2. It is a summary of all orders in for every price: the price level. Price levels contain price, quantity and sometimes number of orders. Some exchanges (notoriously CME) limits the number of levels to a predefined number to avoid excessive network traffic.
Level 3. In this mode the individual orders at every price level are disseminated. This is the most volumous amount of data.
Historical Tick Data¶
Our suite parses and transforms raw market data as provided by the exchange or captured by common appliances in pcap or ERF formats.
When provided with appropriate hardware, LightQR Capture will activate and record data with pico-second resolution timestamps.
LightQR Synchronize will then filter, pair, realign, reformat and adjust latency the data for archival.
From that point, the data can then be post-processed and pushed to various formats and databases.
For strategy backtesting LucisQR can also read from raw files and drive your backtesting simulation exactly as if* it was in the colo.
Datasets can contain multiple days from multiple exchanges allowing for evaluation of cross-exchange arbitrage strategies.
Latency (constant or stochastic) can be artifically added during replay to study different placements of the trading application across different datacenters.
Data replay can happen in several modes:
Backtest mode. Data is pushed into the client application as fast as it is read from the source, regardless of timestamps. This is optimal for PNL research.
Replay mode. Data is pushed at the speed it was captured from the exchange. This allows for proper evaluation of internal latencies in your application.
Stress mode. Speed is multiplied by a configurable factor which allows the evaluation of extreme, doomsday scenarios (eg 5 times top volume).
Realtime Tick Data¶
Realtime data is the most current data as published by the exchange. As the number of updates tends to be very large, realtime data requires the latest hardware and competent software to cope with its enormous volumes.
Most commercial packages have at least one of these shortcomings:
Provide only an API to translate exchange messages and nothing else. The problem here is that the user is left with the task of writing everything else: building your application, publishing internally, filtering, conflating.
Provide only an appliance and an API to read market data, limiting the number of options to use the data - in process for example.
Are too expensive.
Limited coverage and high turnaround.
Our realtime data delivers tick data to the user’s application on four tiers:
Tier 0. In process. The user links against our API and uses LightQR as if it was their own code. User might choose between running LightQR in serial or running it independently, in a separate thread.
Tier 1. Same machine. LightQR runs as a separate process in the box, using fast Inter Process Communication mechanisms (shared memory) to deliver data.
Tier 2. Same network. LightQR runs as a separate process, publishing data through TCP or UDP.
Tier 3. Cross datacenters. Similar to the previous option but the data is conflated and funnelled prior to distribution.
Our motto is: good market data is delivered market data. Our pledge is that we will deliver market data where your application is, in the format you need.