The official close in an equity file looks like any other price. Timestamp 16:00:00 Eastern, one number, ready to fill. Daily signals mark it. Rebalances hit it. A research agent will treat it as a quote that was sitting on the book, waiting for you.
The close is an auction, not a quote. It is the uncrossing price of on-close orders that had to be accepted before a cutoff. If the backtest filled there without joining that batch, it took a print you would not have been part of.
Filling 16:00 as if the uncross were a market order
The usual shortcut is: compute the signal at or just before the close, fill at the official close, stamp 16:00. On a quiet Tuesday in AAPL the lie is a few cents. On the days that dominate a daily-rebalance book, it is the whole trade.
At 16:00:00.000 the closing cross is running, or has just run. A marketable order you send then does not go into that cross. It lands in whatever is left: leftover displayed size, an odd lot, extended hours on ARCA or Nasdaq. That print can be two cents away from the official close, or forty basis points, and it is a different liquidity pool. On a Russell reconstitution, a month-end, or a triple-witching Friday the close is often a double-digit share of the day's volume. That was the liquidity. You were not in it.
We paper-traded this by accident. A parameter tweak landed at 15:48. The backtest still filled every name at the official close. The OMS sent ordinary market orders at 16:00:03 because nobody had wired MOC. After-hours prints, a handful of rejects, and a 19 basis-point shortfall versus the file on a day the file said we were flat to the close. The strategy had not broken. The fill rule had.
I still think of 15:49 as a physical place. Someone is changing a weight. Someone else is watching the clock. The cutoff does not care which of you is right.
MOC is the order that actually requests that uncross, and even MOC is not a promise. A halt, an LULD pause, a cancelled auction, a name that never opened: you can be flat at 16:00 with a working on-close that dies. LOC is allowed to miss entirely. If the uncross is $40.12 and your limit is $40.00, you own nothing. Plenty of backtests still book the close.
Worse, some vendor files store a composite close that never printed on any one venue. You cannot join a composite. If the strategy would have sent NYSE MOC, the fill that matters is the NYSE uncross, in the size the auction would have absorbed.
Calling the last regular-hours print the close
Some pipelines refuse the official close on principle and take the last SIP print before 16:00, because that print at least "happened." On a mega-cap, last and official often sit a cent or two apart and you will not notice. On a mid-cap the last print can be 200 shares at 15:59:51, signed by whoever lifted a leftover display. The official close two seconds later is a million-share uncross at a different price.
The index, the ETF creation basket, and every MOC rebalance traded the uncross. Your backtest traded the leftover. And a last print does not come with your size attached. If that print is 400 shares and your clip is 5,000, you did not get that price. You got a timestamp that happened to be last.
I have seen a mid-cap file where last-print versus official close moved 28 cents on a rebalance Thursday. The backtest that used last looked more "microstructure-aware." It was just a different, thinner market, and it still assumed we could have been those 200 shares.
Sliding the fill to tomorrow's open to be conservative
The third dodge shows up in code review as a comment: don't assume we can trade the close, so fill the next open. It sounds adult. It builds another strategy.
A close-to-close signal executed at the next open has eaten the overnight gap. For a lot of equity factors that gap is a large piece of the move you thought you owned. Filling the open does not make the backtest careful. It relocates the P&L into a session you did not set out to trade, and it drops you into an opening auction you also did not model.
On paper the wreckage is easy to misread. The backtest's daily P&L still lines up with the signal. The paper book holds a night of index gap and a morning of opening-cross slippage. People then argue about implementation shortfall when the honest description is that the two systems are not doing the same trade.
But the open is an auction too. If you missed yesterday's cutoff, you do not automatically get a clean 9:30 last. You get MOO/LOO mechanics, an imbalance, and a gap. Calling that a conservative close fill just hides a second unmodeled cross under a virtuous comment.
| Fill you booked | What the venue actually needed | What the wreckage looks like |
|---|---|---|
| Official close, no order type | MOC or LOC accepted before that venue's cutoff | After-hours print, a reject, or a composite price nobody hosted |
| Last SIP print before 16:00 | A trade you could have been, in your size | A 200-share leftover treated as a clip fill |
| Next open as a "safer" close | An opening-cross model, plus the overnight gap | A different strategy, still an auction, still missed |
The honest split is small. Either the research contract says we are in the close, in which case the order is on-close, timestamped before 15:50 on NYSE or 15:55 on Nasdaq, sized against expected close volume, and allowed to expire unfilled if it is a LOC. Or we are not in the close, in which case after-hours or next-open is a named policy with its own auction, and the equity curve stops wearing a 16:00 label.
We now fail a backtest that books the official close without an on-close order sitting inside the cutoff for that venue. It has killed some pretty daily-signal curves. Those curves were never executable at the price they claimed.
← All posts


