Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
would I ever get fills? Semi HF trade between crude and USO (United States Oil Fund ETF)

This is a question for people familiar with HF trading/market making.

I have access to 1 min data. OHLC I compared several ETF's to the underlying commodity they seek to emulate. I set up an excel spreadsheet which looks at last sale in both and compares them to previous days close. I express difference as a percentage.

I take the difference between the two %'s (Diff) and then compute a seven period moving average (AVG) of the difference.

I then take AVG and subtract 2 standard deviations to create a BUY number and add 2 standard deviations to create a SELL number for the next 1 minute.

Doing this I seem to make money....but I am assuming fills at LAST sale. How realistic is it to create an algorithm
that would use the buy and sell levels created to bid and offer in the ETF and the Future to get the level I'm looking for?

I've been told a market making algo that could do this (constant bidding /offering/cancelling ) would be very hard to write. Besides that I've been told everyone is doing this type of thing so I wouldn't ever get fills.

Can anyone with experience comment?

P.S. I'm happy to send anyone the excel worksheet.

2 responses

This is quite hard to backtest properly. I am attempting something similar, and doing tick-level backtesting with Level 1 quote data, and it's a vast improvement over using just the last trade. Using last is very misleading for market-making and higher-frequency mean-reversion algorithms, since it's just jumping across the bid-offer spread and implying many more fills than one will receive. This is especially true for illiquid stocks and ETFs.

I haven't gotten to implementing a more realistic fill simulator for limit orders, but there's a lot of academic literature on this sort of thing. It'll probably end up being some sort of stochastic process with an intensity determined by the inside-ness of the limit price, ranging from 90% if aggressive to 0% if passive higher than the current inside price. Even better would be to use order book data, but I don't want to pay for that (yet)!

It's also worth noting that this places you in direct competition with all the high-frequency traders in the world, so it's a step up in difficulty in that regard too. It becomes more important to have a strategy for smart execution, low-latency smart order router or custom, and to hide intentions. Or so I hear, I haven't gotten any live data yet. :)

A few questions and notes of interest.

It sounds like you're trying to stat-arb ETFs vs futures is this correct?
When you calculate out your entry/exit prices are you beating out nickles and dimes or quarters and dollars? That is, are you making just a few ticks per trade or half or whole handles?

You probably already know this but futures trading requires a margin account and is not for the faint of heart. Yet the cash outlay for EFTs vs Futures is like a bushels vs berry baskets. 100 shares of GLD will cost you $12,348, while a single contract of GC!1 will cost you $4000 as maintenance margin. Gold goes up $1.00 and you make $100 on the future but only $10.00 on the ETF, but it takes 3 times the cash to trade GLD. (I think I got those numbers right -- may have to check 'em). [You could trade the options on the ETF though, which would align the returns more evenly.]

I've written market maker strategies that try and work orders for very large iceberg type trades. 100milliseconds outside the offer, 100mills at the offer, 100 mils inside the offer, 100 mills at the mid, 100 mills inside the bid, 100 mills at the bid, 500 mills outside the bid, convert to market. Move on to the next chunk. Repeat. Stagger entries by random seconds. Stagger entries by random sizes. Follow the VWAP smile for the section of the day the trade is executed. All standard stuff for OEX type strats.

Adding alpha to that is done by the HFT guys. I'd never try to arb futures at the millisecond level. So that's why I asked about your trade profits: ticks, no way. 10's of ticks, maybe.
As Simon points out you'll need tick data to test this for sure. If Simon is building a market model for order execution simulation on ticks, well, that's something. You might want corroborate with him.