Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
IB Proprietary Trading Account - mechanics of linking sub-accounts to Quantopian algos?

I'm wondering if anyone has worked through the mechanics of linking sub-accounts of an Interactive Brokers (IB) Proprietary Trading Account to Quantopian algos? Is it possible? Or will Quantopian only allow individual traders to link up with individual, personal IB accounts? If it is possible, would it be one algo per sub-account?

Thanks,

Grant

32 responses

We do this ourselves at Quantopian, and it would work for anyone. The contest winning algos (hi Grant!), for instance, are running under a prop account.

Walking through that in a bit more detail: Quantopian opened a prop account at IB. We funded the "master" account with several hundred thousand dollars. When we get a new winner, we create a new sub-account and fund it with $100,000. We enter the new sub-account credentials into the regular Quantopian/IB login process and deploy the real-money algo. From the master account we could hypothetically disable the login to the sub-account, liquidate positions, etc.

This works because from an API perspective, most IB accounts are indistinguishable. If it has an account that starts with U (or DU for paper), we can probably support it. I can think of two categories of IB accounts we don't support yet. One is the Financial Advisory accounts, also known as "F" accounts. I doubt we will ever add support for those. The other category we don't support yet is U accounts that are linked to certain extra-high-security devices, the Gold/Platinum security devices. We will support those, probably sooner than later. So far we only support the more common IB code card.

And in answer to your last question, yes, it's only one algo per sub-account.

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.

The other category we don't support yet is U accounts that are linked to certain extra-high-security devices, the Gold/Platinum security devices. We will support those, probably sooner than later. So far we only support the more common IB code card.

Oh wow, really? That's a showstopper for me! So if I have a digital credit card security device, I cannot hook any of my accounts up to Quantopian?

Right now we only support the regular code card from IB: https://www.interactivebrokers.com/en/?f=%2Fen%2Fgeneral%2FbingoHelp.php

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.

Hi Dan / Alisa,
Just curious, when you open the fund to outside accredited investors, are you planning to have the "credit card" security device issue resolved?
Are you planning to have a 100% on-line automated client account sign-up process for your fee agreement tied in with regular IB account setup (e-signatures)?
Any accredited investor (based on IB's determination based on client's net worth/income inputs) will be able to invest in Q's fund, correct?
Thanks!

Thanks Dan, Alisa,

How does such activity fit with the Q business? Are you wanting folks with gazillions of dollars to set up such accounts? Couldn't it run counter to your master plan of a crowd-sourced hedge fund that would be drawing from the same talent pool? Wouldn't you be worried that algos you are trying to profit from would also be deployed using money from other 1%-ers wanting to profit from starving quants? Cognitive dissonance. Does not compute.

Also, do you expect a paid support model, for large master accounts, with sub-accounts linked to Q algos?

Grant

Q team,

Any feedback on my questions above? They seem natural, and straightforward.

Grant

I'm guessing an LP in a hedge fund cuts a $XXXM wire to the fund rather than setting up an IB account and linking it, which would not only be difficult for the investor but a compliance and account nightmare for Q. Plus who in their right mind would subject their investors to opening up an IB account and dealing with their "customer service"! It seems the only way to really make it work would be to have all the LPs send their money to one bank account, which Q moves into their IB master account. Then Q allocates the money to their different algorithms as they see fit from their master account, one algo per sub account, and takes care of the hassle of dealing with IB on a day to day basis.
I don't think Q has said anything in public about what they expect their LP base to look like, we've just extrapolated the idea that it will be made up of a bunch of investors with relatively smaller investment amounts. In reality they'll ideally want to have a dozen or so 8 or 9 figure investors like most other funds. They're already dealing with a unique high touch, high numbers game on the algo writer side, why add that same complexity on the investor side when it isn't core to their business model.

Kevin, not saying you're wrong, but I don't like the LP model. I think it would be possible / better to have investors set up their own account with IB linked to Q's master account(s) driving block trades down through all the accounts.

Kevin & Jeff,

I am not talking about Q being involved at all, except for providing the free Q accounts to the individual quants (free, at least up to $1 M). It sounds like Q might not even know that the accounts were linked to an IB Proprietary Trading Account (unless they see special IB link up details). Regarding compliance reporting, maybe Q would be on the hook in a special way, versus what they already need to do for individuals linked to individual IB accounts?

Grant

I am not sure what difference it makes what sort of account Quantopian algorithms are hooked up to? Except if it doesn't work of course.

