Friday, January 16, 2009

Algorithmic Trading Technology Update

Lately a number of new (at least to me) technologies useful to the algorithmic trader came to my attention:

1) Matlab2IB API

I said in my book that it is difficult to use Matlab as an execution platform. As Max has pointed out, this is no longer true. This inexpensive API connects Matlab to your Interactive Brokers' account. It allows you to retrieve historical data, get real-time quotes, and send orders. In other words, all the basic functions you need to create your own execution engine.

2) R

Many people (hat tip: Steve H.) know that R is an open-source (i.e. free) alternative to Matlab. I find that there is also an API that connects R to Interactive Brokers, though I have not tried it myself.

3) Trade Ideas

Trade Ideas (hat tip: Russell M.) is a complete automated trading platform that provides connections to different brokerages (scottrade, IB, TD Ameritrade, etc.)

4) Amazon EC2 cloud computing platform

Running out of PC's to run your myriad strategies? Try Amazon's EC2 cloud computing platform. For a modest hourly fee, you get access to an instance of either Linux or Windows environment, and you can add as many instances as you want. The connection speed is supposed to be at least 10x T-1 line, well-suited to high frequency traders . Here is some other performance benchmarks.

21 comments:

Skeleton Jack said...

Hello Ernie,

Absolutely loved your book, but I thought it was kinda short and lacking more examples maybe.
After reading your book, I have some questions:

1. Apart from statistical trading, what other kind of "quantitative" trades are there? As far as I understood, there are no other kind apparently.

2. I know a lot of C++, but haven´t ever actually done any web applications with it. Could you recommend a book to learn how to connect a C++ application to database and to a broker?

3. I´m currently finishing my BSc in App Math and maybe thinking about going for a PhD in Op. Research in Cornell. Would you recommend it? Or would you recommend a PhD at all? BTW i live in latin america.

Great work and thanks for sharing so much!

Henning Menke

Ernie Chan said...

Hi Henning,
Thanks for your questions.

1) Quantitative trading also include derivatives trading as well as trading of fixed income instruments. Statistical arbitrage refers mainly to trading stocks only.

2) If you go to the Interactive Brokers website, you can download their C++ API documentation which teaches you how to connect.

3) I would certainly recommend ORIE at Cornell. Their applied math program might be a bit on the theoretical side. Ph.D. is not necessary to succeed in quantitative trading. A Masters degree is good enough. Even better: first join a hedge fund or I-bank as a quantitative programmer and work your way to become a trader.

Good luck!
Ernie

stefano said...

Hello Ernie,

could You advice me if is better a three years degree in Math or computer scienze for make "quant" trading sistems???

Thanks,

Steve

Anonymous said...

Have you taken a look at Portfolio123. You can develop some very neat factor models there, there are a ton of tutorial, some for regime switching. The data starts at 3/3/01 (which is not a lot but it is from Reuters with no survivorship bias). Anyways, it lets you back test all these models and then you can run a system and it will spit out the orders for those of us who are semi-automatic.

Ernie Chan said...

Steve:
I think a computer science degree is more practical for building trading systems. Most profitable trading strategies don't require much math at all.
Ernie

Ernie Chan said...

Anonymous:
Thanks for your suggestion of Portfolio123. Sounds very useful!
Ernie

N N said...

"Most profitable trading strategies don't require much math at all."

Agreed. What's needed know is a practical programming book that specifically addresses how to execute trading strategies, connect with broker API's/FIX, develop tools, etc. That would be a big seller!!

JB said...

Hi Ernie
Just perused through your book and I love it. Much of the topics you present are practical, and I can attest to the fact that many of the profit generating strategies are not very complicated. The only things that make them "propriety" are the tweaks and the amount of software and technology infrastructure that gets built around them. Thanks for the great book - it's tempting to set up my personal algo trading infrastructure/system at home instead of doing it for my current employer. ;-)

Ernie Chan said...

Hi JB,
Thanks for affirming one of the central points in my book! But as for quitting your job and setting up your own trading -- I feel it is preferable to get laid off and get a severance package than to voluntarily resign!
Ernie

JB said...

Ernie,

haha of course, I am quite satisfied with my day job. Just acknowledging the fact that the knowledge you share in your book can open new doors later in the future.

OptionTrader said...

Hello,

I came across this Open Source Platform => http://www.marketcetera.com

How about dropping marketcetera onto Amazon's cloud computing, then add a simple algorthm?

Anonymous said...

Hi Ernie,

Great blog!

Rearding interfaces to IB (Interactive Brokers), take a look at www.trade-commander.org

It's a generic interface between IB and a myriad of applications, from MatLab to Excel, from Perl to Phyton... and it's free !

However, I donated some money to its author as he did really a great job !

Best,
David

Ernie Chan said...

Hi David,
That is great information! Thanks a lot for sharing it.
Best,
Ernie

Ernie Chan said...

Hi OptionsTrader,
Though I don't trade options at the moment, I think it is a great resource for those who do. And sure, as with any trading programs, you can always run those on Amazon's EC2.

Thanks for sharing!
Best,
Ernie

Anonymous said...

Hi Ernie,
Just ordered your book. I'm looking forward to a great read!

I'm an order management developer and I am trying to break into the quantitative world. My first task at hand is to build a beat the VWAP strategy.

I'm familiar with all aspects of the project with the exception of the actual strategy (when/how much to buy/sell??). I can't seem to find info on this anywhere. It seems to be a secret!

Any thoughts on how I can find out more information on this?

Thanks!

Anonymous said...

Hi Ernie,

First, your book was great. Its a fast read (i.e. write a second, deeper dive please) but it filled in a much-needed area for me as a starting trader who has a quantitative background in my career and was having trouble bridging that to trading.

Anyway, I started trading with Ninja Trader as my back testing & development environment. It seems to most closely compete with Trade Station. Do you or other traders here have any insights to using this system? I'm trying to find a good platform to work from, and am willing to spend a few dollars if it will give me something. Maybe MATLAB? I have a base SAS license... does anyone use it as a backtesting platform?

Ernie Chan said...

Hi anonymous,
I use Matlab (both backtest and automated execution) with Interactive Brokers.
Haven't tried tradestation or ninja trader myself.
Ernie

Ernie Chan said...

Hi Anonymous,
There are multiple beat-the-VWAP strategies, and of course, they are trade secrets to the firm developing them!

I myself have not tried this strategy, but I suggest looking into a Bollinger-band strategy and buying at the x-period low throughout the day.
Ernie

Muhammd said...

Someone commented that Trading Ideas is a trading black box. Let me tell you its a poor poor real-time trading filter. It gives you alerts when the moving averages are all over each other like spagitti !!!! So if you would trust a program that does that as a scanner good luck trading with it as a black box

Muhammd said...

Someone mentioned Trading Ideas as a black box. Trading ideas is a real-time stock scanner. I used it 3 yrs. ago and I can tell you its no good even as a scanner. And certainly wouldn't be good as a black box.

Muhammd said...

I am a stock trader, looking to team up with a programmer or two to create a black box. If anyone interested let me know, we can exchange info.