Overnight drift strategy

On ES futures from January 2016 to July 2026, the overnight drift trade made $107,663 after costs and made money in 9 of 11 years.

SeasonalSwing1-minute barsBacktested Nov 6, 2026

Overnight drift backtest, the result

Contract

E-mini S&P 500

  • +$108K

    Net after costs

    After $74,774 in fees and slippage

  • 9 of 11

    Years that made money

    January 2016 to July 2026

  • −$59.4K

    Largest drawdown

    Peak to trough, 1 contract

  • $41

    Average trade

    2,637 trades

Overnight drift on ES, net after costs by month, from January 2016 to July 2026: +$107,663; buying and holding one ES contract: +$236,212

Net after costs by month, January 2016 to July 2026.

Overnight drift rules

Hold one contract from the 4 p.m. close to the next 9:30 a.m. open, and nothing during the day.

A drawing of the rules on a made-up day, not a result.

  1. The strategy buys the 16:00 New York close of the day session.
  2. It sells at the next 9:30 New York open.
Decides on
1-minute bars
Holds
Overnight and across days
Parameters
buy minute 960, sell minute 570, break minute 1,020

Results by year

It made money in 9 of 11 years on ES. Its best year was 2024, +$43,184, and its worst 2022, −$28,720.

Net after costs by year on ES, with trades, win rate, largest drawdown and buying and holding the same contract
YearNetTradesWin rateDrawdownBuy and hold
2016−$6,09225052%−$14,000+$11,497
2017+$8,19724957%−$3,105+$21,936
2018+$11,82024852%−$9,608−$8,589
2019+$11,89124957%−$14,927+$35,436
2020+$23,01425157%−$48,681+$27,761
2021+$23,53425161%−$8,162+$51,361
2022−$28,72025046%−$43,278−$45,939
2023+$75024850%−$18,862+$38,435
2024+$43,18424957%−$17,658+$42,947
2025+$11,97424755%−$59,448+$37,010
2026, Jan to Jul+$8,11214553%−$29,937+$24,355

Overnight drift backtest results

On ES it made $182,438 before costs. Fees and slippage took $74,774 of that.

Net = before costs − fees − slippage
ES: $182,438 − $9,362 − $65,413 = $107,663
Every figure of the Overnight drift backtest, by contract
FigureESNQ
Net after costs+$107,663+$249,664
Before costs+$182,438+$311,365
Fees$9,362$9,361
Slippage$65,413$52,340
Trades2,6372,637
Trades a year251251
Win rate54%56%
Profit factor1.101.14
Average trade$41$96
Average trade, 95% interval−$12 to $92$4 to $186
Sharpe ratio0.460.61
Largest drawdown−$59,448−$96,063
Time in the market77%77%
Buying and holding the contract+$236,212+$401,004

The interval holds zero: this test cannot tell the average trade from no edge.

Overnight drift code and Pine Script

The strategy as the backtest ran it, and the Pine Script our compiler wrote from it for TradingView.

