homegrown trading software

Thanks for your awesome and very interesting response, Gringinho! It should intrigue other hardcore homegrowners and encourage them to contribute to the thread.

I've extremely surprised that you're using Java for trading software development and am now encouraged to use Java myself. It was tons of fun with J2ME writing small apps on Nokia phones, and quite possibly the fastest RAD I've ever encountered. That, and since IB's TWS favors Java, it might be the wisest choice for my future trading software development.

Thanks again for your great post!
 
0) I had 10 years experience with Matlab and C and wanted to implement various trained networks and subsystem selection models. Needed to execute a mix of Matlab and C code in real time, per-tick, at high efficiency.

1) 99% from scratch. Uses IB’s TWS API for data and execution.

2) Matlab, C, C++

3) Mostly OS independent. Win2K and XP for backtesting and work environment.

4) 3 PCs for round-the-clock backtesting. 2 dedicated servers for round-the-clock trading.

5) Highly modular design. Execution software automatically configures and trades ~20 systems simultaneously (multithreaded), where each system is configured to trade any one futures symbol. Each system executes a daily-reconstituted set of 10 to 60 subsystems from a universe of 100 to 200, each specifying a different indicator or method.

6) Very efficient in real time… about 1% of CPU per system to process every tick for ES, NQ or 6E.

7) Depends on definition of “working”. Started futures system research in March ’03. Only had one profitable NQ design by August ’03, with rudimentary real time execution code. Had about 15 designs for ES, NQ, 6E and YM as of Jan ’04. As of now (July ’04) there are a few hundred “system” designs (0.1 to 0.6 daily correlation of returns between “systems”). Recently implemented voting logic to combine signals to reduce # of trades, also because it’s not easy to combine different designs.

8) No idea.

9) No

10) It’s not appropriate for public use. Better to trade privately. There are no real-time discretionary inputs. Better to sell the signals, if anything. The testing architecture should stay proprietary and locked-down due to it’s scalability and generality.
 
Quote from Gringinho:
PPS! How many others have include scripting capabilities for adding indicators etc. ? Are you accessing all internals or using a pre-defined API ( I use an API to not get too messy in my scripts) ?

Almost all of my backtesting simulations require scripting and detailed revision notes. Matlab is highly effective for this. Can implement in one line of Matlab what takes 20 lines in C. Dynamic compilation also saves a lot of time.

No scripting is used for execution, though it is possible. Instead I use parameter lists to specify various pre-coded formulas, logic and numerical constants. Most internals are available.
 
...I also included hooks to MatLab through another free API.

Any resources you have regarding matlab would be greatly appreciated! Are you linking matlab to TWS or your platform?

(BTW, There is a product which links matlab with tws, but it is fee based and that takes the fun out it.)

http://www.gloriosia.com/


Thanks.
 
Quote from brokershopping:

...I also included hooks to MatLab through another free API.

Any resources you have regarding matlab would be greatly appreciated! Are you linking matlab to TWS or your platform?
(BTW, There is a product which links matlab with tws, but it is fee based and that takes the fun out it.)
http://www.gloriosia.com/
Thanks.

Java APIs:

Bayes, HMMs:
http://www-2.cs.cmu.edu/~javabayes/
http://ghmm.org/ (gotta make JNI stubs yourself)

Rules sets:
http://herzberg.ca.sandia.gov/jess/
http://www.iit.nrc.ca/IR_public/fuzzy/fuzzyJToolkit2.html

ANNs:
http://www.jooneworld.com/
http://www-ra.informatik.uni-tuebingen.de/software/JavaNNS/welcome_e.html

Script:
http://www.beanshell.org/
http://www.jython.org/
http://www.robert-tolksdorf.de/vmlanguages.html (THE list ...)

Matlab:
http://www.held-mueller.de/JMatLink/ (I seem to remember another Java API as well, but am a little lost in my links by now)
http://www.gloriosia.com/index.htm
http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_external/matlab_external.html
http://finance.groups.yahoo.com/group/TWSAPI/message/3533
http://www.interactivebrokers.com/d...ctivebrokers.com/discus/messages/2/14721.html
http://www.mathworks.com/access/helpdesk/help/techdoc/rn/external.html#998760
http://www.ai.mit.edu/~murphyk/Software/BNT/bnt.html

Some visualization and other math stuff:
http://www.developer.com/java/data/article.php/1483661
http://www.ssec.wisc.edu/~billh/visad.html
http://www.mathtools.net/Java/index.html
http://jj2000.epfl.ch/
http://jpeg2000.epfl.ch/

Optimizing:
http://www.javaperformancetuning.com/index.shtml
http://www.developer.com/ws/j2me/article.php/10945_2234631_1 (J2ME gfx optimize)
http://www.java-performance-portal.org/

I also refactored my app into using different fast gfx techniques, including VolatileImage videomemory and OpenGL via JOGL: https://jogl.dev.java.net/ -- but it became too overwhelming with OpenGL stuff, although the speedup was definetely there.
See http://www.cokeandcode.com/info/tut2d.html for a nice tutorial.
I am really intrigued by tape-reading and charts with animations and visual enhancements etc.

Also, remember to search: http://citeseer.nj.nec.com/ and search for forecasting, neural networks, HMMs, financial time series and whatever you can think of ...

Well, I guess this should answer most questions about links, and some of my "secrets" are out ... :D
 
For developing a trading platform on unix, are there any datafeed choices besides reuters and bloomberg? Has anyone written a handler to receive the data on a non standard unix platform(ie Tru64)? Any thoughts would be greatly appreciated.

red
 
Back
Top