Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Explore trading through IEX with Quantopian

Quantopian offers you the ability to route your orders to IEX in live trading. Below is a sample algorithm showing the syntax; clone the algorithm to begin coding your customized strategy.

Matt Trudeau, Head of Product at IEX, spoke at our NYC Algorithmic Trading meetup and we shared a blog post with a video recording of the event. Go ahead and take a look!

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

6 responses

Hello Alisa,

I've learned a bit about IEX, and don't understand the relevance. If I understand correctly, they delay the transmission of data to their system (http://en.wikipedia.org/wiki/IEX):

IEX's main innovation is a 38-mile coil of optical fiber placed in front of its trading engine, which adds a round-trip delay of 700 microseconds and is believed to limit traders' ability to respond on the dark pool ahead of IEX's own pricing algorithms.

In a live Quantopian algo, the closing price for the prior minute bar (delivered by "a realtime feed of trades from Nanex's NxCore product") is available to handle_data, and then an order can be placed asynchronously, presumably delivered to IEX within milliseconds, if not longer. Also, the closing price provided by Quantopian has no datetime stamp, so there is no way to know if the actual trade associated with it occurred close to the call to handle data, or up to almost a minute prior.

Am I missing something, or is it basically impossible on Quantopian to take advantage of the 700 microsecond delay inherent to the IEX system? It seems that there could be numerous trades executed prior to the receipt of an order from Quantopian that would wash out the advantage. Or am I missing something?

Grant

I don't personally believe IEX offers any advantages to retail traders at all, let alone ones using a broker like IB which already has a smart router. Hypothetically it might be a benefit for institutional traders that don't want their midpoint orders getting picked off by latency arbitrage HFTs immediately prior to inside level change in the broader NMS, but really, the whole thing seems like an exercise in marketing and branding for how much it will affect Quantopian users. All just my 2c.

Presumably, it is still Interactive Brokers that determines the commissions, right? It'd be nice if IEX put in a ~1-minute delay, and commissions dropped by ~10X-100X. It seems like with IB, the commissions must be paying for a lot of high-speed/high-volume infrastructure overhead that Quantopian users won't be using. --Grant

I think the point with IEX is the hope that execution is better in that 90-100% of the order gets filled rather than 50-60% because orders vanish as latency arbitragers' orders evaporate in the face of bid-pressure.

Hi John,

As I comment above, my guess is that the Quantopian system has a minimum latency of milliseconds or more, so just "back-of-the-envelope" it doesn't make sense to me that the intentional IEX 700 microsecond latency would be applicable (their spool of fiber would need to be longer to at least match the Quantopian minimum latency). In other words, IEX is solving a problem for some retail traders, but not folks using Quantopian. But I could be misreading things here. Am I missing something?

Grant

Hi Grant,

I think the point is elsewhere. 700 microseconds should not affect the speed of algorithms executing on minute by minute bars at Quantopian but because of the way that IEX promises to operate, they hope to reduce price slippage. I.E. an order directed to IEX promises to have more of the transaction actually executed at a mid-point price rather than slipping up or down as execution tries to fill the remaining parts of the buy or sell.

The point is not speed but rather a structural feature of the order execution platform. At least this is what is envisioned. The future will tell if IEX can live up to that vision over the long-term or whether there will be erosion by some new form of value extraction arbitrage.

The way I tend to think about it is that IEX tries to promise their clients a "rabbit-punch" execution rather than a bulldozer approach. It hits all exchanges at once so algorithms depending on arbitrage of market structural inefficiencies are somewhat incapacitated and thus you, the client, get to keep what might otherwise be skimmed by some of the sophisticated arbitrage algorithms.

-jw cobb