Overnight drift
overnight_drift.py
1from atlantive import BUY, NEW_YORK, SELL, Bars, Session, Strategy2 3 4class OvernightDrift(Strategy):5    """Hold the equity index overnight: buy the 16:00 New York close, sell the next 9:30 open.6 7    On one-minute bars: the minute that ends at 16:00 closes the day session and the strategy buys8    (filled at 16:00:01); the minute that ends at 9:30 on a later day opens the next day session and9    it sells (filled at 9:30:01). A Friday's position is held over the weekend, and a day with no10    16:00 close (an early close) is not bought.11    """12 13    data = "bars"14 15    class Params:16        buy_minute: int = 96017        sell_minute: int = 57018        break_minute: int = 102019        clip: int = 120 21    class State:22        clock: Session(zone=NEW_YORK)23        bars: Bars(interval_ns=60_000_000_000)24        bought_day: int25 26    def on_event(self, view, ev, orders):27        self.clock.update(ev)28        if not self.bars.update(ev):29            return30        minute = self.clock.prev_minute31        day = self.clock.prev_day32        ends = minute + 133        if view.position > 0:34            if day != self.bought_day and ends >= self.p.sell_minute and minute < self.p.buy_minute:35                orders.ioc(side=SELL, qty=abs(view.position))36        elif view.position == 0 and self.bought_day != day:37            if ends >= self.p.buy_minute and minute < self.p.break_minute:38                orders.ioc(side=BUY, qty=self.p.clip)39                self.bought_day = day
1//@version=62// OvernightDrift, exported from Atlantive.3// Chart simulation: decisions use completed bars; market orders fill at the next bar open.4// Native fills, fees, data gaps and session boundaries can differ. Re-test on the target symbol.5// Use standard time-based candles and the strategy's timeframe, not synthetic chart prices.6// Pine v6 trims old trade records at its order limit; the strategy keeps calculating.7// Margin is explicitly disabled to retain the native signal simulation's sizing.8strategy("OvernightDrift", overlay=true, initial_capital=100000.0, commission_type=strategy.commission.cash_per_contract, commission_value=1.68, default_qty_type=strategy.fixed, default_qty_value=1, calc_on_every_tick=false, process_orders_on_close=false, slippage=0, margin_long=0, margin_short=0)9 10if timeframe.in_seconds() != 6011    runtime.error("OvernightDrift was exported for the 1 minute timeframe; set the chart to 1.")12 13buy_minute = input.int(960, "buy_minute", minval=-9007199254740991, maxval=9007199254740991)14sell_minute = input.int(570, "sell_minute", minval=-9007199254740991, maxval=9007199254740991)15break_minute = input.int(1020, "break_minute", minval=-9007199254740991, maxval=9007199254740991)16clip = input.int(1, "clip", minval=-9007199254740991, maxval=9007199254740991)17 18_q_safe_int(x) =>19    if math.abs(x) > 900719925474099120        runtime.error("an integer left the exact chart range; this run cannot be compared faithfully")21    int(x)22_q_int(x) => _q_safe_int(x < 0 ? math.ceil(x) : math.floor(x))23_q_iadd(a, b) => _q_safe_int(a + b)24 25var int bought_day = 026// clock: completed chart bar's opening timestamp (America/New_York).27_q_clock_prev_minute = hour(time, "America/New_York") * 60 + minute(time, "America/New_York")28_q_clock_prev_second = _q_clock_prev_minute * 60 + second(time, "America/New_York")29_q_clock_prev_weekday = (dayofweek(time, "America/New_York") + 5) % 730_q_clock_prev_day = int(timestamp("UTC", year(time, "America/New_York"), month(time, "America/New_York"), dayofmonth(time, "America/New_York"), 0, 0) / 86400000)31// Current clock: this chart bar's scheduled close, known without a future bar.32// A native next event after a data gap can carry a later time.33_q_clock_minute = hour(time_close, "America/New_York") * 60 + minute(time_close, "America/New_York")34_q_clock_second = _q_clock_minute * 60 + second(time_close, "America/New_York")35_q_clock_weekday = (dayofweek(time_close, "America/New_York") + 5) % 736_q_clock_day = int(timestamp("UTC", year(time_close, "America/New_York"), month(time_close, "America/New_York"), dayofmonth(time_close, "America/New_York"), 0, 0) / 86400000)37_q_clock_seen = 138int minute_l = na39int day = na40int ends = na41 42minute_l := _q_int(_q_clock_prev_minute)43day := _q_int(_q_clock_prev_day)44ends := _q_int(_q_iadd(minute_l, 1))45if _q_int(strategy.position_size) > 046    if day != bought_day and ends >= sell_minute and minute_l < buy_minute47        _q_qty1 = _q_int(math.abs(_q_int(strategy.position_size)))48        if _q_qty1 <= 049            runtime.error("market order quantity must be a positive whole unit")50        _q_pos1 = _q_int(strategy.position_size)51        if _q_pos1 < 0 or _q_pos1 > 0 and _q_qty1 < _q_pos152            runtime.error("this order would add to or partially reduce a position, so its trade ledger would not be faithful")53        strategy.order("q1", strategy.short, _q_qty1)54else if _q_int(strategy.position_size) == 0 and bought_day != day55    if ends >= buy_minute and minute_l < break_minute56        _q_qty2 = _q_int(clip)57        if _q_qty2 <= 058            runtime.error("market order quantity must be a positive whole unit")59        _q_pos2 = _q_int(strategy.position_size)60        if _q_pos2 > 0 or _q_pos2 < 0 and _q_qty2 < -_q_pos261            runtime.error("this order would add to or partially reduce a position, so its trade ledger would not be faithful")62        strategy.order("q2", strategy.long, _q_qty2)63        bought_day := _q_int(day)

