Automatic orders sent to your broker. Time to get serious with the specs....

Dear All,

We successfully tested placing orders automatically with Interactive Brokers. Still more testing to do and pass a certification test, but I see no major hurdles. So it’s time to come up with a minimal set of auto-trading specs that would be satisfactory.

Description

Auto trading will allow you to set up some parameters and have your Live Portfolio, R2G, or upcoming Book automatically traded in your broker. Once set up you will not need to do anything at all. There’s ONE set of parameters PER system.

Initial restrictions

-Interactive Brokers only at first
-Only day orders
-Only two kinds of orders: MARKET or BID-ASK-LIMIT (see below)
-All orders are ALL-OR-NONE
-Buy/Sell only for now (no Short/Cover)
-Any error whatsoever stops the auto-rebalancing for the user
-If there’s no cash execute one trade at a time: sell, buy, sell, buy ?
-Allow for a start time ? (like 30min after market open)
-Day of the week for rebalance ? (but only once per week)
-Merging stocks must be sold
-Spinoffs might cause errors (to be investigated)

MARKET order

Not much here. They are placed according to recommendations, we then wait for confirmation. Transaction price is stored , and next recommendation is sent. It’s assumed that market orders will get executed. If one does not it’s an error, and everything stops.

BID-ASK-LIMIT order

Set limit to current bid for sells, current ask for buys and send the trade. After X number of minutes change to current bid/ask. After Y number of tries, send order to the back of the queue, and try the next one.

Recommendations

  • Sell recommendations cannot be rejected. They will be sent according to the order type chosen.
  • Buy recommendations can be rejected if current ask is Z% above previous day close

That’s about it. This is a minimum set of parameters that I would want in order to start auto-trading a system. PLease offer suggestion/changes but only if you would consider them show-stoppers. Suggesting a different broker is not a show-stopper (sorry)

Thank you

Reject MLP type of partnership stocks automatically.

Marco,

Super exciting! Great. Very excited to have this.

First thoughts:

Most important are ‘controls’ so that system can never send an order for way too much of a stock. A friend of mine autotrades and once made 20% in a day because his autotrade system somehow bought 10X the proper amount. Luckily the day went his way.

I would suggest also an easy ‘on/off’ switch to manually turn off auto orders on a system if someone wants to or system seems screwy.

I would suggest that when using limit orders, there is a ‘cut off’ on both buy and sell orders where the current bid or ask is more than a certain % above or below the last close.

So…if the bid or ask for a stock has moved some extreme amount from previous close…say 10% in a day, up or down (or X times ATR(20) or whatever)…then it has to be traded manually.

I am imagining both the potential for really wide bid-ask on low-volume on thinly traded stocks or super extreme ‘news’ events here. A lot of P123’s have systems where this could happen (i.e. an extreme bid-ask spread for a day).

I have some systems where the bid ask can be really wide at some times during the day.

Other than that, sounds great. I would also suggest (wish list) that the system somehow keeps track of the ‘equivalent slippage’ from open for all filled orders…so that over time we have rolling records per system…for better forward modeling on P123.

Can’t wait for some definitive tests and ‘broker statements’ that end up showing actual slippage.

Best,
Tom

Marco:

Great news, very exciting. I agree with all of Tom’s suggestions.

What will the cost be for this service? (I already use IB so this could be very convenient if it’s reasonably priced).

Thx,
Ed

Hello Marco,

Great Work!!!

I am with interactive brokers.

If I want to be 100% invested, on rebalance (closing and initiating positions on rebalance) I have to first place the sell orders, then wait 3 days until the order is settled and the cash is in my account. Now I am able to place the buy orders.

This is unacceptable with weekly rebalance.
Therefore I had to open a margin account.
Now I can place the buy and sell orders on the same day.
After 3 days the the sell orders are settled and the cash is in my account just in time for the settlement of the buy orders.
So I actually do not use margin (or pay for it)

Regarding “-If there’s no cash execute one trade at a time: sell, buy, sell, buy ?”
does this mean that I have to wait 3 days until settlement?
Thank you very much,
Toby

Marco

I have 3 accounts with IB. They are (a) my pension account which has to be a cash account and is subject to the cash account settlement rules; and (b) a margin account of my own and (c) a margin account that I operate for my son.

Dealing properly with the cash account is vital.

In each of those accounts I invest a portion by different criteria. For example 20% in ‘Port 1’ 30% in ‘Port 2’ and 40% in ‘Port 3’ and 10% by non Portfolio 123 methods.

So autotrading would need to be able to recognise the proportion of each account it would have ‘permission’ to trade. That could, perhaps, be a figure that the user could update when required rather than being automatically calculated.

I’m not sure I’ve made this particularly clear but it’s still quite early morning in the UK!

Steve

When I trade my IRA account I have to sell before I buy. But I never had to deal with a 3-day settlement rule. I can sell and buy on the same day. I’ll check with IB but I’ve never seen that.

Steve, say your account is $100K. If you want to auto trade $60K with P123 in 2 portfolios you’d just create 2 “Live” ports in P123 each with $30K and flip the switch.

Now if you want to do other things with the $40K you’ll have to be careful not to use cash needed for the P123 ports.

Probably best to open a sub account entirely managed by P123 ports. I think you can do that with IB.

