Showing posts with label taq data. Show all posts
Showing posts with label taq data. Show all posts

Wednesday, January 25, 2012

Recording TAQ Data via Interactive Broker's API & Teaser of Ericsson Arbitrage Study

On October 28, reader "RKB" asked how I have been able to pull my data into Excel.  First, I would like to apologize to RKB for taking forever to answer his question. 

I have a program developed by a friend of mine, written in Java, that allows me to record time and sales for individual and groups of securities.  The program then dumps this data into a CSV file that I open with Excel.  All the manipulations in Excel I handle after the the price data has been cleaned and formatted into my formulas.

Hi-Res here
The software we developed is on the left with an IB Trader Workstation window open on the right showing some of the currencies available through IB's IDEAL PRO.  As you can see I have several open connections to a variety of currencies and several NYMEX natural gas futures contracts.

The program records bid, ask, bid size, ask size, last trade, last size, high, low, and close for equities, options, futures, future options, currencies, and combinations.  I cannot emphasize enough the importance of synchronized group recordings.  The weakness of using minute or even second by second quotes for arbitrage strudies is the nature of high-frequency arbitrage trading today makes these quotes obsolete.  You can record 2 seconds worth of data that consists of 100+ quote changes.

The last trade is never what's important.  The most important aspects of multiple-leg structures is the live bid, ask, and depth of market.  Liquidity risk has killed too many titans.

Here is the raw data for a study on triangular arbitrage. For those interested, this software is for sale.

Hi-Res here
It should be noted that IB is not the perfect platform to operate in today's market.  They are limited to pricing updates at a rate of 100ms when many of today's trades occur in the 10-20ms range.  This obstacle has limited my ability to study certain HFT strategies at higher granularities than I can record.

And a teaser for an upcoming post on ADR arbitrage across Ericsson shares...


 

Wednesday, June 29, 2011

Index Arbitrage for the Do It Yourselfer

This is the process used to construct a pseudo-Index Arbitrage (similar to Delta One) model of the SPDR Dow Jones Industrial ETF versus one of the front month ECBOT-listed E-Mini Dow Jones Industrial futures contracts.  Our software is proprietary and was developed from scratch (not by me).  We are currently using IB's TWS as our medium to the markets.  It is my chemistry set.

Constructing the Spread.

Step 1: Define your bases.  Name your series.  In this case we name the file "DIA_YM".  The "t13,t14" corresponds to two of the variables on the left with open connections.  t01 through t12 are other securities currently being referenced by the software.


Step 2: Input your "proprietary" algorithm(s) of choice. As shown, currently blurred in boxes e01 through e06 (sorry, can't give it all away).


Step 3: Hit the LiveTrack(c)!


Step 4: Wait a few minutes and take a sample of the data.  This is very high-frequency, synchronized trade-and-quote data for the DIA/YM pair.  Synchronized (discussed here) meaning when any predefined variable (bid, bid size, etc.) changes, a snapshot of the entire set is taken, time-stamped down to the millisecond, and logged.


Step 5: Finally, check the result.  159 variable changes during 2 minutes and 13 seconds of sleepy after market trading.



We're no Tradeworx, but it's a start.

Further Reading: