Strategies6 min read
A disciplined way to backtest gap-and-go setups
Backtest the gap and go strategy without hindsight: define universe, time‑stamp catalysts, model the opening auction, and predeclare entries and exits.
By TerraTrade Team

You only get one opening print each day, and most of the “gap and go” edge—if it exists—comes from what is known and tradable before that print. This guide shows stock day traders how to specify a gap-and-go strategy you can actually backtest without hindsight. We pin down five things, in order: (1) the tradeable universe, (2) the catalyst and its time stamp, (3) liquidity and opening execution mechanics, (4) measurable opening behavior, and (5) exits that are defined in advance. Each section cites primary market mechanics or research so you can reproduce results and audit assumptions.
What traders mean by “gap and go”#
| Component to define | Option A (conservative) | Option B (per exchange data) | Notes | Supporting evidence |
|---|---|---|---|---|
| Gap percentage base | Use prior day’s official consolidated close | Use primary‑listing venue’s official closing price | Pick one and hold it fixed across the sample | |
| Pre‑open reference for gap | Midpoint of last pre‑market NBBO at 09:28:59 ET | Indicative opening (auction) price at 09:2x ET | You must store the exact timestamp used for every symbol/day | HOW THE OPENING AND CLOSING CROSS WORK |
| Opening reference levels | Opening‑range high/low over first N minutes (e.g., 1–5) | Pre‑market high/low and/or indicative auction imbalance levels | Define N and whether pre‑market levels are included in triggers | HOW THE OPENING AND CLOSING CROSS WORKA framework for opening gaps | Paul Remington Wang |
| Catalyst time signal | SEC EDGAR accepted timestamp (“filedAt”) | Original press‑release distribution time (server‑stamped) | Only catalysts time‑stamped before your pre‑open reference can be used | SEC.gov | Accessing EDGAR DataDoes Overnight News Explain Overnight Returns? |
Step 1 — Define the gap universe you can actually trade#
Step 2 — Time‑stamp the catalyst before the open#
Step 3 — Liquidity and opening execution mechanics you must respect#
Step 4 — Entries, invalidations, and exits that do not look ahead#
Step 5 — Bias controls, walk‑forward, and replication#
- Choose the historical sample and build a survivor‑free symbol list for each test date Survivorship Bias in Emerging Market Small-Cap Indices: Evidence from India's NIFTY Smallcap 250.
- Pick one gap metric and one pre‑open reference timestamp (e.g., 09:28:59 NBBO midpoint or indicative auction price) and store it per symbol/day HOW THE OPENING AND CLOSING CROSS WORK.
- Define liquidity floors (ADV or dollar value) and any price bands, and exclude days lacking full intraday or auction‑message coverage HOW THE OPENING AND CLOSING CROSS WORK.
- Fetch and archive catalysts with auditable timestamps (EDGAR accepted times and/or server‑stamped press releases) SEC.gov | Accessing EDGAR Data.
- Classify catalysts and flag eligibility based on timestamps strictly preceding your pre‑open reference SEC.gov | Accessing EDGAR DataDoes Overnight News Explain Overnight Returns?.
- Specify opening behavior features you will measure (opening‑range N, pre‑market high/low, VWAP) A framework for opening gaps | Paul Remington Wang.
- Choose exactly one entry rule (e.g., opening‑range break) and one invalidation rule. Pre‑register all thresholds Gap-and-Go Strategy — Strategy Guide With Entries & Exits.
- Decide on exit logic: time‑based, structure‑based trailing, or fixed R multiple. No references to the future day’s range Gap-and-Go Strategy — Strategy Guide With Entries & Exits.
- Model execution according to whether you participate in the opening auction (MOO/LOO) or trade after the open; apply the venue’s auction rules and collars if applicable HOW THE OPENING AND CLOSING CROSS WORK.
- Implement bias controls: walk‑forward or purged cross‑validation with an embargo, and log all hyperparameters and seeds Advances in Financial Machine Learning [Book].
- Run base tests and then robustness slices (by catalyst type, liquidity, gap size buckets).
- Journal every trade with standardized tags to enable weekly/monthly reviews and playbook updates.
A journal tag set you can reuse#
- Universe: large‑cap, mid‑cap, small‑cap
- Catalyst: earnings AMC, earnings BMO, guidance, M6A, regulatory, analyst, none SEC.gov | Accessing EDGAR DataDoes Overnight News Explain Overnight Returns?
- Gap size bucket: 0.5–1%, 1–2%, 2–4%, over 4%
- Pre‑open reference: NBBO at 09:28:59, Indicative auction 09:2x HOW THE OPENING AND CLOSING CROSS WORK
- Liquidity: pre‑open dollar‑volume bucket; regular‑hours ADV bucket
- Entry: opening‑range break N=1, opening‑range break N=3, auction MOO HOW THE OPENING AND CLOSING CROSS WORKA framework for opening gaps | Paul Remington Wang
- Invalidation: opening‑range low break, VWAP loss Gap-and-Go Strategy — Strategy Guide With Entries & Exits
- Exit: time‑based cutoff, trailing swing stop, fixed R multiple
- Execution: auction participant, post‑open taker HOW THE OPENING AND CLOSING CROSS WORK
- Outcome: positive R bucket, negative R bucket, flat by time
Strengths and limitations of testing gap‑and‑go
Where disciplined gap‑and‑go testing shines
- ✓The open is governed by auditable auction rules, creating reproducible pre‑open signals (indicative price, imbalance) (Source: HOW THE OPENING AND CLOSING CROSS WORK).
- ✓Catalyst‑conditioned gaps let you study distinct cohorts with objective time stamps (EDGAR accepted times) (Source: SEC.gov | Accessing EDGAR Data).
- ✓Entry and invalidation can be defined using only first‑N‑minute information, enabling genuinely out‑of‑sample testing (Source: Gap-and-Go Strategy — Strategy Guide With Entries & Exits) (Source: A framework for opening gaps | Paul Remington Wang).
- ✓Bias controls (purged CV, walk‑forward) are well‑documented and implementable with open research (Source: Advances in Financial Machine Learning [Book]).
Limitations to watch
- —Continuation can be regime‑dependent; a gap with a clean catalyst in one volatility regime may fade in another.
- —Execution quality at and just after the open is sensitive to auction participation and auction collars—bar backtests can misrepresent these mechanics (Source: HOW THE OPENING AND CLOSING CROSS WORK).
- —Catalyst mis‑timestamping (e.g., relying on reposts rather than the EDGAR accepted time) can contaminate “with‑catalyst” cohorts (Source: SEC.gov | Accessing EDGAR Data).
- —Extended‑hours behavior and the presence/absence of indicative prices vary by venue and data access, limiting retail replication (Source: HOW THE OPENING AND CLOSING CROSS WORK) (Source: between the hours of 8:00 PM-4:00 AM ET, the Exchange is closed to trading as it is during all weekend hours.).

