Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Active Trading - Security Questions

I looked through Q's help files and searched on this community board for answers to this questions, which I know others must have faced, but have not found any response. I HAVE sent a request for help by email to Q, but I have the little feeling that they're not so sure themselves.
So let's see if someone else has already faced this issue and solved it:

  1. In order to trade live with IB, you must register an account with the same username and login as you would use on this IB webtrader login page: sample interface here
    If you notice, this person has IB's "Digital Security Card" system implemented. Will this work with Quantopian's "Configure LIve Trading Account info " setup?
  2. If that does work, how do you avoid needing to re-enter the security prompts each time Q disconnects from the session. (Disconnecting can happen if the user accesses the account at night to view interim results.)
  3. If that DOES NOT work, how do people handle the security risk of disabling the digital security system to protect it against brute force password attacks?
10 responses

The key point is that accounts, user logins and security devices are not 1:1:1, at all. One user login (with associated security device) can log into multiple accounts, and one account can have multiple user logins, and one security device can be attached to several logins.

Here's what I did (account numbers/logins shortened for clarity):

  1. Discretionary account U0001, retirement accounts U0002 and U0003
  2. Separate algo accounts U0004, U0005, U0006
  3. One master login, foo001 with digital security device, linked to all the above accounts, and with appropriate nicknames so I remember what's what (FEE, FIE, FOE)
  4. Three trading user logins, fee001, fie002, foe003, with different passwords, all sharing a single code-key security card, with very limited permissions, basically only able to place orders, for each of the algo accounts.
  5. Three Quantopian algos named FEE LIVE, FIE LIVE, FOE LIVE, and three Quantopian IB live trading accounts fee/fie/foe, connecting to the three IB algo user logins fee001/fie002/foe003, for trading in the three algo accounts U0004, U0005, U0006

I can look at the algo account details in account management, web trader or TWS using the master login, without disturbing the Quantopian algos.

It takes a few days to get each new account set up, but it's pretty mechanical once you see how it works.

  1. Create new sub-account, attach scans of photo id etc, configure trading permissions, wait for approval.
  2. Internal transfer of funds to sub-account.
  3. Link new account to master user login (and associated digital security device).
  4. Add a second user login to the sub-account.
  5. Configure new user login to share the code card security device with the other algo accounts (optional, you could have a separate code card for each, which might be more secure I guess, but you'd have N code cards on a keychain somewhere?).
  6. Add new Quantopian live trading entry for the new user login/sub-account.
  7. Backtest and go-live on your algo using your new Quantopian live trading entry.

It's important that the algo accounts use a code card security device; Quantopian doesn't support the digital security cards, nor the secure smart phone 2-factor app.

Simon.

Wow, What a comprehensive answer. (Glad I'm not paying you by the word... Would you settle for 2 basis points per transaction? LOL) . This is great info and should probably be a lot of help to a lot of people.

I'll add the following. I am an RIA. To get my thing going for my accounts, I simply turn them on for web trading privileges (takes 24 hours) then create a second account with limited view only priviges, as you specify. This takes 24 hours.

I was concerned that my use of my master account will disconnect the Q program from running, since they can both transact to the same underlying account. This is NOT the case, according to IB. Of course, I will not want to trade in that account , as that would mess up any reporting on the strategy results.

Many thanks.

Yeah, I don't have any experience with RIA accounts (yet!) but that sounds right to me. User logins have the security devices, and have the restriction that only one person can log in at once (ie: using the same login is what runs the risk of kicking off/fighting with Quantopian), and have the market data permissions/costs. Accounts have the positions and trades and margin etc. As long as the only thing that logs in using the "trading user login" is Quantopian, you should be fine to examine and report on the account from another master login/customer login/etc.

Simon.

This is a great setup/design. A big thank-you to Simon for good notes and details!

The part that I really like is being able to have a single TWS session running and being able to easily switch to see what the Q-algo is doing in its separate account.

One item I am not sure on is if IB will charge the "Monthly Minimum Activity Fee" which is currently US$10 for each account per month. This could be different depending on account type or your country. If it applies, and you have several accounts that are inactive or trade infrequently, it will be a drag on your profit.

More details on how IB calculates the Minimum Activity fee is here :

http://ibkb.interactivebrokers.com/node/833

Richard

http://quant-coder.prokopyshen.com

http://www.fatwallet.com/forums/finance/1356377/

This has matched my experience:

linked accounts are not free based on total assets, but commissions are considered in aggregate to meet the $10/account Target. Trade a lot in one account and the rest are free regardless of size.

Simon, that's an amazing post.

I note you can create a linked subaccount from within the master account. I think this avoids any complications around accidentally creating a new security card.

I also creates a joint account for myself and my wife. I can log in to this via my same master account password and security device, but I note I can't transfer assets from my individual accounts to a joint account.

How exactly do you limit the privileges of the Q algo second logins?

On the account in question, Manage Accounts -> Access Rights -> User Rights -> ...

If you deposit or withdraw from your IB account unfortunately your algo will think this is due to its trading, so will affect the stats and make them meaningless.

I asked the Q support desk and Dan Dunn very kindly replied quickly. It's a limitation of the system. The work around is to stop and restart your algo, or do your returns analysis in Research, where you can correct for this.

Thanks! I was writing all of this code in an attempt to separate Quantopian positions from non-Quantopian positions in a single account but this is a far more elegant solution.