Back to Community
Anyone doing live trading on Interactive Brokers ?

I want to know if anyone is live trading their algorithms on Interactive Brokers what are the conditions in real time

14 responses

There are a lot of people who are. Here is a list of people who have won the Quantopian Contest:

Not everyone shares their algorithms but, here is a good example of one that was winning and competing in the contest:$90k

Seen this post

What's the question? Yes, I'm trading.

I am trying to integrate an IB account with an algorithm.Wanted some help in testing some algorithms.

Nishant, one thing I'd suggest is to first connect your algorithm to a demo account on IB. If you don't have one you can create one account for free through their system and then add that account's login info to your Quantopian account. Our system will treat it exactly like 'real money' live trading and you'll be able to see the end to end process of placing trades that way without putting real $ at risk.

IB's simulator isn't perfect by any means (I wouldn't suggest relying on info you get there about slippage for example) but it does occasionally catch issues you might not find with Quantopian paper trading simulation. (Here I'm assuming you've already done testing using Quantopian's built in simulated live trading.)

If you have other specific questions feel free to post them here, or to ask us directly at [email protected]

Best, Jess


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.

Thanks for replying I have added the demo account with quantopian using the account settings now how do I check it.
Broker Username Account number.But there is no option to use it as such.Also I would like to know how much variation
in the performance will it be from Quantopian paper trading simulation to IB real account testing.

Ok great. So you've added the demo account info to your Quantopian trading accounts (confirming that's what you mean).

To test it out you'll want to actually deploy an algorithm to that account. Just run a backtest (or go to a saved backtest) for the algo you'd like to deploy and click on the 'Live Trade Algorithm' button on the top right of the screen. This will bring up a window with the options 'Quantopian' and 'Broker'. Select 'Broker' and you'll be prompted to select the specific account from a dropdown menu that should include the demo account you linked earlier.

In terms of quantifying the variation between Quantopian simulation and IB trading it really depends greatly on the specific instruments you're trading and the conditions you're trading in (time of day, type of order, etc.) In general we find the Quantopian simulation to be a good (but not perfect) tool to understand how your algorithm will trade on real money. The best way to bridge that gap and improve the fidelity of your own simulations (via adjusting your cost or market impact assumptions for example) is to do what you're proposing and test your algorithm on IB's demo and then small capital real money accounts. Probably obvious, but the more actively traded your algo is the greater the risk of mis-estimating your trading costs.

Nishant, just want to add that I have been live trading since April 2014 and it's worked very well in terms of the executions, etc. No issues. Only thing that comes up from time to time (after hours) is that you have to re-link your algo to IB because the connection gets broken, but it's never been an issue that has negatively impacted me.

How come the IB/Quantopian link gets broken? Is this still an issue?

For those who trading in the IB real money account, i have few questions"
- Do you create a second user / pay double for your data subscriptions to trade your algo?
- Do you trade your algo in your main IB account or you create a separate account just for Quantopian algos?
- Would algos interfere with each other If several algos are traded in the same IB live account (by creating different users/logins for the same account)?

I keep multiple accounts at IB. You don't need to pay for data because Q uses its own data for your algo and IB doesn't actually need a datafeed for placing orders (it may need data for complex order types like VWAP, not sure, but not for regular ones). You can have multiple accounts at IB linked so things like minimum activity requirements aggregate between them.

You can log in from a second login to the same account while Q is running to observe or even interact with the orders. Technically, I suppose you could run a second Q algorithm on the second login but you'd need to make sure that they traded different symbols and didn't interact with each other in any other way. I have never tried it and wouldn't recommend it.

WRT Photi's question, the link can get broken for a variety of factors but it's very, very rare. The way it works is Quantopian doesn't keep your password but instead, just logs you into IB's TWS Gateway software which is running in the background. If that program shuts down for some reason, needs to be upgraded or otherwise disconnects, Q can't log you back in because it doesn't keep your authentication info, so it requests that you re-login. I think it happened maybe once or twice this year.

Thank Alex for your reply. I know that IB let you create several linked accounts but all these accounts use the same login. Also, IB allows for one additional login for all linked accounts. Thus no more than 2 IB accounts can be accessed at the same time.

Do you know how you can run > 2 strategies in >2 IB separate accounts?

What I have is a 'main' login that every account is linked to and another, secondary (or maybe that's the primary ...) login for each account. I then use the individual logins as the algorithmic trading logins (on Q and my own hand-written platform) and use the main master logon to login manually as needed.

Is anyone having issues logging in using the IB key app to generate response strings? I have a feeling that Quantopian only supports access cards. I don't like to carry around 5 access cards (IB sends one for every user/account combo), so I switched to using IB key but now I'm not able to log in to IB from Quantopian...