Sunday, October 21, 2007

Brokers & Automated Trading

So as I get closer to building an automated trading system, my choice in brokers leaves me quite a bit to be desired. As I see it there are two ways to go. One is with a traditional broker who provides a simple type API for making trades. The other is a bit more complex using FIX protocol.

There is also a seperate issue of data provider, as some of these brokers don't provide the best of data feeds.

Here are a few of the choices that I have:

1) Interactive Brokers: Pro's - Great fees, wide range of markets, TWS api and FIX available. Cons: I've read lots of negative things about the TWS api. I've read terrible things about there customer service. I've read terrible things about there data feed & trade executions. Also there is a fee per cancelation (could be high for me since I will be canceling orders often enough).

2) MB trading: Very similiar to IB, but not quite as good on market availability and fees. Quite a bit smaller than IB. I have also read about problems with this broker similiar to the same comments I hear about IB.

3) Fidelity: Fees are much higher than IB's, however my accounts are already there. Haven't looked in to this much, but could write some custom code to interface with Wealth-Lab pro to do automated orders from my own proprietary system. Wealth lab has an order execution module built in, presumbaly integrated well with fidelity. Lacks the markets to trade that IB and MB offer. I can say that I am pretty happy at this point in time with Fidelity , the rates are reasonable for a "premium" broker.

4) A few others that are out there: Think or Swim gets good reviews as a broker, API is unavailable at this time. Tradestations... too proprietary, but hear the backtesting software is decent. Lime brokerage: don't know much about them, except they have some relation to the p2p limewire software and a FIX based API. Nice website says they are catering to automated traders.



4)

Mistake still lingering in my head & partial fills

Aug 16 FXI limit buy 100 shares at 111.85 (Lowest low since May this year). Sold at 157.50 on September 18th. This trade is still lingering because FXI is currently trading at around 200 dollars, and the only reason that sell was made because I didn't cancel my upper limit order due to some stresses in my life. Simple error causes me roughly 4K-5K (that's a lot more than my post tax pay check).

To second guess myself a little more, I had been thinking of placing an option spread for FXI (something I don't do often), which would have played out perfectly. A few day ago I got that same idea thinking we are ready for another round of volatility, and then that sell off hits. Ahh... it really sucks to have a day job where you can't trade sometimes.

At any rate, I'm excited because I have two days to trade in November!!! Veterans day and the day after thanksgiving. Both are surely slow days in the market, but it still is good practice. I still continue to have success on these 'days off'.

I ran into a problem with how my trades executed when I traded during the last holiday. I took on a fairly largish position for me over the day in CHL (yes.. more China, but that's the kind of volatility I was looking for). At any rate, I went to sell 400 shares, and only got a partial fill of 145... ugh. The market was dropping and I needed to get out of the positions quick, so I canceled, reset my limit and was out. Saw some small profit slip away over a few minutes as I attempted to execute the order.

So not that big a problem in this scenario, but if this were automated I get in a really ugly spot. I go back and forth on this a lot in my head. When I trade, I typically use limit orders, however there is that danger of getting a partial fill. If I do a market order... I still may get partial orders, but more than likely the whole order will re-execute (at multiple prices). So in my automated system how do I want to handle this.

It's tough. The reason I got out of the position mentioned above was because a significantly dropping market in the last hour. Visually I could see (and I probably could compute the rate of change in the price to measure this phenomena). If do detect it, I have to cancel, wait for a cancel success, then execute the order at another price (if using limits). Awfully damn complicated. With market orders, I think it is a bit simpler (depends on how the broker handles it) however I think slippage could become a major issue in the scalping type algorithms that I am looking at.

So I think ideally what we want to do... when a price target is hit with limit, and there is a partial fill, just execute a market order to get out.