Trading at the open

So I’ve been trading my p123 strategies using Market-on-open orders for quite some time now for the usual sort of reasons:

  • 100% mechanical so I want in no matter what, even if there’s a gap up
  • Better liquidity on-open than at any given moment during the day (and I have liquidity limits in my ports)
  • don’t want to chase prices
  • have a day job, would rather set-and-forget than have trading screens open at work
  • seems more repeatable and much closer to what the system was backtested against

Now this has worked great for the last couple of years or so, very small deviations from the previous close usually, and generally all in line with overall market moves; but yesterday (Mon 10th May), for the first time, I got stung by a huge instantaneous move just during the opening auction.

Ticker was TPCG, routed to ISLAND ECN, trade went through at 14:30:00 UK time so exactly on the open, but at a price of 90.99 rather than the $15-16 prevailing price of the previous close and immediately after (by the time the position appeared on my trading screen I was already down 80% on the trade) I managed to get it busted without any issues, but I’m left wondering what happened there, hence this post…

So my question is mainly, can any of you tell me what probably happened (was it just a very short-lived lack of liquidity, or maybe a timing issue at the exchange? or maybe someone saw my order and did something deliberate to make this happen?), was this a very rare occurrence or have I been incredibly lucky (and stupid) to trade MOO orders thus far? And if I am using them inappropriately, what are they usually for?

And does this mean I should learn from this and only use limit-on-open from now on? (but this presumably means depending on where I set the limits, I might have to miss out on trades where there’s a gap up, or an overall market move upwards etc?)

Thanks all!
Dan

Dan:

There have been instances of this problem discussed in the forum in the past. I had a similar experience with KNDL in 2005 that started a somewhat dated discussion of trading alternatives here . A search of the forum will turn up more instances. I recall that Stittsville123 had a similar experience but can’t find the post.

I think that most folks here use limit orders. I think limit orders would meet your constraints. Here is what works for me. I set the limit at the P123 recommendation, which is close(0) and find that 80% of the time I get filled on a buy at either the open (40%-50%) or the intraday low. Works the same for sells and an intraday high. The remaining 20% I buy or sell at the close. I was surprised that the result was so consistent over my models and confirmed with backtesting. Actually getting the recommendation 80% of the time limits slippage for me.

Glenn

http://www.portfolio123.com/mvnforum/viewthread?thread=2837&offset=30
I put in an order to sell 1000 shares of ATS (APT Satellite Holdings) at market this morning (before the market opened). It is listed as a NYSE stock. Average daily volume is over 100K. Yesterday’s close was $2.57. Today’s opening was listed as $2.55.

I was filled at $2.16. I phoned my broker and complained about the fill and the response was that the opening price of $2.55 is a composite of all exchanges. The opening price of $2.16 really was the opening price on the NYSE.

Now I went to the NYSE.COM web-site. The graph does not show trades down at $2.16 for any time period but the low for the day is listed as $2.16.

Until the last year or so I never had problems using market orders at the open. Now my broker has gone to deep discount commissions and I am seeing this kind of fill all the time. I am wondering if my broker is ripping me off or is this normal behavior for NYSE stocks. This trade alone cost me a fair amount of money.

[b]JP Kernot had exactly the same problem as me on this stock as he was trading the same system.

By the way my fill was bad on the buy side as well…[/b]

Hi,
I can’t even find this stock. Yahoo says: ATS is no longer valid. It has changed to APPTY.PK. So I am not clear if you mean that it trades more than $100K per day or more then 100K shares per day. Either way I would say this is not nearly liquid enough to be trading market orders. I use $100K/day as a minimum and I’ve been caught in a stock where the spread widened to 25% - for days. Tough to overcome that kind of slippage.

In any case, I use limit orders almost exclusively, and I find that not only do I never get filled worse than my limit, many times I get filled at better prices. I would rather miss a trade then have a bad fill. You just have to understand your system well enough so that you know where to set your limit order. For a time I was trading with a limit order near the prior close, and I missed some trades that opened higher and never looked back. In looking at this further it turns out that if I had lowered the limit order I would still get many trades and at a higher profit per trade, or if I raised the limit order I would catch more of the trades that took off and often be filled below my limit order on other trades. For this strategy at this time, either adjustment was an improvement.