FAQ: building a gap‑and‑go test you can trust#
Should I compute the gap from the official open or the pre‑open indicative price?
Use a pre‑open reference you could observe before the cross—such as the last pre‑market NBBO midpoint at a fixed time (e.g., 09:28:59 ET) or the exchange’s indicative opening price disseminated during the imbalance period. Do not use the eventual official open to compute the gap; that injects hindsight HOW THE OPENING AND CLOSING CROSS WORK.
How do I confirm that a gap had a real, tradable catalyst?
Prefer primary records. For filings, record the EDGAR accepted (“filedAt”) timestamp and accession number. For press releases, store the original server‑stamped time. Only catalysts time‑stamped before your pre‑open reference can be used in catalyst‑conditioned tests. Overnight news has distinct effects on returns, so time alignment matters SEC.gov | Accessing EDGAR DataDoes Overnight News Explain Overnight Returns?.
Can I backtest gap and go with only daily bars?
You can prototype with daily bars, but fills at and just after 09:30 ET depend on opening‑auction mechanics and immediate quote/tape conditions. If your logic references the open or the first N minutes, intraday data—and, when relevant, auction imbalance/indicative messages—produce more realistic fills HOW THE OPENING AND CLOSING CROSS WORK.
What’s the simplest way to reduce overfitting in this strategy?
Walk‑forward evaluation or combinatorial purged cross‑validation with an embargo reduces look‑ahead from overlapping events and serial dependence. Pair this with survivor‑free universes and pre-registered parameters to curb data‑snooping Advances in Financial Machine Learning [Book]Survivorship Bias in Emerging Market Small-Cap Indices: Evidence from India's NIFTY Smallcap 250.
I saw conflicting backtests online—why do the results disagree?
Public posts show a range of outcomes across indices and futures, but results hinge on universe, filters, and frictions. Before you adopt any published numbers, read their assumptions on gap definition, auction participation, and costs, and try to replicate on your data Gap-and-Go Strategy: Does Trading the Opening Gap Work? | TradeBricksS&P 500 Gap-and-Go Backtest: Real Until 2022 | YuRa TradingYM Gap & Go Backtest | Dow Jones Futures.
What trading‑hours details matter when modeling the gap?
Venue documentation specifies a closed overnight window (e.g., 8:00 PM–4:00 AM ET in one filing). Treat anything before 09:30 ET as extended‑hours/pre‑market and confirm what data and order types your test assumes. Different sessions follow different mechanics and data dissemination patterns between the hours of 8:00 PM-4:00 AM ET, the Exchange is closed to trading as it is during all weekend hours.HOW THE OPENING AND CLOSING CROSS WORK.
Closing takeaways#
Sources#
- HOW THE OPENING AND CLOSING CROSS WORK — nasdaqtrader.com
- between the hours of 8:00 PM-4:00 AM ET, the Exchange is closed to trading as it is during all weekend hours. — sec.gov
- SEC.gov | Accessing EDGAR Data — sec.gov
- Does Overnight News Explain Overnight Returns? — arxiv.org
- Advances in Financial Machine Learning [Book] — oreilly.com
- Survivorship Bias in Emerging Market Small-Cap Indices: Evidence from India's NIFTY Smallcap 250 — arxiv.org
- Gap-and-Go Strategy: Does Trading the Opening Gap Work? | TradeBricks — tradebricks.io
- Gap-and-Go Strategy — Strategy Guide With Entries & Exits — stockmarketwatch.com
- A framework for opening gaps | Paul Remington Wang — paulremingtonwang.com
- S&P 500 Gap-and-Go Backtest: Real Until 2022 | YuRa Trading — yuratrading.com
- YM Gap & Go Backtest | Dow Jones Futures — pinescriptforge.com
KEEP READING

Strategies9 min read
Mean reversion without catching every falling knife
A practical mean‑reversion setup: apply regime, extension, liquidity, and invalidation filters with OU or z‑score bands and a reproducible test plan.
Read post
Strategies8 min read
How to test a trend-pullback strategy
Turn a vague pullback idea into a testable trend pullback strategy with measurable rules, ATR/Fibonacci options, and a reproducible backtest plan.
Read post
Strategies10 min read
VWAP strategy setups and when they fail
A practical VWAP strategy guide for intraday traders—three setups, explicit invalidation, and a reproducible backtest plan.
Read post