VALYNOXSTRATEGY RESEARCH TECHNOLOGY
AlphaPrimeAlphaPrime
TRADING RESEARCH CLUB / Markets and trading sessions

After-hours trading explained: hours, liquidity, backtest pitfalls

After-hours trading runs before 9:30 a.m. and after 4:00 p.m. Eastern Time, with fewer traders, wider spreads and bigger price jumps. A backtest that includes it needs its own session settings, higher slippage and data checks.

By · Published · updated · Editorial policy

Contents
  1. What is after-hours trading?
  2. What are the pre-market, regular and after-hours times in the US?
  3. Who trades after hours, and why is liquidity thin?
  4. Why are stock after-hours data hard to trust in a backtest?
  5. How do gaps and wide spreads change slippage and fills?
  6. Are futures a better way to research extended hours?
  7. How do you include extended hours in a backtest, step by step?
  8. Frequently asked questions

What is after-hours trading?

After-hours trading is buying and selling stocks after the regular US session closes at 4:00 p.m. Eastern Time, usually until 8:00 p.m., with a separate pre-market session before the 9:30 a.m. open. Fewer traders take part, so spreads are wider and prices jump further. For backtests, this means patchier data and higher slippage than daytime bars suggest.

Extended-hours trading is the general name for both windows together, pre-market and after-hours. Think of the regular session as a busy market square at noon and the extended hours as the same square at night. The goods are the same, but there are only a few sellers, so you pay more and sometimes find nobody to trade with.

What are the pre-market, regular and after-hours times in the US?

The US stock market day has three windows, and the regular session is the only one every broker supports. All times below are Eastern Time (ET), the time zone of New York.

WindowTypical time (ET)What happens
Pre-market4:00 a.m. to 9:30 a.m.Reactions to overnight news and early earnings reports. Many brokers open their pre-market access later than 4:00 a.m.
Regular session9:30 a.m. to 4:00 p.m.Full participation. The opening and closing auctions set the official open and close.
After-hours4:00 p.m. to 8:00 p.m.Reactions to earnings and news released after the close.

The exchanges accept orders in these windows, but your broker decides how much of them you can use. A few brokers also offer an overnight session through alternative trading systems; its hours and liquidity depend on the venue.

If you trade from Asia, convert carefully. The US moves its clocks for daylight saving time, and Taiwan does not. In US summer time the regular session runs from 9:30 p.m. to 4:00 a.m. Taiwan time. In US winter time it runs from 10:30 p.m. to 5:00 a.m. Taiwan time. A backtest with fixed session times in local time will be one hour off for part of every year.

One US trading day in Eastern Time. The stock pre-market runs from 4:00 a.m. to 9:30 a.m., the regular session from 9:30 a.m. to 4:00 p.m. and after-hours from 4:00 p.m. to 8:00 p.m., and stocks are closed until 4:00 a.m. Equity index futures trade almost around the clock, with a one-hour break from 5:00 p.m. to 6:00 p.m. Futures trade when stocks stop One US trading day, Eastern Time Stocks Pre Regular After Closed 4 am 9:30 4 pm 8 pm 4 am Futures 1 h break Nearly 24 h Stocks trade 16 hours, then stop. So: research nights with futures.
Stock sessions run back to back for 16 hours, from 4:00 a.m. to 8:00 p.m., then stop overnight. Equity index futures trade almost around the clock with one daily break.

Who trades after hours, and why is liquidity thin?

Liquidity is thin after hours because most of the traders and market makers who fill the regular session are not active then. Liquidity is how easily you can buy or sell a size you want without moving the price. A spread is the gap between the best price a buyer is offering (the bid) and the best price a seller is asking (the ask).

The people who trade in extended hours are mainly:

  • Traders reacting to news. Many companies publish earnings just after 4:00 p.m. or before 9:30 a.m. The first price reaction happens in extended hours.
  • Retail traders whose brokers give them access to these windows.
  • Some institutions that want to adjust positions before the next regular session.

