Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Relative Orders

how bout that sports

2 responses

There are basically two settings for relative orders that are useful. One is an offset of 0, which will cause the order to always match the best top-of-book when it improves (and not cancel back when the TOB gets worse) and the other is an offset of +0.01, which will cause your order to periodically improve over the best TOB by a penny.

The 0 offset can be useful if you're looking for a passive fill (in order to collect some rebates, not pay bid-ask spread, etc) and are in no rush to get filled. The +0.01 is good for relatively thin markets as a kind of 'improved market order.' Basically, if the bid-ask spread is 5 cents wide and you want to trade quickly, you may not want to just cross the spread but rather, continuously offer a better and better price until someone crosses you, which may result in an effective spread of only 3 cents or so. Of course, both offsets are fraught w/ more adverse selection and market impact (people will respond to your order and you won't get filled when you're right and the market runs in your direction) so it's not a home run.

IB has an amazing (for a retail broker) transaction cost analysis tool which you can run once you have some fills to help you measure your fill quality. It compares your fill price to the bid/ask at the time of order arrival, to the price of the stock a minute into the future, etc. Probably the best way to figure out whether you want to use relative offset orders is to run them for a while and compute the metrics.

I was the (or at least one of) the people who requested that it be added and have found that they generally improve my fill quality.

Thanks for pointing this topic out Paul and Alex.

It looks like "Relative" orders are just Pegged orders but pegged to the far side of the spread not the near side (opposite side). Pegged-to-market orders follow the Offer (minus offset) for Buys. But Pegged-to-primary (Relative orders) follow the Bid (plus offset).

Alex, you say you get better fill quality -- as in a better fill price? Are you trading liquid securities with tight spreads? Or (somewhat) less liquid with wide spreads?

And as pegged orders must be continuously aware of prices, the need to subscribe to IB's market data feed (on top of the Q's Nanex Core feed) would add complexity and limitations (100 max subscriptions for a retail account). Have you found this added burden detrimental in anyway?

Earning (or losing) an extra penny or three can often make or break a day trading strategy. Swing trading (the balance of trading done here I would posit), however, is less sensitive to such price betterment. Would your strategy(s) still be profitable without relative orders?