Don

PS. Based on Europe and the Futures markets, it is often possible to predict whether the market will be opening up or down. I’m sure there is some additional edge to be gained by adjusting orders based on expectations for the market opening. I have not gone this far.

Stitts - was it not possible to do what Dan did and have the trade busted?

The NASDAQ guidelines for “erroneous trades” indicates that for a stock under $25, a trade 10% away from the prevailing price is “erroneous”: Equity Regulatory Alert #2009 - 19 NASDAQ OMX Modifies Rules to Identify Clearly Erroneous Filings

For the broker just to fob you off, doesn’t seem right. I don’t think one should be in the habit of busting trades, but clearly if you have been “ripped” you do have the right to do something about it no?

Don - that trade was a couple of years ago and at the time I was under the impression that if you put in a market order on the NYSE prior to the start of trading you were guaranteed the opening price (and a rational price). However that doesn’t seem to be the case. Now I don’t use market orders unless the stock is extremely liquid.

Steve

For those that can’t be around for the open yet still want to re-balance their portfolios with a limit order - TDAmerica and others offer a OTA (One Trade Triggers Another) type of order. You can place a Limit Sell order and then a Limit Buy order in a single OTA trade ticket. The Buy does not trigger until the Sell executes. You don’t have to be in front of a computer to make the 2 trades. Of course, if your Sell doesn’t go off at the Limit price the Buy won’t execute as well.

Thanks all, some very interesting food for thought there;

in summary then:

  • seems that perhaps in the past this was much less of an issue - happening a lot more now:
  • some limit order strategies discussed, in particular:

Actually looking back through the port I’d started on that Monday, I noticed I’m down on some other positions that a cursory glance at the chart suggests should be up from Monday’s open - not sure I can be bothered to dig into the details, but seems like quite possibly at least one or two more were bad fills - just not spectacularly bad and I never really noticed due to the market having gapped up that day (and being rather busy trying to sort out the one that prompted this thread :))

So ok, I’m buying into the idea that market on open orders are just no-go these days; even if they’re supposed to guarantee you the open, as I thought too, this is evidently not working at the moment, or in general - and as olikea says, getting into the habit of busting trades is no way to run a strategy.

But I’m still left with the issue dwpeters mentions (and I completely agree with this):

And I can’t say that I do really - as far as I know there’s no way to go back through sim data and ask questions like “what’s the effect of deleting all trades that gapped up >5% on the day they were bought?” (and so who’s to say those aren’t the most profitable or whatever?)

So what to do what to do - gfagerlin’s idea is intriguing as he says it seems to work well in practice… I’m not sure I understood fully though - if you put in a limit order surely you should get a fill at either the open price (if it’s below the previous close) or at the limit price (if it gaps up then falls to your limit price in the day) - how are you getting fills at (or near or whatever) the intraday low?
(I take it these are limit-day orders you’re talking about, rather than limit-on-open btw?)

I’m also vaguely pondering investigating some of the ALGO order types IB offer (those of you using IB), as I guess at least some thought has gone into those magic black boxes, as compared with say me just choosing some fairly arbitrary limit order based strategy… :\

dsmudger:

I use excel (with historical of prices) to further backtest entries and exits. I can determine if a limit order would get filled at the open (assuming liquidity) based on the open price and the limit price. I can also determine if the limit order would get filled at a low during the day (assuming it was not filled at the open) if the low is less than the limit price. I was surprised that backtesting showed that a limit order set at close(0), the P123 recommendation, was filled at the open, or the low, around 80% of the time for buys, and the same for sells, except I look at the high rather than the low. I have tested a bunch of strategies including most of the better P123 public strategies and found a remarkable consistency where almost all strategies fit within the 80% mentioned above.