Dan's reply to me implied that Q would support business models that would potentially be in direct competition with their hedge fund effort. If Q algos are hooked up to an account that draws talent away from the Q hedge fund effort, then it might make a difference, in that Q would not be supportive, or might even become antagonistic, eventually not allowing linkage to such IB accounts. It just seems like an obvious conflict.

I am not sure if restricting the account types to which Quantopian will connect will in any way affect that potential drain of talent. Quantopian is an accessible way to get into algorithmic trading and build a track record, but if external funds want to tap the talent, not being able to use Quantopian to execute will not stop them, at all.

I have a question regarding connectivity to IB. I have a long term trading algorithm in mind, that trades occasionally, based on EOD data. I would like to know if it is possible to connect to IB only when a trade needs to be placed rather than remain connected all the time. My algorithm would not be affected by a few seconds or even a few minutes of delay. Any suggestions on the best approach to do this is welcome.

The nuts-and-bolts of the hedge fund implementation aren't resolved. There are a lot of different ways to skin that cat. We definitely are looking at a limited partner (LP) model, not an accredited-investor model, however.

  • Jeff mentioned a model where investors open large IB accounts and Quantopian connects to them. Using IB doesn't feel like the right model for the long run. That said, it might be a way for us to do early accounts.
  • We might do the model where the investor (family office, pension fund, endowment, etc.) wires money into a Quantopian account.
  • We might do the model where the money is held by a prime broker.
  • We might do a mix of the above, and/or evolve through different choices.

Grant, I'm not sure I understand the concern you're raising. We expect that some of the people trading money through Quantopian today are prop traders, and there will be others doing that in the future. I expect that entire hedge funds will use us as a platform, too. I don't see it as a conflict. Their IP is secret just like everyone else's. They might not want to join the Quantopian hedge fund, and we may have to charge them a platform fee instead, but that's OK.

I think you're looking at a related challenge for us at Quantopian. We're an open platform. Algo-writing is a valuable talent. We have to manage the fact that we have something that people want: access to quants. We have people already who are checking out the Quantopian forums and contest leader boards and soliciting them for jobs. We can't stop them from visiting our site. We can't stop quants from taking jobs elsewhere. We have to embrace that. What we need to do is to make our compensation competitive and our toolset irresistible.

Raghavendra - I suggest you open your question as a separate thread.

Thanks Dan. --Grant

Hi Dan - any update on the digital token security devices? I expect I'll be wanting to connect an account to a live algo in August, and at least at the moment, my account definitely has such a device. I don't know yet, but perhaps a sub-account won't?

As a related question, anyone know which IB master/sub account structures are best for someone that is planning to eventually run 5-10 algos? Should I make my own "prop" group, or just stick with separately-funded sub-accounts as an individual? If it matters, I'm a Canadian operating with interactivebrokers.ca

Cheers,

Simon.

Simon, no updates yet on the digital security devices. We currently support only the regular security card from IB. We'll share an update once this changes! As for the structure of your accounts, that's up to you. Each algorithm will need to run on a separate IB account, which has a unique username/password combination. We have a master prop account and sub-accounts, if that's helpful.

Yes, I am just wondering what all the options are, I wish there was a booklet, "Legal and Operational Structures For Running Retail Algorithmic Trading Businesses". :)

@simon: if it's still relevant (it is for me!), I just called IB and asked about the best setup for this kind of operation and they told me: individual REG T account and you can create yourself up to 15 sub-accounts (think sandboxed) with their own login/password. I guess that's good enough for me ATM.

They warned me that IB might enquire why you created several sub-accounts but seemed to think sandboxing algos was a valid reason. Go figure.

Note that if you have a sub-account of more than 110,000 USD you can convert a REG T account to a portfolio margin account and benefit from higher yet VARIABLE authorised leverage. It does not seem possible ATM to dynamically check the authorised limit in Q so I don't think I will try that. It's probably safer anyway!

EDIT: Note you'll have to aggregate the tax reports yourself. No consolidation here as in Prop Accounts which are not available to individuals.

Cheers

Just by way of update - I am executing Pierre's suggestion, creating sub-accounts for each algo, linking them with my main login, and then creating second-user accounts for each of the sub-accounts with just the code-card authentication. So, at the end of it, structure will look like this:

MainUser -> MainMarginAcct, AlgoAcct1, AlgoAcct2, RRSP, TFSA (Canadian retirement account types), all using the iPhone 2-factor auth app
2ndUser1 -> AlgoAcct1, using a code card
2ndUser2 -> AlgoAcct2, using a code card