These orders are matched on electronic communication networks. An electronic communication network (ECN) is a computer system that matches buy and sell orders directly, without a trading floor. With fewer participants, three things follow:

  1. Wider spreads. Fewer market makers quote prices, so the gap between bid and ask grows.
  2. Smaller size at each price. A modest order can use up all the offers at the best price and fill at worse prices.
  3. Bigger jumps. A single large order or a news headline can move the price several steps at once.

Order types are also limited. Many brokers accept only limit orders in extended hours, and stop orders may wait until the regular session to become active.

Why are stock after-hours data hard to trust in a backtest?

Extended-hours stock data is often incomplete, and different data sources build it in different ways. Before you test a rule on it, check what your bars actually contain.

  • Daily bars usually leave extended hours out. The official open and close come from the regular session auctions. Trades outside the regular session are reported with a special condition flag, and many vendors exclude them from daily bars.
  • Intraday bars vary by vendor. Some feeds include pre-market and after-hours bars, some do not, and some include only part of the window. Two data sets for the same stock can give different results for the same rule.
  • Missing bars. A minute with no trade usually produces no bar. A one-minute chart at 6:30 a.m. may show long empty stretches. A rule that needs "the last 20 bars" may look back over hours of quiet trading.
  • Outlier prints. A single odd trade far from the real market price is more common when few trades happen. It can create a false high or low that triggers a stop or a breakout in the backtest.
  • Indicators change. Adding extended-hours bars changes moving averages, ranges and volume figures. A VWAP (volume-weighted average price) that starts at 4:00 a.m. gives a different value at 10:00 a.m. than one that starts at 9:30 a.m.

A quick check: plot one week of your extended-hours bars next to the regular session. Count the missing bars, look for spikes that reverse on the next bar, and compare volume. If after-hours bars show a small fraction of daytime volume, treat any after-hours signal as expensive to trade.

How do gaps and wide spreads change slippage and fills?

Gaps and wide spreads make fills worse than a bar-based backtest assumes, so extended-hours trades need higher cost settings. Slippage is the difference between the price a backtest assumes and the price you would actually get. A gap is a jump between one traded price and the next, with no trades in between.

The spread effect is direct. If you buy at the ask and sell at the bid, you pay the spread on each round trip.

Hypothetical example

A strategy earns a gross average of $0.15 per share per trade. In the regular session the spread is $0.01, so the round-trip spread cost is about $0.01 and the net average is about $0.14. After hours the same stock has a $0.10 spread. The net average drops to about $0.05 per share, about a third of the daytime figure, before any extra slippage from thin order books.

The gap effect is larger and less visible. A stop order is an order that becomes a market order when price reaches a level you set. If price jumps past that level, the stop fills at the next available price, not at your level.

Hypothetical example

You hold a stock bought at $50 with a stop at $48, a planned risk of $2 per share. Earnings come out at 4:05 p.m. The next trade prints at $44. Your stop fills near $44, a loss of $6 per share, three times the plan. A backtest that fills stops exactly at the stop price records a $2 loss and hides the real risk.

Hypothetical long trade entered at 50 dollars with a stop at 48 dollars. After an earnings release at 4:05 p.m., the price jumps from 49 dollars straight to 44 dollars. A backtest fills the stop at 48 dollars for a 2 dollar loss, while the realistic fill is at 44 dollars for a 6 dollar loss. A gap skips your stop Hypothetical stock, earnings at 4:05 pm Stop $48 Entry $50 Earnings 4:05 pm Backtest: −$2 Real fill: −$6 The stop filled at $44, not $48. So: fill stops at the next open.
Hypothetical example: after a gap, a stop fills at the first available price, not at the stop level.

To make fills realistic, use these rules in your backtest:

  • Fill stops at the worse of the stop price and the next bar's open.
  • Execute on the next bar when a signal is decided at a bar's close.
  • Do not assume a limit order fills just because price touched it; at night, require price to trade through it.
  • Set slippage higher for extended-hours trades than for regular-session trades, and measure it from your own fills when you have them.

