FennEdge Learn

Scalping Small Caps: Advanced

Advanced small-cap scalping: read Level 2, the tape and auctions, treat setups as base rates with their failure paths, and measure your own edge from your trades.

Plan about 398 minutes including reading, worked examples and exercises; actual time varies.

29Lessons ≈398Est. minutes —Sign in to save progress
24
Lesson 24 of 29 · About 15 min

Backtesting day trading strategies: look-ahead, survivorship and overfitting

Intraday backtests are easy to fool. Use only information available at the entry time, test on the universe as it was, check bad prints and split adjustments, and hold out data you did not tune on.

Start in plain English

A backtest replays a trading rule over past data and counts the results. For an intraday small-cap idea, that sounds like the honest way to get a base rate, and it can be. It is also the easiest place to fool yourself, because past data contains information that was not available when the trade would have happened. This lesson covers the four ways intraday backtests most often mislead: look-ahead, survivorship and split adjustment, bad prints, and overfitting.

The core idea: a backtest is only as honest as its rule about time. Every filter, entry, stop and fill in the test may use only what a trader could have known at that moment. Anything else turns the test into a description of what happened, which is useful, but is not a rule you could have traded.

Two paths from the same start

The data, rule and results in this example are Illustrative.

The test plan, written before running it. Universe: US stocks gapping up 20% or more at the 09:30 open, over six months. Entry: long at the first break of the 5-minute opening-range high after 09:35. Stop: the opening-range low. Target 2R. Time stop 10 minutes. Costs: $0.005 per share round trip plus one cent of slippage on every stop exit. Results in R after costs.

One more filter was added to cut noise: "full-day volume of at least 1 million shares". Here is the same test run twice.

Path AWith the volume filter as written

340 qualifying gappers, 300 of them with full-day volume of 1 million or more. Of those 300, the rule triggered on 212. Average result +0.31R per trade after costs.

The filter looks harmless. It is not: full-day volume is known only at 16:00, and the rule enters before 10:00. Stocks that broke out and kept trading heavily all day pass the filter; stocks that broke out, failed and went quiet are more likely to drop out. The filter selects partly on the outcome.

Path BWith a filter known at entry

Same 340 gappers. The volume filter is replaced with one available at entry: at least 300,000 shares traded by 09:35. The rule triggers on 241 trades. Average result −0.06R per trade after costs.

The 29-trade difference (241 − 212) is a net figure: the two filters keep different sets of gappers, not the same set plus 29. On balance, the trades the early filter lets in are mostly failed breakouts that the full-day filter had removed. Nothing else in the rule changed.

Path CThe corrected rule on months it was not built on

The corrected rule from Path B, with its parameters frozen, runs on the next two months. It triggers on 88 trades. Average result +0.02R per trade, with a rough 95% range from about −0.23R to +0.27R.

Nothing much happened: no clear edge in either direction, within a wide band.

Same data, same entry logic. One filter that used the future turned a flat idea into an apparently strong one. The rest of this lesson shows how to find that kind of leak, how FennEdge's own published study documents its caveats, and how to test for overfitting.

Look-ahead: using information from after the decision

Look-ahead bias means a test uses data that was not available at the decision time. In intraday work it hides in ordinary-looking places:

  • Daily fields used at intraday times. Full-day volume, the day's high or low, the close, "day's change" and end-of-day float updates.
  • Fills inside a bar. Assuming an entry at a 1-minute bar's low, or a stop fill at its exact price. You only know a low was the low after the bar closes; stops fill at the next available price.
  • Lists built later. A "top gappers" list ranked by full-day change or volume, used as the universe for 09:35 entries.
  • Hindsight labels that need the ending. "Days that closed green", "runners", "first red day" are outcomes.

A test for each filter: write the time at which its value was first known. If that time is later than the entry, the filter is look-ahead.

FennEdge's Gapper HOD study flags its own example. It splits gappers by whether they closed at or above the open (n = 233, median high of day 10:25 ET) or below it (n = 438, median 08:37 ET), and states that this split uses information you only have after the close (2026-07-01 to 2026-10-02; FennEdge archive; as of 2026-10-02; see Small-cap gapper statistics (2026)). As a description of two kinds of day, the split is fine. As a filter for a 09:35 entry, it would be look-ahead.

The same study shows a quieter form: its sample is defined by the gap at the official 09:30 open, so it is not a reconstruction of what a premarket scanner showed. Stocks that ran in premarket but opened below +20% are not in it. A backtest of premarket entries on that universe would select on a number that did not exist yet.

Survivorship and split adjustment

Survivorship bias comes from testing on a universe built from today's list of tickers. Small caps are delisted, renamed and reverse-split often; a list of currently active symbols quietly drops many of the worst outcomes. The HOD study took each security's type from reference data as of each historical session, not from today's active list, so tickers that were later delisted, renamed or reverse-split stay in the sample. The study also says this reduces survivorship bias without removing every classification error.

Split adjustment rewrites history. After a 1-for-20 reverse split, a stock that traded at $0.20 appears in adjusted data at $4.00. A backtest with a "price above $1" filter on adjusted data includes days when the stock actually traded far below $1, with sub-dollar quoting, different spreads and different traders. Check price filters against the price that was quoted on the day. The HOD study excluded 5 of 676 qualifying observations (2026-07-01 to 2026-10-02; FennEdge archive; as of 2026-10-02) where minute and daily data disagreed in price scale; four of them were more than 10 times the open and close, a split-adjustment mismatch. It also notes that adjustments can be revised later.

Bad prints