I am very much looking forward to using this feature. I currently use the IB basket trader, trading 30 minutes after market open. Sometimes a warning pops up when my requested equity trading volume is above the pre-set limit, and then you have to approve the trade. There may be other potential warnings that must be approved by the trader before the trade is executed. I wanted to mention this as something to consider when trading automatically.

Also, this may be obvious but we need the ability to trade odd lots.

–Stu

Marco,

I think you are right that 3 days settlement (T + 3) is more complex than posts up til now would suggest (at most brokerages). I think you can sell a stock then immediately buy a new stock. The new stock, however, has to be held for 3 days. So, I think, would work for most people trading weekly unless they wanted to use a stop loss.

For sure this is the case at TradeKing and I think most everywhere else. Folio Investing says it is not a problem at all there but I’m not sure the person I called really knew.

From the IB Web site:

"Cash proceeds from sales not available for withdrawal until settlement (generally 3 business days for stock, 2 for Forex and 1 for options). Unsettled funds may be used for trading

  • Cash proceeds from unsettled sales are available for trading as long as the subsequent purchase order does not settle prior to the sale order."

Regards,

Jim

Trades are required to be settled in the order that they were placed. Therefore a sell on Monday followed by a buy on Monday will, on Thursday, have the cash from the settled sell available to settle the buy.

The stop loss module will cause a problem if a buy on Monday is stopped out before it is settled on Thursday, and there is insufficient cash in the account to cover the Monday buy. Maybe you should limit stop loss rules to the sell rules, and not allow the use of the stop loss module.

This looks like a great time saver for trading my large cap Ports. I am very careful in trading my micro cap stocks after the market opens and, on average, I am able to significantly reduce my slippage. So I will continue to trade those Ports manually. You may need to have a minimum liquidity on the Ports that can be auto traded to avoid frequent trade failures or excessive slippage.

Since we now can convert a Sim to a Port starting in 1999, before we auto trade it we would need to re-create a Port starting with a current date so that the number of shares to be traded won’t be based on the Sim’s growth from 1999.

Denny :sunglasses:

I do not plan on autotrading but I would like to suggest that there be a mechanism that allows the user to view the future orders for a period of time prior to having them sent off to the broker say ~1 hour. This would give the user time to stop the orders if he/she feels that something is not right, or if you want to get fancy… make adjustments to the orders.

The Google driverless car has a passenger sitting in the drivers seat at all times, able to bypass the driverless mode. Same should hold true for autotrading, otherwise a lot of money can disappear, fast.

Steve

Marco - What is the status of R2G Hedging?

Marco,

This one’s on the ‘wish list’, but I would love to be able to set a strategy / system / portfolio level ‘stop loss’…if the strategy hits an XXX% Drawdown, no new positions will be bought and existing positions will be sold, unless I manually override and click a button. This would give me more piece of mind to ‘forget about’ an autotrade higher frequency system and really take a vacation.

Best,
Tom

Marco.

I actually think I had the settlement problem in a new cash account I just opened at IB. My other account which I have traded for years is margin.
This week I sold some stock, and the system wouldn’t let me place orders for the buys. I could understand this as the orders were placed out of trading hours. However, the next day, after the sells has gone through, the system wouldn’t let me place the buy orders again. The account page said I had plenty of cash, but ‘available cash’ was a small amount. I hadn’t had time to investigate, but if there is a 3 day settlement rule, this would make sense.

Hello Plantrader,

yes you have experienced what I have at interactive brokers.
I rung up the helpdesk and they told me about the 3 day settlement…

So you need to upgrade to a margin account.
then you can place sell and buy orders on the same day and be 100% invested.
You will not utilize the margin, because 3 days later the cash from the sell orders will be settled to pay for the buy orders.
But interactive brokers has set it up that way.

Might be that this is just for “new” interactive brokers accounts.

Marco, you do not need to worry about the 3 day settlement, we all just have to open a margin account and your autotrading tool has to allow these “pseudo margin” orders.

Thanks,

Toby

Toby,
For those of us with ‘pension’ accounts we can’t just ‘upgrade’ to margin - it’s not allowed in the UK or, I believe, the USA.
So it is a real and serious issue.
Steve

http://ibkb.interactivebrokers.com/tag/option-strategies?page=1

I’m able to sell and buy in the same day in foliofn. I believe I was able to do it on Tradeking as well. Really seems strange that regulations differ from broker to broker. I’m asking IB for precise rules.

Can anyone with a real IRA account on IB confirm this restriction? Maybe their website has not been updated :slight_smile:

But IB offers “IRA-margin”. Never seen that before. Didn’t think that was possible. So they are overly conservative on the “IRA-cash” accounts, but allow leverage on “IRA-margin”.

I can confirm 3 day settlement on cash account, IB do have some funny ideas, another thing they insist on is logging out of the platform once every 24hrs (this will effect autotrading, so clients need to be aware of this)… P123 users using autotrading should use a margin account. problem solved and there are ways around the logout issue.

I can confirm 3 day settlement on cash account, IB do have some funny ideas, another thing they insist on is logging out of the platform once every 24hrs (this will effect autotrading, so clients need to be aware of this)… P123 users using autotrading should use a margin account. problem solved and there are ways around the logout issue.