The general method for setting costs is in the guide to trading costs in backtests: commission, slippage and the average trade.

Are futures a better way to research extended hours?

Equity index futures are a cleaner way to research the hours outside the stock session, because they trade almost continuously on one exchange. CME equity index futures such as the E-mini S&P 500 (ES) and E-mini Nasdaq-100 (NQ) trade from 6:00 p.m. to 5:00 p.m. ET the next day, Sunday to Friday, with a one-hour break each day.

PointStocks in extended hoursEquity index futures
Trading hoursThree back-to-back windows, closed overnightNearly 24 hours, one daily break
Where trades happenSeveral ECNs and venuesOne exchange
DataVaries by vendor; often missing from daily barsOne continuous record of trades from the exchange
Earnings gapsLarge single-stock gapsIndex moves; single-company news has a smaller effect

Futures still have quieter hours. Overnight liquidity in ES and NQ is lower than during US daytime, so the night bars need their own slippage setting too. The difference between day-only and full-session bars is covered in night sessions in futures backtests: day-only vs. full-session bars, and the contract settings in ES and NQ futures backtesting: five things to set first.

How do you include extended hours in a backtest, step by step?

Treat extended hours as a separate market with its own sessions, costs and checks, then compare the results with the regular session.

  1. Set the session times explicitly. Write down which hours the strategy may trade, in the exchange's time zone, so daylight saving changes do not shift them.
  2. Check the data. Confirm the bars include the hours you want, count missing bars and remove or flag outlier prints.
  3. Set costs per session. Use a higher slippage assumption for extended-hours trades than for regular-session trades.
  4. Use realistic execution. Next-bar execution, stops filled at the worse price after gaps, limit orders filled only when traded through.
  5. Compare sessions. Run the strategy on regular hours only and on full hours, and look at the average trade in each. If the extended-hours trades add little after costs, leave them out.
  6. Stress the costs. Rerun with double slippage on extended-hours trades. A result that depends on cheap night fills is fragile.
  7. Test out of sample. Walk-forward analysis is a test that repeatedly picks settings on one stretch of history and then checks them on the next, unseen stretch; use it to check that the session choice still holds on data the search did not see.

In AlphaPrime (Valynox), trading sessions, fees and slippage and next-bar execution are part of the backtesting settings, and walk-forward analysis is part of strategy validation.

What this means if you use AlphaPrime: define the trading session and realistic costs before the search starts, so candidates are ranked on fills you could actually get. Then run the regular-hours and full-session versions side by side and let validation decide which one to keep.

Frequently asked questions

What time is after-hours trading for US stocks?

After-hours trading usually runs from 4:00 p.m. to 8:00 p.m. Eastern Time, after the regular session closes. The pre-market session runs before the 9:30 a.m. open, starting as early as 4:00 a.m. Your broker may offer a shorter window than the exchanges.

Why do stock prices move so much after hours?

Fewer traders and market makers are active, so each order has a bigger effect on the price. Many companies also release earnings outside the regular session, so news arrives when the market is thinnest. The result is wider spreads and larger jumps between trades.

Do after-hours trades count in the daily close?

No. The official closing price comes from the regular session's closing auction at 4:00 p.m. ET. Extended-hours trades are reported separately, and many data vendors leave them out of daily bars.

Should I include extended hours in a backtest?

Include them only if you would actually trade them, and test them with their own session times and higher slippage. Compare the strategy on regular hours only and on full hours. If the extra trades add little after costs, the simpler regular-session version is easier to trade and to trust.

Is pre-market trading the same as futures night trading?

No. Stock pre-market is a limited window on electronic networks before the stock open. Equity index futures such as ES and NQ trade almost 24 hours on one exchange, so their night session is part of one continuous market with a single daily break.

What AlphaPrime does here

AlphaPrime's backtesting covers trading sessions, fees and slippage and next-bar execution, and strategy validation adds walk-forward analysis and custom thresholds to test whether a session choice holds up out of sample.

See plans and pricing