A single off-market print can set a 1-minute high or low that no order could have traded at. In a backtest, that print can trigger an entry, a stop or a target that did not exist in practice. The usual check is a sensitivity test: remove suspect observations under a stated rule and see whether the result survives.

The same study also states two conventions that change numbers at the margin: when the same high printed in more than one minute (78 of 671 observations, 11.6%; 2026-07-01 to 2026-10-02; FennEdge archive; as of 2026-10-02), it used the first minute; and repeat tickers count once per session, so 461 tickers produced the 671 observations. Neither is right or wrong. Both are written down, which is the point.

Overfitting and out-of-sample tests

Overfitting means tuning a rule until it fits the noise in one sample. Intraday ideas have many knobs: range length, entry offset, stop placement, target, time stop, volume threshold, price tier, time of day. Try enough combinations and one looks excellent by chance.

So a rule that shows +0.4R per trade over 40 trades, after you tried 50 variants, is about what pure noise produces. Bailey and co-authors (2014) describe how the chance of a backtest overfitting rises with the number of configurations tried; White (2000) and Harvey, Liu and Zhu (2016) describe corrections for testing many ideas on the same data.

Practical defences:

  • Freeze the rule, then test on data you did not tune on (out-of-sample), as in Path C.
  • Walk forward. Tune on months 1–3, test on month 4; tune on 2–4, test on 5; and so on.
  • Count the variants you tried and report the number with the result.
  • Prefer few parameters. Each one is another chance to fit noise.

Observe vs. infer

A forum post reads: "Backtested 2,000 small-cap breakouts, 61% win rate, rock-solid." Separate what was shown from what is claimed.

What the post shows (observed) What is inferred Why it is not established
A count of 2,000 trades and a 61% win rate "Rock-solid edge" Win rate without payoff and costs says little about expectancy
"Small-cap breakouts" A tradeable universe Unknown whether the universe used today's ticker list or full-day filters
No fill rule stated Realistic fills Fills at the bar's high or low and stops at their exact price are common look-ahead
No mention of variants tried One rule tested once Without the count of variants, overfitting cannot be ruled out

What shifts the odds

These change how much a backtest result can be trusted. They are checks, not findings:

  • Every filter has a timestamp no later than the entry.
  • Fills include spread and slippage, with stops filled worse than their price.
  • Universe built point-in-time, including later-delisted names.
  • Prices checked against the quoted price of the day, not only adjusted data.
  • Sensitivity checks for bad prints and tie conventions.
  • Out-of-sample or walk-forward results reported next to in-sample ones.
  • Regime split. Results reported by month or market condition; see Hot and cold small-cap markets.

Cost of being wrong

Suppose Path A's +0.31R per trade was believed and traded at $50 risk per trade, 200 trades a quarter (Illustrative):

Belief Expected per quarter What the corrected test suggests
Path A, look-ahead: +0.31R +$3,100 —
Path B, corrected: −0.06R — −$600
Path C, out-of-sample: +0.02R, range about −0.23R to +0.27R — about −$2,300 to +$2,700

The cost is not only the lost money. A trader who believes Path A may size up, which multiplies the gap.

How many trades before this means anything

Detecting an edge of +0.10R per trade with a per-trade standard deviation of 1.2R, to within ±0.10R at roughly 95% confidence, takes about (1.96 × 1.2 ÷ 0.10)² ≈ 553.2, rounded up to 554 trades (Illustrative, normal approximation). Most intraday backtests on a few months of small-cap data have fewer trades than that, and trades from the same stock on the same day count for less. How many trades before your numbers mean anything has the method; R multiple explains why results should be in R.

What this lesson does not claim

  • It does not claim any rule in the example works or fails; all rule results are Illustrative.
  • The HOD study figures describe timing of highs on one sample, not the outcome of any trade.
  • A clean backtest is still a description of the past. Past patterns do not indicate future results.
  • Removing look-ahead does not make a result real; it removes one known way of producing a false one.

Go deeper

  • FennEdge first.
    • What time do small-cap gappers hit high of day? is a full worked example of method and caveats: universe, exclusions, sensitivity checks, look-ahead flagged in the text (n = 671, as of 2026-10-02).
    • Gapper HOD Timeline shows the underlying daily HOD data (guests, Free and Plus: latest completed session; earlier sessions need Pro, two months, or Max, one year; tool access as of 2026-10-05).
    • In-Play Days shows 1-minute charts of past active days. Without Max, including as a guest, you can open each ticker's most recent active day in full; earlier days and the two-year history need Max, and replaying many past days needs Max. Use it to hand-check a sample of backtest trades bar by bar.
    • Top Gappers Calendar lists past gappers (guests, Free and Plus: latest session at default filters; full history Pro and Max). Its default filter includes full-day volume of at least 1 million shares, which is the Path A trap if you use that list as the universe for intraday entries.
  • MAE and MFE in backtests inherit every problem above; see MAE and MFE.
  • Setup tests. Opening range breakouts applies these checks to a common setup.
  • Hindsight. Thinking in probabilities covers hindsight in chart examples; look-ahead is its backtest form.
  • Capstone. A 100-trade edge review applies the same discipline to your own log.

Exercises

Six exercises follow this lesson: three concept checks (today's ticker list as a universe; price filters on split-adjusted data; the purpose of out-of-sample data), two scenarios where you find the look-ahead in a backtest, and one calculation of the sample needed to detect a small edge. Exercises, answers and progress are available after signing in.

Primary sources

Sources checked 2026-10-05. The backtest rule, its results and the simulation are fictional and Illustrative. Measured figures come from the FennEdge archive as stated. This lesson is education, not a recommendation to buy or sell any security. Past patterns do not indicate future results.