In trading this way for a couple of months, the actual fills follow the backtesting I have done and this has convinced me that the trading method works, at least for me and my strategies.

This is somewhat system dependent so it is important to understand your system. I have tested a few strategies that are improved by just buying at the open, regardless of price, but I personally do not have the courage to trade market orders. These strategies also do well with limit orders and the increase in performance is not worth the risk to me since I doubt that I would really get filled at the open and actually get the increased performance with market orders. I would rather be more certain of my entry.

Some “gut feel” / observations, not supported by backtesting:

If the stock gaps up or is rising, I think it may be best to just buy in rather than wait for the close to buy as I used to do. Same for a sell if it gaps down or is trending down.

A lot of the trades around the low (buy) or sell (high) occur midday, lunch time in NY.

A little flexibility, like a penny or two, seems to improve the 80%.

It seems that there is a strong tendency for shares to be available at the previous close. Even if the open is a bit higher there often are trades below the open in the first ten minutes that seem to get my limit order filled quite often.

Maybe others have more insights.

Glenn

Intriguing thread - I am grappling with the same issues for open order execution and like the concept of putting in a limit order at yesterdays close and am considering using that approach.

However, I was curious to know what percentage of the time a stock’s low today will trade at or below yesterday’s close so I did some testing and came up with the following:

Using the current Quotes Plus database and testing over the last 5 years the percentage of the time that a stock’s low will be at or below it’s prior close is 88.5% - that is with filtering out trades in OTC stocks, ETF’s, and stocks with an AvgDailyTot(50) < 100K. Over the last year it is 87.6%.

Robert:

Interesting data. Thanks for sharing it.

The problem I see is that a limit order at yesterday’s close will be filled if the stock opens at or below yesterday’s close. You get filled, the game is over for that trade and the days low does not come into play. Can you test how often today’s open is at or below yesterdays close?

If you do not get filled at the open (today’s open > yesterday’s close) then the low for the day comes into play. Can you test today’s open > yesterday’s close and today’s low < yesterday’s close? If this is around 80% it confirms my testing of models.

I find around 40% fall in the first category and 40% in second with 20% failing the tests, but I am testing specific system backtest trades over the last 5 years, not the overall market. Your results seem to indicate why my results appear to work. It is good to have results that support each other.

Glenn

Glenn,

The purpose of the test I ran was to determine the approximate percentage of time that a limit order placed at yesterday’s close would trigger. Most of the sims I trade perform better when I use previous close vs. today’s open. A limit order at the previous close would either get you in at the close price or better (positive slippage if it gaps down), or it will gap up and never hit the limit and thus no entry. I wanted to quantify the amount of time there is no entry. The questions you are asking break down the types of entries that would occur into two categories - those that execute at around the close price (mostly intraday unless the open is the same as the previous close) and those that execute below it at the open on a gap down

So to answer your questions:

Over the last 5 years . . .

52.7% of stocks open lower than the previous close giving you positive slippage.

35.8% of stocks open higher than the previous close then sink intraday to at least the previous close or lower.

Add them together and you get the 88.5% number from my last post.

Rob

OK - the stocks that don’t go below yesterday’s close tend to be high flyers. How about comparing the average gain between the open and close for the next day’s trading; those that touch previous close versus those that don’t?

Steve

Rob:

Thanks for the information. This is about what I found. What it means to me is you get filled about 80% of the time with a limit set at yesterday’s close. As you point out you will have 0 to positive slippage at the open and 0 slippage intraday. That’s pretty good.

On Steve’s question, I have tested this on a lot of sims and my observation is that you are better off just buying in at the close for the orders that are not filled. Of course this is going to be negative slippage but the end result is a better overall return. These stocks tend to be the high flyers and buying at the close is generally better than waiting another day with the same limit, trying a new limit for day 2 or just not making the trade.

Glenn

Just to take a step back and think about exactly what we’re trying to avoid here (or at least my agenda here: get in asap even if there’s a gap up, but avoid short-lived/instantaneous on-open spikes/discontinuities).