This has taken a couple of weeks to set up, but it should work fine in the end.

Thanks Simon, I was looking for this exact information. You spared me the time to search for it!

Hello Quants,
I am currently a Questrade client and am considering moving to IB so that I may have my algos trade for me. I only trade USD and US securities in my margin account. Going forward I would like to trade USD and US securities in all 3 of my accounts; margin, TSFA, RRSP. Could you please provide some feedback/advice pertaining to these questions below or anything else you may think might be pertinent?

According to here: http://ibkb.interactivebrokers.com/article/1004 "1. In accordance with market data vendor requirements, the account will be assessed a separate market data subscription fee for each user account added. In addition, user account market data subscriptions are tied to and cannot vary from that of the account holder."

I was wondering are you guys charged the market data on your second account even if it is only used by the algo to login?

According to here: https://www.quantopian.com/posts/quantopian-and-canadian-retirement-accounts-rrsp-and-tfsa "Important FYI for Canadian users, RRSPs and TFSAs accounts at IB, won't work with Quantopian as they only accept USD based currencies accounts. There's only one base currency for TFSA and RRSP accounts ( CAD only) . I wanted to go live with one of my Algo , but was unable to do so because of this restriction."

Is anyone using an RRSP and TFSA and trading in USD with US listed securities settled in USD with no problems?

You can trade US securities with IB in your TFSA and RRSP, just not through Quantopian. Quantopian requires the base account currency to be USD, but IB requires Canadian retirement accounts to have a base currency of CAD. You're just S.O.L. on that one.

Quantopian algos don't require a market data subscription. If, however, you want to be able to trade out of positions by hand because of live trading bugs (yours or Quantopian's), then you will probably want to have a market data subscription for the algo account. I am not sure if I get charged for each account, I thought the waiver for the value packages applied based on total commissions across all linked accounts.

Simon,
Thank you for your swift reply.
I have market lvl 2 data currently with Questrade (as I have been manually trading the algo "in principle" since July 5th), so I can continue to use that as I get familiar with the IB platform. It's a bummer that it can't be set up for TFSA and RRSP accounts.
I'm going to have the algo paper trade in the coming weeks to monitor it's trading to ensure that it performs as expected.
Would I be correct in assuming that Quantopian receives some sort of redemption from IB based somewhat proportionally to the commissions collected from my trading trhough IB?

No, I'm pretty sure they have no interest in your trades other than collecting the data.

Is anyone able to explain why there is a base currency restriction with IB that would remove the ability to trade in a Canadian TFSA or RRSP account?

I currently have an algo trading in a Canadian IB RRSP account with Collective2, and they do not have the same 'base currency' requirement. Is the base currency requirement a stipulation of Quatopian's? And is it foreseeable that this may change in the future to allow Canadian TFSA and RRSP accounts to be traded through Q?

Thanks for your time in replying.

Hello Dan/Alisa,

Regarding this:
"Right now we only support the regular code card from IB: https://www.interactivebrokers.com/en/?f=%2Fen%2Fgeneral%2FbingoHelp.php"

Is there any change in status since two years ago? Is it possible to now use the IB security gold card instead of the printed regular code card?

Thanks in advance!

I recently learned that it's possible to do an IB Secure Login System partial opt-out. With that set your Q algo can log in with just the username and password but the Secure Login System is required for logging into Account Management on the IB website. The IB representative who helped me mentioned that penny stocks are not tradeable with the partial opt-out enabled because if someone else got ahold of one's username+password they could use the account to profit from a 'pump and dump' scheme.

Could someone from Quantopian clarify for me how to properly connect my account at Q with IB. Currently I have IB Key login on my phone and seems like this doesn't work, as connecting to my account constantly fails, even though I'm getting Login confirmation on my phone each time I'm trying to connect to my IB account. Please, clarify

Hi Igor

It works fine for me. Each time I try to log in to Q live trading act. IB sends a MSG to my phone and I would click and IB Key app would opened and I enter codes.

Hi Brandon,
Did you enable some special setting on IB side? Are you also logged in on your machine into IB account or using TWS simultaneously. Are there any restrictions on that? Are you connected to paper or life account?
Somehow it is not working for me

Hi Igor,

All I did was downloading IB Key to my mobile phone. No other setting. When I needed to login TWS, Q live algo would logged out temporarily and it would attemped to log back on by itself automatically. I'm connected Live account. Make sure IB Key works with TWS first if it does it should work with Q too.