November 28, 2026 · execution

Your Backtest Rebalanced at 4 PM. The Portfolio Couldn’t.

Your Backtest Rebalanced at 4 PM. The Portfolio Couldn’t.

4:00 p.m. is the NYSE closing bell. 3:50 p.m. is the usual deadline for entering a market-on-close order on NYSE-listed stocks. 3:55 p.m. is the usual deadline for cancelling or correcting one. And the official closing price can still differ from the price on your screen a minute before the bell.

That timing creates a surprising backtest result: a portfolio that calculates its rebalance from the 4 p.m. close and fills every order at that same close has used a price it could not know when it had to commit. It has a valid accounting convention, but not a tradable execution model.

Why does a closing-price rebalance fail the clock test?

Imagine your strategy ranks stocks using each day’s closing price, then sells the bottom decile and buys replacements at that close. The final close is an input to the ranking, so the ranking cannot be complete until the auction determines that price. But the market-on-close order deadline came earlier.

Submit before the cutoff, and you can participate in the auction, but your decision must use information available at submission time. Wait for the official close to calculate the signal, and you have missed the auction. Filling at the close anyway grants the strategy both the final price and a chance to trade at it.

This matters most when the signal is sensitive to the last few minutes: close-to-close momentum, end-of-day volume, or a ranking where several names sit near the buy/sell boundary. A tiny price change can flip membership. The auction is where that final price is discovered, not a magic point at which an order can be formed retroactively.

What can you actually trade?

The answer depends on when the signal becomes available and which order types your broker and venue support. Treat the order deadline and price source as part of the strategy specification. Exchange schedules can change, and early-close sessions have different clocks, so verify the rules for the venue and date rather than hard-coding a time from memory.

Signal is readyPossible executionWhat the backtest must account for
Before the auction order cutoffSubmit a market-on-close or limit-on-close order, if supportedUse only pre-cutoff information; model auction fills and imbalance risk
After the cutoff, before the closeTrade continuously, if the market is still openUse an available price, with spread, impact, and any applicable fees
After the official closeTrade in a later session or at the next session’s openCarry exposure through the gap; model the next available execution

A closing auction can offer substantial liquidity, but liquidity is not a guarantee that every order gets the price you want. A market-on-close order commits you to the auction outcome. A limit-on-close order caps the acceptable price and may not fill. If you trade before the auction, you give up the official closing print and take the spread and impact of the continuous market.

How should I model a daily rebalance?

Start by writing down the decision timestamp, the last data timestamp allowed into the signal, the order submission deadline, and the assumed fill event. Then make the backtest enforce that sequence.

For example, suppose a daily signal is ready at 3:45 p.m. Eastern and uses data through 3:40. The strategy can submit eligible closing-auction orders before the deadline. It should not use the eventual close to select those orders. If the signal needs the completed daily bar, shift the trade to a later executable point, such as the next session’s open, and include the overnight price move and execution costs.

In a simple daily-bar backtest, next-open execution is often easier to defend than same-close execution. It is still an approximation: the opening auction has its own order deadlines, and a strategy cannot assume it gets the open without accounting for participation and capacity. More granular data can improve the timing model, but it cannot rescue a signal whose required input arrives after its order deadline.

Keep the clocks in the trade record. Store signal-ready time, order-submission time, venue cutoff, execution time, and execution price. When a paper fill differs from the backtest, those fields help distinguish a timing defect from ordinary price movement.

What is the honest benchmark?

Compare the strategy under at least two coherent rules: a pre-cutoff signal participating in the closing auction, and a post-close signal trading at the next available session. Keep fees and market impact in both cases. If performance changes sharply, the strategy may depend on the fictional convenience of knowing the close before trading at it.

And check the calendar. A normal-session cutoff is wrong on an early close, and a timestamp stored as UTC can conceal an Eastern-time deadline or a daylight-saving shift. These are ordinary data-engineering details; they become strategy rules as soon as a backtest relies on them.

The official close is a useful benchmark and a real auction price. It just becomes a misleading fill when the strategy needs that same closing print to decide what to trade.

portfolio rebalancingmarket-on-closebacktestingorder execution
← All posts