So it just occurred to me - what about market orders placed before the open, but with a time-in-force set to ‘DAY’ rather than ‘OPG’, and set to ‘hidden’ - so you’d miss the opening outcry, but in doing so avoid any weird spikes that might happen, and basically be part of the first trade of the day…

Any thoughts on that/anyone reckon that might work?

(and as a more advanced version one can imagine some sort of one-triggers-another scenario where there’s a limit-on-open order that trades in the opening outcry if it’s below some limit, but if that doesn’t execute, a DAY market order is triggered just after the open)

Another thought - does anyone know if there exist order types whereby one can set a limit on the total transaction $ amount, but leave the trade price unrestricted? (so a gap up would result in fewer shares being bought, thereby limiting impact of large market moves etc)

Steve,

I agree. Almost by definition, the stocks that gap up and do not close the gap intraday will have better open to close performance.

I ran it and here’s the numbers again over the last 5 years:

Average gain/loss for stocks that open above yesterdays close and the low is also above yesterday’s close is 1.82% (open to close).

Average gain/loss for stocks that open above above yesterdays close but trade down at least that far during the day is -0.89% (open to close).

Rob

Daniel,

Assuming you are using a direct access broker, like Interactive Brokers, I don’t think that would work very well. I watch the quotes and do manual executions most days and with most of the stocks I tend to trade the bid/ask spreads are very wide at the open and gradually narrow down by 9:50 - 10:00. These wide spreads early on would eat into your edge significantly over time.

Rob

Robert - what is important is the stats on the fish caught versus the fish that got away. We know that placing a limit order at yesterday’s close will fill ~80+% of the time. What is the Close/Open gain for these stocks, not just the ones that gap up then fall?

Steve,

I understand that you will lose some gains not getting in on the open of some high flyers. However, it is my experience that stocks that are bought on short term weakness will perform better in the immediate future than stocks bought on strength. My gut says I’d rather wait and get in on a pullback . . . unless you believe your ranking systems are getting you in at the open on the day a stock will launch off the pad . . . .

However, the numbers look to be in your favor. For all trades in the last 5 years using a limit order at the previous close, the average gain/loss from the limit price to today’s close (for the trades that execute) is 0.08% vs. the one day return from open to close of the stocks you would miss with a limit order (open and low are greater than previous close) of 1.82%. Of course these are one day reutrns . . . .

Rob

All:

Interesting results. I ran some tests to see if I could quantify the price you could expect for the limit orders (using prior close) filled at the open. How many get filled at the open=prior close limit. I got 23%. How many get filled below the limit, since the stock opens lower than the prior close limit? I got 72% filled below the open. The amount below the open for these averaged 1.49%. The average is 1.15% for all the trades filled at the open.

I think the test is meaningful even if it was one system. There were 2200 trades over 5 years with 54% filled at the open, 34% at the low and 12% not filled - remarkably close to Rob’s results for the overall market.

All of this seems to suggest to me that using a limit order set at the prior close greatly reduces or maybe eliminates the slippage I thought was inherent in the difference between the prior close and the open prices in the market. I get slippage less than 0% (-.41) using the data/insights above and weighted averages from below:

Todays open <= yesterdays close - negative slippage for 52.7% of trades of -1.15%
Todays low <= yesterdays close - no slippage for 35.8% of trades. Slippage = 0%. Market comes to your limit.
Todays open and low > yesterdays close - slippage for 11.5% of trades of 1.82%, if you buy at the close today. Slippage = .21% (1.82 * .115, this may be a bit off since the 1.82 is the open to close not prior close to close)

Maybe slippage is our inability to trade perfectly rather than market issues one can’t overcome? A word of caution. I don’t think slippage will not be a factor and I would suggest to anyone that slippage of .25% to .5% is wise when running sims. As this discussion has evolved, I do think there are insights that are valuable. For example, I never tried to quantify the benefit of a lower open when using a prior close limit order, Buying 1.15% lower than my target on 54% of the trades is a big deal to me.

Glenn