NYSE close vs futures close: setting the session in a backtest
The stock market closes at 16:00 Eastern Time, while ES and NQ futures trade until 17:00 Eastern Time. Choose one close that fits the strategy, define every time in New York or Chicago time rather than UTC, and check early close days and daylight saving weeks in the trade list.
By Soren Huang · Published · updated · Editorial policy
Contents
- When does the stock market close, and when do index futures close?
- Which price should the daily bar use: cash close, settlement or last trade?
- What happens on early close days?
- Where should end-of-day exits go?
- How does daylight saving time shift the close?
- How do you check the session settings in a backtest?
- Frequently asked questions
When does the stock market close, and when do index futures close?
The NYSE's regular session closes at 4:00 p.m. Eastern Time (ET). ES and NQ futures trade almost around the clock and stop at 5:00 p.m. ET. In a backtest, choose one close and use it everywhere. Use 16:00 ET if the strategy follows the stock market day. Use 17:00 ET if it trades the full futures session.
The New York Stock Exchange holds its regular trading hours from 9:30 a.m. to 4:00 p.m. ET, Monday to Friday. Regular trading hours (RTH) are the official session in which the exchange runs its opening and closing auctions and sets the closing prices of stocks. Stocks also trade before 9:30 and after 16:00, but those extended sessions are thinner. The official close of the stock market is 16:00 ET.
E-mini S&P 500 (ES) and E-mini Nasdaq-100 (NQ) futures trade on CME Globex from Sunday 18:00 ET to Friday 17:00 ET. Each weekday they pause between 17:00 and 18:00 ET. The maintenance break is the daily hour in which the exchange stops trading to run end-of-day processing. When trading resumes at 18:00 ET, a new trade date begins. A trade date is the exchange's business day, and it starts the evening before the calendar day it is named after. For example, the Sunday evening session belongs to Monday's trade date.
So a futures backtest has two candidate "closes" each day: 16:00 ET, when stocks close, and 17:00 ET, when the futures trade date ends. Neither one is wrong. The mistake is mixing them, for example by building daily bars on one and placing exits on the other. For the other settings to fix before a first test, see ES and NQ futures backtesting: five things to set first.
Which price should the daily bar use: cash close, settlement or last trade?
The daily bar should match the session the strategy actually trades. That decision changes the open, high, low and close of every bar.
The cash close is the 16:00 ET closing value of the stock index, such as the S&P 500, calculated from the closing prices of its stocks. The settlement price is the official daily price the exchange sets for a futures contract, and brokers use it to mark open positions and calculate daily gains and losses. For ES and NQ, CME bases the daily settlement on trading just before 15:00 Central Time, which is 16:00 ET. The last trade of the futures session comes later, just before 17:00 ET. Some data feeds use the settlement as the daily close. Others use the last trade. Check which one your feed uses.
| Daily bar definition | Starts | Ends | Close price | Fits |
|---|---|---|---|---|
| Futures trade date (full session) | 18:00 ET the evening before | 17:00 ET | Last trade before 17:00, or settlement | Strategies that hold overnight or trade the night hours |
| Regular trading hours | 9:30 ET | 16:00 ET | Last trade at 16:00 | Strategies tied to the stock market day |
| Calendar day (midnight to midnight) | 00:00 in the data's time zone | 24:00 | Last trade before midnight | Rarely matches any exchange session; avoid it for futures |
The choice also changes every indicator calculated on daily bars. A 20-day average range or a daily moving average gives different values on full-session bars than on RTH bars, because the overnight hours fall inside the bar in one case and are left out in the other. The trade-off between day-only and full-session bars is covered in night sessions in futures backtests.
Hypothetical example
An ES strategy exits every position "at the daily close." On one day, ES trades at 5,000.00 at 16:00 ET. A large technology company then reports earnings after the stock market closes, and ES trades at 4,988.00 at 16:59 ET. With the RTH close, the exit price is 5,000.00. With the full-session close, it is 4,988.00. The difference is 12 points. ES is worth $50 per point, so the difference is $600 per contract on this one trade. The strategy and the data are the same. Only the definition of "close" changed.
What happens on early close days?
A few times a year, the NYSE closes at 1:00 p.m. ET, and an exit rule written as a fixed clock time will not trigger on those days. The usual early close days are the day after Thanksgiving and Christmas Eve when it falls on a weekday. In some years, the day before Independence Day is also an early close day. Check the NYSE calendar for each year in your test. CME equity index futures also have a shortened session on these days. Take the exact end time from the CME holiday calendar for that date.
Here is how the error shows up. A rule that exits at 15:55 ET finds no bar at 15:55 on the day after Thanksgiving. The position stays open over the weekend, even though the strategy is meant to be flat every night. The trade list shows one long trade with a large result that the strategy was never designed to take.
- Express the exit relative to the session end, for example "five minutes before the session closes," if your software supports it.
- If it does not, add the early close dates to the session calendar so the backtest knows each day's real end.
- After the test, sort the trade list by holding time. Look for trades that stayed open across an early close day.
Full holidays cause related problems, such as missing days and unusual reopenings. These are covered in market holidays in backtests.
Where should end-of-day exits go?
Put the end-of-day exit where your data shows that a fill is realistic, and make the slippage assumption match that time. The three common choices behave differently.
| Exit time (ET) | Why traders use it | What to check |
|---|---|---|
| 15:50–15:55 | Flat before the cash close; trading is usually heavy | With next-bar execution, the signal must come one bar earlier |
| 16:00 | Matches the cash close and the settlement | Whether your data has a bar that ends at 16:00 and how it is labelled |
| 16:45–16:55 | Flat before the futures maintenance break; for full-session strategies | Trading after the cash close is thinner, so use more slippage; news after the close also falls in this hour |
Bar labels matter here. Many platforms label a bar with its end time, so a 5-minute bar labelled 16:00 covers 15:55 to 16:00. Other platforms label bars with the start time. Next-bar execution is a fill rule that places an order at the open of the bar after the bar that produced the signal. With end-time labels and next-bar execution, a signal at the close of the 15:50 bar fills at the open of the next bar, around 15:50. Write down the convention once and check one trade by hand.
Also define every exit time in the exchange's time zone, either New York (ET) or Chicago (CT), and never in UTC. CT is always one hour behind ET because both change their clocks on the same dates. UTC never changes, so a fixed UTC time moves against the market by one hour for part of the year. Exits after the cash close also need higher cost assumptions, as explained in trading costs in backtests.
How does daylight saving time shift the close?
The NYSE always closes at 16:00 New York time, but in UTC and in Taiwan time that close moves by one hour twice a year. US daylight saving time starts on the second Sunday in March and ends on the first Sunday in November. During daylight saving time, 16:00 ET is 20:00 UTC. In winter, it is 21:00 UTC. Taiwan does not use daylight saving time, so the close moves for Taiwan-based traders as well.
| Event (ET) | UTC, summer | UTC, winter | Taiwan, summer | Taiwan, winter |
|---|---|---|---|---|
| NYSE open 9:30 | 13:30 | 14:30 | 21:30 | 22:30 |
| Cash close 16:00 | 20:00 | 21:00 | 04:00 next day | 05:00 next day |
| Futures trade date ends 17:00 | 21:00 | 22:00 | 05:00 next day | 06:00 next day |
| Futures reopen 18:00 | 22:00 | 23:00 | 06:00 next day | 07:00 next day |
Consider an exit fixed at 20:55 UTC. In summer it executes at 16:55 ET, inside the last futures hour. In winter it executes at 15:55 ET, before the cash close. One rule produces two different strategies, and the backtest blends their results into one equity curve. Europe changes its clocks on different Sundays (the last Sunday in March and in October). For a few weeks each year, the gap between London and New York is therefore four hours instead of five. This matters if you combine data or rules from both regions.
How do you check the session settings in a backtest?
Check the session against the data itself and then against the trade list, because a wrong setting usually looks normal in the equity curve. Follow these steps in order:
- Find the time zone of the timestamps. Locate the maintenance break. On a daily schedule in ET, there should be no bars between 17:00 and 18:00. If the data is in UTC, the gap should move from 21:00–22:00 in summer to 22:00–23:00 in winter.
- Confirm the bar label. Check whether the last bar before the break is labelled 17:00 (end time) or 16:59 or 16:55 (start time, depending on bar size).
- Check the cash close. On a normal day, trading activity in ES usually jumps in the last minutes before 16:00 ET. If that jump appears at another hour, the time zone setting is off.
- Open an early close day. On the day after Thanksgiving, confirm the last bar and confirm that end-of-day exits happened that day.
- Open a daylight saving week. Compare exit times in the trade list during the week before and the week after the second Sunday in March. In ET they should be identical.
- Group exits by time of day. End-of-day exits should cluster at one ET time. Two clusters one hour apart point to a daylight saving problem.
In AlphaPrime (Valynox), trading sessions, data resolution and next-bar execution are part of the backtesting research scope. Set them before a strategy search so that every candidate is judged on the session you intend to trade.
What this means if you use AlphaPrime: decide between the 16:00 ET and the 17:00 ET close before you start a search, then confirm exit times in the trade list of the Performance Report on an early close day and in a daylight saving week.
Frequently asked questions
What time does the New York Stock Exchange close?
The NYSE's regular session closes at 4:00 p.m. Eastern Time, Monday to Friday, after opening at 9:30 a.m. On a few early close days each year, such as the day after Thanksgiving, it closes at 1:00 p.m. Stocks also trade in extended sessions, but 16:00 ET is the official close.
What time do ES and NQ futures close each day?
ES and NQ futures stop trading at 17:00 ET, pause for a one-hour maintenance break, and reopen at 18:00 ET for the next trade date. On Friday they close at 17:00 ET and reopen on Sunday at 18:00 ET. Their daily settlement is based on trading just before 16:00 ET, the same time as the stock market close.
What time does the US stock market close in Taiwan time?
The 16:00 ET close is 04:00 the next morning in Taiwan during US daylight saving time and 05:00 in winter. Taiwan does not change its clocks, so the gap changes on the second Sunday in March and the first Sunday in November. Futures stop trading one hour later, at 05:00 or 06:00 Taiwan time.
Is the futures settlement price the same as the last traded price?
No. The settlement price is set by the exchange from trading around 16:00 ET. The last trade of the ES or NQ session happens just before 17:00 ET. The two prices can differ, especially when news arrives after the stock market closes, so check which one your data uses as the daily close.
What AlphaPrime does here
AlphaPrime's backtesting includes trading sessions, next-bar execution, fees and slippage in its research scope. The Performance Report lists every trade, so you can check exit times against the session you set.