How it was tested

The published rules, never tuned on the data, with real costs on every fill. Every strategy here is tested the same way.

Market data
CME Globex 1-minute bars, Jan 2, 2016 to Jul 31, 2026
Rules
As published, with the published parameters, never tuned on this data
Size
1 contract on every trade
Contract
The most traded one, rolled as the market moved
Fees
The broker's $0.50 a side, plus CME's and the NFA's fees when the window opens
Slippage
1 tick a side on ES, 2 in NQ's regular session and 3 outside it, 1 on other markets, where it was not measured
Stops and entries
Tested on 1-second closes and filled at the next bar
Contracts traded
ES: 43 contracts, ESH6 to ESU6NQ: 43 contracts, NQH6 to NQU6
Costs paid
ES: $9,362 in fees, $65,413 in slippageNQ: $9,361 in fees, $52,340 in slippage
Warm-up
None: each contract reads only its own bars
Flagged days
ES: NoneNQ: None Days the data holds too few bars for. Flagged, not removed.

Could you pass
a prop firm challenge
with the overnight drift trade?

A backtest says whether a strategy makes money. Our AI runs its trades through the rules of every prop firm account, then tells you which one it would pass and at what size.

No card needed. Free credits every month.

  • Most money: Blue Guardian Futures Direct 50K, $5,084
  • Best payout odds: Funded Futures Family Straight to Funded 50K, 98%
  • Fastest pass: Phidias Express to Live 50K, 11 days
Blue Guardian Futures Direct 50K
Most money

$5,084

Median net across 2,000 simulated runs

Evaluation
None
First payout
97%
Fees paid
$1,521

Median net across 2,000 simulated runs

Best 5%$13,143Worst 5%−$412
Day 060120180
Example: ES opening range breakout

Questions about the overnight drift trade

What is the overnight drift trade?

Hold one contract from the 4 p.m. close to the next 9:30 a.m. open, and nothing during the day. The rules follow Michael Cliff, Michael Cooper, Huseyin Gulen, Return Differences between Trading and Non-trading Hours: Like Night and Day (SSRN 1004081) (2008). Atlantive backtested it on CME futures from January 2016 to July 2026 after costs.

Is the overnight drift trade profitable on ES futures?

In this backtest it made money: on ES futures from January 2016 to July 2026 it made $107,663 after costs, over 2,637 trades, positive in 9 of 11 years; on NQ it made $249,664. Buying and holding one ES contract over the same window made $236,212. The average trade was $41, its 95% interval −$12 to $92. These are hypothetical results of a backtest, not of trading.

What are the overnight drift trade's rules?

The strategy buys the 16:00 New York close of the day session. It sells at the next 9:30 New York open. The rules follow Michael Cliff, Michael Cooper, Huseyin Gulen, Return Differences between Trading and Non-trading Hours: Like Night and Day (SSRN 1004081) (2008). Its parameters are the published ones, never tuned on the data it was tested on.

How was the overnight drift trade backtested?

On CME Globex data from January 2016 to July 2026, one contract, on 1-minute bars, rolled to the most traded contract as the market moved, with the broker's and CME's fees and the slippage measured on each market. Stops and entries were tested on 1-second closes and filled at the next bar. Nothing was fitted to the data.

Can I run the overnight drift trade in TradingView?

Yes. The page carries its Pine Script, written by Atlantive's compiler from the same code the backtest ran, for TradingView's strategy tester. A chart's fills and fees can differ from the backtest's, so test it again on the symbol you trade.

Can I change the overnight drift trade and test it again?

Yes. Rerun it in Atlantive: a new chat opens with the strategy's rules in the box, for you to read, change and send. The agent writes the code, backtests it on the market and window you name, and reports the result with its costs.

Rerun it in Atlantive. Change the market, the dates or a rule, then send it.

A new chat opens with this in the box

Backtest an overnight drift strategy on ES, 2016-01-02 to 2026-07-31, one contract on a $100,000 account with default costs: buy the 16:00 New York close and sell the next 9:30 open, on one-minute bars.

Never sent for you

May we measure this visit?

With your consent, Google Analytics and PostHog count visits to these pages. You can separately allow Google Ads to measure visits from our ads. Visit measurement starts only after you choose. Cookie policy