[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

TechTools stock data (for Cooper trading sys)



PureBytes Links

Trading Reference Links

I've been asked how easy/hard/ugly it was to write
C code to interface with the Technical Tools database.

  (Technical Tools is a data provider in Deerfield Beach,
   Florida, USA.  Their homepage is  http://www.techtool.com  )

I found it relatively easy, to tell you the truth.
TechTools provides all kinds of support for this;
go to their web page and click "Developers Area"
and you can download their SDK and their API.

I decided to partition my software into a "front end"
and an "analysis engine".  Only the front end touches
the TechTools data files.  I just did a linecount on
the front end and found it was 412 lines of declarations
and source code.  I estimate that 80% of this is
stuff I copied verbatim out of the SDK, and the other
20% is customization stuff I put in myself.  I think
I probably spent a total of 3 solid hours reading the
SDK docs and studying the code they supplied, 2 more
hours copying the relevant parts out of the SDK (while
deleting the rest), 2 hours adding my personalizations,
and 2 hours debugging.

TechTools had a great idea: take advantage of
the HIERARCHICAL FILE SYSTEM of MS-DOS (now called
Windows) to organize the data.  So, for example,
the price data for the common stock of International
Business Machines Corporation, is stored in this file:
   C:\TECHTOOL\STOCKS\I\IBM.TTD

(the suffix ".TTD" is Tech Tools Database format -- it
is an extremely efficient way to compress price data).

Similarly, the price data for the September 1986 contract
of the S&P 500 futures is stored in this file:
   C:\TECHTOOL\FUTURES\SP\SP___86U.TTD

You don't have to look in a "Qmaster" file or a "cdb.adm"
file to discover that "F014.DTA" is really "British Pounds"
(as you do with brand XX's datamanager); instead, in Tech Tools,
it's simply encoded in the file's pathname.  I like it.
But then I'm a C programmer so of course I would like it :-).

The I/O code provided in the SDK for reading and writing
.TTD files is *fast*.  Why?  It does fread and fwrite
(ultra low-level system calls) plus buffer-ahead.  This
makes it practical to run a trading system backtest
on all >20,000 stocks (and remember, 1 stock == 1 file)
in the database.  And indeed I did this very thing.

I don't know much about the _quality_ of Tech Tools's
stock data; I have only been getting it for about a year.
However I am a relatively happy customer of their *futures*
data; my only complaint is that they often screw up their
calendar of market-holidays and so they insert an
"all-zeroes day" (open=0, hi=0, low=0, close=0) on the
holiday.  Generally this gets cleared up in about a week
and the customer doesn't need to "do" anything; the
offending day just disappears [upon command from mission
control in Deerfield Beach].

They are good about handling brand-new tradeables; the
new symbol is created and data is automatically downloaded
without requiring the user to do anything.

They run "low price specials" from time to time; if you
are thinking of perhaps trying them out, you may wish to
wait for one of their frequent "deals".

Mark Johnson