Limit Order Book (LOB)Futures contracts were traditionally traded in the open outcry pit, however, over the past decade there has been a major shift to trading on the electronic platform. Trades in the electronic platform are conducted through a computerized system where all traders submit their orders with the number of contracts they want to trade and their intended prices. Traders can buy or sell contracts at existing market prices. This is also known as a market order. If, however, a trader’s bid price is lower than the lowest ask price for the contract (i.e., the best ask), the order will remain active in the exchange electronic system on the bid side until it is matched or cancelled (or expired if it is a futures contract). Similarly, if a trader’s ask price is higher than the highest bid price (i.e., the best bid), it remains active on the ask side until it is matched or cancelled (or expired). The orders resting in the system are called limit orders and the system storing these orders is the LOB. At any point in time, the LOB contains all the resting orders on the bid and ask sides at different price steps. In the LOB, the best bid and best ask are the highest bid and the lowest ask prices, respectively, at that point in time which are referred to as “top of the book.” The difference between the lowest ask and the highest bid is called “the spread” or bid-ask spread (BAS). The other bids and asks are resting in descending and ascending order beyond the best bid and best ask, respectively, in the LOB. Read More.
|
LOBLabTraders using electronic platforms have access to the bid and ask steps in real time and use the LOB information extensively as a part of their trading strategies. Thus, research on electronic markets seems to require datasets that cover information beyond the trade data. However, market messages can arrive as close to each other as a nanosecond and it is a challenge to reconstruct such a molecularly dynamic dataset. LOBLab enables researchers to reconstruct the LOB using market messages such as the ones in the background of this website! It is currently compatible with the CME MDP 3.0 FIX data and it does not work with older data formats i.e. FIX and RLC. CME MDP 3.0 documentation and FIXimate may help you understand the data better. LOBLab output file is in CSV format and contains variables such as Date, Time, Bids and their associated Quantity, Asks and their associated Quantity, Trade Price, Trade Volume, Number of Orders, and Aggressor. Each market message is processed to reconstruct the LOB. LOBLab also has the ability to generate customizable regular snapshots from your data. It is also designed to work on parallel processors to increase efficiency. To access multiprocessing computers, you can consult with organizations such as WestGrid and Compute Canada/Calcul Canada. In addition, LOBLab reconstructs an outright LOB, an implied LOB, and a consolidated LOB that is created by merging the outright and implied LOBs. For details on how LOBLab processes market messages and reconstructs the LOB, read pages 14-18 or pages 136-142.
|
How to use LOBLabLOBLab has two major components: an executable file that processes market messages and reconstructs the LOB, and an input file that is customized by users and controls the executable file. After downloading LOBLab and unzipping the files, place both input and executable files in the same folder as your CME MDP 3.0 FIX files. The CSV output files will be also created in the same folder. There is also a HELP file inside the LOBLab package that explains how to customize the input file. In addition, you will find a RUN file in the package that is designed for parallel computation. You can find samples of the CME MDP 3.0 FIX market depth data here. Download a sample file and try reconstructing the LOB in a few simple steps. Unzip the sample file in the same folder as LOBLab files; make sure that the name of the sample FIX file has the same format as the name in the input file. Replace the name in the input file by the name of your sample file. The sample file is for one day only so the number of days after the initial day in the input file is zero and you will be using one processor on, say, your laptop. Select 0 if you need all LOB updates or change it to any number (in second with decimal for millisecond) for regular snapshots. Select how many bid and ask steps you require. CME disseminates a five-step LOB for some markets and a ten-step LOB for others. Indicate the futures contracts for which you need the LOB. Description of the contracts name codes are available on CME website. For example, CME months codes can be found here. Finally, save and close the input file and run the executable file. LOBLab creates three CSV files (four if you select Print raw data) for each contract indicated in the input file: the outright LOB, the implied LOB, and the consolidated LOB. The current input setting is for the sample file soybeans futures 3/15/16. It is set to generate snapshots with 7.5 second intervals for two futures contracts of May (K) and July (N). Note that CME files time stamp is in GMT while trading days are in CT. Moreover, LOBLab starts the CSV files with empty books and fill the rows as it reads the market messages with new information. Here is the LOBLab output for this sample:
|