Quant from Scratch by QuantWright

Testing Popular Ideas · Lesson 8

The opening-range breakout

The first half hour's high and low, a rule that trades the break, and the 24 versions inside it.

Know the basics? Read the lesson notes

The opening range

Each day in this market is one session (the hours the market is open), 09:30 to 16:00. Its prices come as five-minute bars: candles, as in the Markets and prices lesson, each holding the open, high, low and close of five minutes, 78 a day. The opening range is the highest and the lowest price of the session's first minutes. Traders use the first 5, 15 or 30, and draw both prices as lines across the rest of the day.

The prices are simulated: made up by a computer, not a real market. These markets were built so that past prices say nothing about which way the next move goes; the counts in this lesson show what rules do when there is nothing to find. They cannot show whether opening-range rules work in a real market. Try all three lengths.

One day, five-minute bars (simulated)

Each bar: a thin line from its low to its high, a box from its open to its close (empty if it closed higher). Shaded: the range's minutes. Dashed: its high and low.

Range
Range high–
Range low–
Width–

A longer range can only get wider. On this day the 15-minute range is the 5-minute one, 106.23 to 106.55, because the next two bars stayed inside it; the 30-minute range reaches up to 106.61.

How often is the range broken?

The idea behind the opening-range breakout: once the price goes past the range, it keeps going that way, so a rule buys above the range and sells below it. To sell short is to sell first and buy back later, so the trade gains when the price falls. Before testing that, count how often the price goes past the range at all: its base rate, how often something happens anyway, before any rule acts on it. "Goes past" here means a later bar reaches the range's high or its low.

Guess: on how many days in 100 does the price go past the 30-minute range, on either side, before 16:00?

Days on which the price went past the opening range (simulated)

Counted over 1,000 simulated markets. Whole bar: past at least one side. Darker part: past both sides.

This market?
1,000 markets?

On this simulated market, 2,601 of 2,607 days. On 1,000 more simulated markets built the same way, 99.8 days in 100. The price went above the range first on 50.5 days in 100, and below it first on 49.1; on the other 0.2, the first bar to reach the range reached both edges, so which came first is unknown.

Why so often? The range covers half an hour; the rest of the day has six hours to wander past it. A shorter range is passed at least as often, and more often on both sides.

For the preciseEvery day of the ten years: 2,607 a market. Across the 1,000 simulated markets: past the 5-minute range on at least one side 100.0 days in 100 (both sides 76.2), the 15-minute 100.0 (59.0), the 30-minute 99.8 (46.6; from 99.5 to 100 in single markets). On 0.2 days in 100 the first bar to reach the 30-minute range reached both edges; for the 5-minute range, on 18.4. A five-minute close beyond the 30-minute range came on 98.9 days in 100.

Broken, then what?

A break is close to certain. Does the move keep going? Of the days on which the price went above the 30-minute range first, how many went below it too, later the same day?

That would make the first break a strong sign. Here it wasn't: nearly half of those days crossed to the other side too.
More than that: nearly half of those days crossed to the other side too.
On the 1,000 simulated markets, 45.6 in 100 of those days also went below the range later; on the market above, 616 of 1,307.

A rule that bought at the range's high and got out if the price came back to the range's low would have been taken out on all of those days.

Touch or close beyond

The rule: when the price goes past the range's high, buy; when it goes past the low, sell short. One trade a day at most, on the first break, and out by 16:00.

Two common entries. On a touch, an order (an instruction to trade, see the Orders lesson) waits at each edge of the range and trades the moment a bar reaches it, at the edge. On a close beyond, the rule waits for a five-minute bar to close past the edge and enters at that close. Try both on the same day, with the 30-minute range.

Two entries on one day (simulated)

Shaded: the 30-minute range. Dot: the entry.

Entry
In–

On a touch the rule bought at 106.61, the range's high, in the 10:15 bar. The first close beyond came in the 12:00 bar, at 106.72: later, and higher.

Where it gets out

A stop ends a losing trade at a set price. Two common places: the other side of the range, or the range's middle. A target ends a winning trade at a set price; here, twice the range's width beyond the entry. Without a target the trade runs to 16:00, unless the stop comes first. Try both stops and both exits on the touch entry.

Stops and exits on one day (simulated)

Shaded: the 30-minute range. Dot: in. Ring: out. Dotted lines: the stop, and the target when there is one.

Stop
Exit
Out–
Before costs–

With the stop at the middle, 106.42, the trade ended in the next bar, −0.18%. With the stop at the other side, 106.23, it lasted until the 14:05 bar and lost twice as much, −0.36%. The target, 107.37, was never reached that day.

How many versions?

Each different set of choices is a version: the same idea with different settings (the How we test an idea lesson). Range length (5, 15 or 30 minutes), entry, stop, exit: how many versions?

That adds the choices (3 + 2 + 2 + 2). Every choice goes with every other, so they multiply.
That doubles once too often. Three lengths, then two choices for each of the other three settings.
3 lengths × 2 entries × 2 stops × 2 exits = 24 versions.

One version against just holding

Start with one exact rule: the 30-minute range, a touch, the stop at the other side, out at 16:00. Call it the baseline version: this lesson's starting point, not anyone's published rule.

It runs from 2015 to 2021 against just holding (the benchmark: buying once, never selling; see the How we test an idea lesson). Each buy and each sale costs 0.1% of the price (the Costs lesson); holding pays that once. Results are in % a year: the steady yearly growth that gives the same total. Holding made 4.4% a year. Where did the baseline version end, after costs?

The baseline version and just holding, 2015–2021, after costs (simulated)

Accounts starting at 100. Orange: the baseline version. Dotted: holding.

Your guess: it ends
Baseline version?
Holding?

It lost 46.9% a year after costs. It traded on 260 days a year, nearly every day, paying 0.1% to buy and 0.1% to sell each time. Each of those days keeps 0.998 of the account; 0.998 multiplied 260 times is 0.59, so costs alone take about 41% of the account a year.

One market is one draw, so run it on 1,000 more.

The baseline version against holding on 1,000 simulated markets

Bars: markets, by the version's % a year minus holding's. Grey: after costs. Orange outline: before costs.

Before costs it beat holding in 36 of the 1,000 simulated markets; after costs, in none. Even before costs it seldom did: holding owns this simulated market's slow rise day and night, while the rule is in the market for part of each day and sells short about half the time.

For the preciseAgainst holding it averaged −14.1 points a year before costs and −52.3 after, across the 1,000 simulated markets. On the market shown it lost 10.7% a year before costs.

Again: these markets have nothing to find, so this shows what the rule does then, not whether it works in a real market.

All 24 versions

Here are all 24 versions on the same simulated market and years, 2015 to 2021. Each bar is a version's % a year minus holding's, in points (a point is 1% a year). Show them, then turn the costs on.

24 versions: each one's lead over holding, 2015–2021 (simulated)

One bar per version, grouped by range length. Above the line: beat holding. Black: the baseline version. Solid orange: the best.

Costs
Beat holding?
The best?

On this market 4 of the 24 beat holding before costs, and none after. The best after costs used the 5-minute range, a touch, the stop at the other side, out at 16:00: −35.7 points a year. The baseline version came 23rd of 24: its place, counting from the version furthest ahead of holding.

On the 1,000 simulated markets, after costs, not one of the 24 beat holding in any market.

For the preciseBefore costs, at least one of the 24 beat holding in 316 of the 1,000 simulated markets (2.37 versions on average).

Does the best stay best?

Before any version was run, 2022 to 2024 were set aside: years held out, to be used once (the held-out test lesson).

On each of the 1,000 simulated markets we took the best of the 24 on 2015–2021, after costs, and ran it once on 2022–2024. A blind draw, one version taken at random, would be best there in about 42 of 1,000 (1,000 ÷ 24 = 41.7). Guess how often the best stayed best.

The best version's place on 2022–2024, on 1,000 simulated markets, after costs

One bar per place, 1st on the left. Places 1 to 4 are about as tall as each other: four near-twin versions take them in turn. Dashed: a blind draw.

Stayed best?

The best stayed best in 260 of the 1,000 simulated markets, against a blind draw's 42. Yet it beat holding on 2022–2024 in none.

Why 260? In all 1,000 markets the best was one of the four versions with the 5-minute range and a touch. They trade on the fewest days, so they pay the least in costs. Which of those four near-twins comes first is close to a draw among four: 1,000 ÷ 4 = 250. It is not skill, and it says nothing about a real market.

For the preciseThose four skip the days when the first bar to reach the range reaches both edges (18.4 days in 100), because the order of the two touches inside one bar is unknown; they traded on 212.7 days a year, the other 20 on 255.3 to 261.0. Before costs, too, their trades did a little better (+0.008% to +0.011% a trade, against −0.022% to −0.004% for the other 20), partly from how the simulation draws a bar's high and low (see the honest notes). With costs left out, the best before costs stayed best, before costs, in 165 of the 1,000 simulated markets; in 813 it was one of the same four.
Theory

Target or stop first: the gambler's ruin

A stop and a target change how often a trade wins, and by how much. If prices have no pattern in which way they move, the chance of reaching the target before the stop depends only on the two distances: the nearer one comes first more often. This is the gambler's ruin (the chance a gambler reaches a goal before going broke). It equals the break-even win rate of the Expectancy lesson, the win rate (trades won per 100) at which wins and losses cancel, so before costs the average trade is zero wherever the two sit.

P(target first) = s ÷ (s + g)
s
the distance from the entry price to the stop
g
the distance from the entry price to the target
P(target first)
the chance the price reaches the target before the stop, for prices with no pattern in which way they move, moving in small steps (no jumps past the stop or target), when nothing else ends the trade
Worked example: the 5-minute range from the first card

On the day you saw, the 5-minute range ran from 106.23 to 106.55, a width of 0.32. A buy on a touch at 106.55 with the stop at the other side, 106.23: s = 0.32. The target is twice the width above: 106.55 + 0.64 = 107.19, so g = 0.64. P = 0.32 ÷ (0.32 + 0.64) = 1 in 3. The average: ⅓ × 0.64 − ⅔ × 0.32 = 0.213 − 0.213 = 0.

Across the 1,000 simulated markets, of this version's trades that reached the target or the stop before 16:00, 34.5 in 100 reached the target first: close to the 1 in 3 the rule gives.

Holds when
  • from any price, an up move is as likely as a down move;
  • the price moves in small steps, never jumping past the stop or the target;
  • nothing but the stop or the target ends the trade.
Breaks when

The session's close ends trades first. The far target needs more time than the near stop, so the 16:00 close cuts off mostly trades still on their way to the target, and among the rest the stop comes first more often. Across the 1,000 simulated markets, 30-minute range: 41 in 100 of the same rule's trades ended at 16:00, and the target came first in only 22.3 of 100 of the rest. A jump past the stop fills worse (see the Orders lesson); a pattern, or a strong drift (a steady rise or fall), moves P.

A buy at 50.00 has its stop at 49.80 and its target at 50.60, in a market with no pattern. About how many trades in 100 reach the target first?

s = 0.20, g = 0.60: 0.20 ÷ 0.80 = 25 in 100. Check: 0.25 × 0.60 − 0.75 × 0.20 = 0.15 − 0.15 = 0.
s = 50.00 − 49.80 = 0.20 and g = 50.60 − 50.00 = 0.60, so P = 0.20 ÷ (0.20 + 0.60) = 25 in 100.

What this means for your test

  1. Write the exact rule before you run it.

    The range's length; touch or close beyond; the stop; the target or the close; out by 16:00; the costs.

Practice 1 of 3

A high win rate

The situationAn invented post shows an opening-range rule that won 75 of its last 100 trades. Its target is a third as far from the entry as its stop.

In a market with no pattern, about how many trades in 100 would reach the target first anyway?

Hint: call the target's distance 1, so the stop's is 3. Then use s ÷ (s + g).

3 ÷ (3 + 1) = 75 in 100: exactly the post's win rate. Each loss is three times a win, so before costs the average is 0.75 × 1 − 0.25 × 3 = 0.
s = 3, g = 1: 3 ÷ (3 + 1) = 75 in 100. A win rate like the post's is what a market with no pattern gives this stop and target.
Practice 2 of 3

Best again

The situationA friend tests 24 versions of an opening-range rule, after costs. The best on the first years trades on 150 days a year; the others on about 250. It is best again on the held-out years.

In markets like this lesson's, what is the likeliest reason?

These markets have no pattern to find. The lesson's best version stayed best in 260 of 1,000 for a steady reason: it traded on the fewest days.
Costs are paid on every trading day. A version that trades on 100 fewer days a year keeps that advantage on the held-out years, with or without any pattern.
Short held-out years make one result noisy, but this one has a steady cause: it trades on 100 fewer days a year, so it pays less in costs.
Practice 3 of 3

A bigger search

The situationA friend tests ranges of 5, 10, 15, 30 and 60 minutes, a touch or a close beyond, three stops and two exits, then checks whether the best stays best on held-out years across 1,000 simulated markets.

In about how many of the 1,000 would a blind draw be best?

Hint: first multiply the choices to get the number of versions, then divide 1,000 by it.

5 × 2 × 3 × 2 = 60 versions; 1,000 ÷ 60 = 16.7, about 17.
Versions: 5 lengths × 2 entries × 3 stops × 2 exits = 60. A blind draw is best in about 1,000 ÷ 60 = 16.7 of 1,000.
✓

Lesson done

The opening range is the high and low of a session's first 5, 15 or 30 minutes; a breakout rule buys above it and sells short below it, and its entry, stop and exit made 24 versions here. In these simulated markets the price went past the 30-minute range on 99.8 days in 100, so the rules traded nearly every day. These markets were built so that past prices say nothing about which way the next move goes, so the counts show what these rules produce when there is nothing to find: after costs no version beat just holding in any of the 1,000 simulated markets, and the best of 24 stayed best on held-out years in 260 (a blind draw: about 42) because it traded least. When prices have no pattern, a stop and a target change how often a trade wins, not its average before costs. The counts cannot show whether opening-range rules work in any real market.

Key ideas

Opening range
the highest and lowest price of a session's first minutes (often 5, 15 or 30); its length is a choice
Touch, close beyond
a bar that reaches the range's edge; a bar whose close is past it. A touch entry fills at the edge, a close entry at that close
Selling short
selling first and buying back later; the trade gains when the price falls
Stop, target
a set price that ends a losing trade; a set price that ends a winning one
Base rate
how often something happens anyway, before any rule acts on it
Version
the same idea with different settings; count every one

Formulas

P(target first) = s ÷ (s + g), for prices with no pattern in which way they move, moving in small steps (no jumps past the stop or target), when nothing but the stop or the target ends the trade (the gambler's ruin)

Lesson notes

The opening range is the highest and lowest price of a session's first minutes; the opening-range breakout buys when the price goes past the range's high and sells short when it goes past the low. The range's length, the entry, the stop and the exit made 24 versions in this lesson. Its simulated markets were built so that past prices say nothing about which way the next move goes, from one day to the next or within a day, so its counts show what these rules produce when there is nothing to find. In them the price went past the 30-minute range on nearly every day, the rules traded nearly every day, and after costs no version beat just holding (buying on the first day and never selling) in any of 1,000 simulated markets. The counts cannot show whether opening-range rules work in any real market; that needs its own test.

The range

The lesson's simulated market (prices made up by a computer) has one session a day, 09:30 to 16:00, cut into 78 five-minute bars, each with an open, high, low and close. The opening range is the highest high and lowest low of the session's first 5, 15 or 30 minutes (the first 1, 3 or 6 bars). A longer range can only be wider: on the lesson's example day the 5-minute and 15-minute ranges were both 106.23 to 106.55, because the second and third bars stayed inside the first; the 30-minute range reached up to 106.61.

The base rate

A base rate is how often something happens anyway, before any rule acts on it. Here "goes past the range" means a later bar reaches its high or its low. On the lesson's simulated market the price went past the 30-minute range on 2,601 of 2,607 days; on 1,000 more simulated markets built the same way, on 99.8 days in 100. It went above first on 50.5 days in 100 and below first on 49.1; on the other 0.2 the first bar to reach the range reached both edges, so which came first is unknown. The reason: the range covers half an hour, and the rest of the day has six hours to wander past it. Shorter ranges are passed at least as often, and more often on both sides (the 5-minute range on both sides on 76.2 days in 100, the 30-minute on 46.6).

A break also said little about what came next. Of the days that went above the 30-minute range first, 45.6 in 100 went below it as well later that day, across the 1,000 simulated markets. A buy at the range's high with its stop at the range's low was taken out on all of those days.

Entries, stops, exits: 24 versions

A break of the high buys; a break of the low sells short (selling first and buying back later, so the trade gains when the price falls). One trade a day at most, on the first break, and out by 16:00. On a touch, an order waits at each edge and fills (the trade happens) at the edge when a bar reaches it; on a close beyond, the rule waits for a five-minute bar to close past the edge and enters at that close. On the example day, with the 30-minute range, the touch bought at 106.61 in the 10:15 bar; the first close beyond came in the 12:00 bar, at 106.72. A stop ends a losing trade at a set price: the other side of the range, or its middle. A target ends a winning trade at a set price: here twice the range's width beyond the entry; without one the trade runs to 16:00 unless the stop comes first. On the example day the stop at the middle, 106.42, ended the touch buy in the next bar at −0.18% before costs; the stop at the other side, 106.23, ended it in the 14:05 bar at −0.36%; the target, 107.37, was never reached. Three lengths, two entries, two stops and two exits make 3 × 2 × 2 × 2 = 24 versions.

The baseline version and just holding

The baseline version, the lesson's starting point, uses the 30-minute range, a touch, the stop at the other side, out at 16:00. Each buy and each sale costs 0.1% of the price; holding pays that once. From 2015 to 2021 on the lesson's simulated market, holding made 4.4% a year after its cost (% a year: the steady yearly growth that gives the same total). The baseline version lost 46.9% a year after costs. It traded on 260 days a year, and each trading day keeps 0.998 of the account: 0.998 multiplied 260 times is 0.59, so costs alone took about 41% of the account a year. Its lead (its % a year minus holding's, in points, a point being 1% a year) was −46.9 − 4.4 = −51.3. On the 1,000 simulated markets it beat holding before costs in 36 and after costs in 0. Even before costs it seldom did: holding owns this simulated market's slow rise day and night, while the rule is in the market for part of each day and sells short about half the time.

The best of 24, and held-out years

On the lesson's market 4 of the 24 versions beat holding over 2015 to 2021 before costs, and none after costs. On the 1,000 simulated markets, after costs, none of the 24 beat holding in any market. Before any version was run, 2022 to 2024 were held out (set aside, to be used once). On each market the best of the 24 on 2015 to 2021, after costs, ran once on 2022 to 2024, after costs. It stayed best in 260 of the 1,000 simulated markets, against about 42 for a blind draw (one version taken at random: 1,000 ÷ 24), and beat holding there in 0. In every market the best was one of the four versions with the 5-minute range and a touch. They skip the days when the first bar to reach the range reaches both edges (18.4 days in 100, 5-minute range, 1,000 simulated markets), because the order of the two touches inside that bar is unknown, so they trade least and pay the least in costs. Which of those four comes first is close to a draw among four: 1,000 ÷ 4 = 250. That is not skill, and it says nothing about a real market.

Formula: the gambler's ruin

A stop and a target change how often a trade wins, and by how much. If prices have no pattern in which way they move, the chance of reaching the target before the stop depends only on the two distances, and it equals the break-even win rate of the Expectancy lesson (the win rate, trades won per 100, at which wins and losses cancel), so before costs the average trade is zero wherever the two sit.

P(target first) = s ÷ (s + g)
s
the distance from the entry price to the stop
g
the distance from the entry price to the target
P(target first)
the chance the price reaches the target before the stop, for prices with no pattern in which way they move, moving in small steps (no jumps past the stop or target), when nothing else ends the trade
Worked example: the 5-minute range on the lesson's example day

The 5-minute range ran from 106.23 to 106.55, width 0.32. A buy on a touch at 106.55, stop at the other side: s = 0.32; target 106.55 + 2 × 0.32 = 107.19: g = 0.64. P = 0.32 ÷ 0.96 = 1 in 3. Average: ⅓ × 0.64 − ⅔ × 0.32 = 0. Across the 1,000 simulated markets, of this version's trades that reached the target or the stop before 16:00, 34.5 in 100 reached the target first: close to the 1 in 3 the rule gives.

Holds whenBreaks when

The session's close ends trades first. The far target needs more time than the near stop, so the 16:00 close cuts off mostly trades still on their way to the target, and among the rest the stop comes first more often. Across the 1,000 simulated markets, 30-minute range: 41 in 100 of the same rule's trades ended at 16:00, and the target came first in 22.3 of 100 of the rest. A jump past the stop fills worse; a pattern, or a strong drift (a steady rise or fall), moves P.

One more worked example

Made-up round numbers

A range runs from 80.00 to 81.00, width 1.00. A short sale on a touch of the low, at 80.00, with the stop at the middle, 80.50 (s = 0.50), and the target twice the width below, 78.00 (g = 2.00). In a market with no pattern, P = 0.50 ÷ 2.50 = 1 in 5. Average before costs: 0.2 × 2.00 − 0.8 × 0.50 = 0.40 − 0.40 = 0. After costs of 0.1% to sell and 0.1% to buy back, about 0.16 a trade at this price, the average is about −0.16, on every trade.

Common mistakes

Check yourself

  1. A session's first six five-minute bars have highs of 20.10, 20.18, 20.15, 20.22, 20.20, 20.12 and lows of 19.95, 20.02, 20.05, 20.08, 20.10, 20.04. What are the 30-minute range's high, low and width?
    Answer

    High 20.22 (the highest high), low 19.95 (the lowest low), width 20.22 − 19.95 = 0.27.

  2. A buy at 40.00 has its stop at 39.70 and its target at 40.90, in a market with no pattern, and nothing else ends the trade. About how many trades in 100 reach the target first?
    Answer

    s = 0.30, g = 0.90: 0.30 ÷ 1.20 = 25 in 100.

  3. A test uses one range length, both entries, three stops and one exit. How many versions?
    Answer

    1 × 2 × 3 × 1 = 6.

  4. In the lesson's simulation, after costs, the best of 24 versions stayed best on held-out years in 260 of 1,000 simulated markets, against about 42 for a blind draw. Does that show the breakout works?
    Answer

    No. That best version beat holding on the held-out years in none of the 1,000. It stayed best because it was always one of four near-identical versions that trade on the fewest days, so they pay the least in costs. These markets were built with nothing to find, and a real market needs its own test.

Try it yourself

The rules, written before the code. Five-minute bars, one session a day. The opening range's high (low) = the highest high (lowest low) of the first 1, 3 or 6 bars. Touch: a later bar's high at or above the range's high, or its low at or below the range's low; the entry fills at the edge (a stop order); if the first bar to reach the range reaches both edges, no trade that day. Close beyond: a later bar's close above the high or below the low; the entry is at that close, never at the session's last close. Past the high buys; past the low sells short. One trade a day at most. Stop: the other side of the range, or its middle. Exit: at 16:00, or at a target twice the range's width beyond the entry; the stop and the target are watched from the bar after the entry bar, and if one bar reaches both, the stop counts as first. 0.1% of the price per buy and per sell, or no costs. Compared with buying at the first close and holding, which pays 0.1% once.

Run the script. Every number in this lesson comes from one Python script (below). It imports simmarket.py, the course's simulated market, which must sit in the same folder. Add a 60-minute range or a second target, and watch the version count and the counts across markets move.

By hand. In a spreadsheet with one row per five-minute bar (date in A, time in B, high in C, low in D, close in E), the 30-minute range's high is the largest high of that date's bars before 10:00: =MAXIFS(C:C,A:A,date,B:B,"<10:00"). A touch is a later high at or above it; a close beyond is a later close above it.

Written by QuantWright from the plain definition of the opening range and the rules above. No code from any indicator script or charting platform.

The code behind every number (Python, imports SimMarket, seed 20261109)
Loading…
For the preciseThe lesson's market: SimMarket Market 1, seed 20261109, effect=False (no planted pattern), five-minute bars built with bridge="normal" (no pull-back within the day), the same bars as the Previous day high and low lesson. The 1,000 simulated markets: the same generator and setting with seeds 2026180801 to 2026181800, effect off. Choosing years: from the close of 5 Jan 2015 to 31 Dec 2021 (6.99 calendar years); held-out: to 31 Dec 2024 (3.00 years). % a year = (the account's growth factor)1 ÷ years − 1. A long trade's return is exit ÷ entry − 1; a short trade's 1 − exit ÷ entry; after costs each traded day is multiplied by 0.999². The lesson's market: holding 4.38% a year before its cost, 4.36% after (choosing), 10.00% (held-out). Its 30-minute range over 2,607 days: past the high on 1,926, the low on 1,910, either on 2,601, both on 1,235; above first on 1,307, below first on 1,288. Baseline version: −10.65% a year before costs, −46.92% after (1,818 trading days, 260.2 a year), lead −15.03 then −51.28, 23rd of 24; held-out lead −58.46, 23rd. The best after costs, the 5-minute range, touch, stop at the other side, out at 16:00: lead +1.50 before costs, −35.70 after (216.4 trading days a year); held-out lead −46.02, 4th. The 1,000 simulated markets: the 30-minute range passed on 99.8 days in 100 (99.5 to 100), above first 50.5, below first 49.1, both sides 46.6; of the days below it first, 47.6 in 100 went above it later. Baseline version: beat holding in 36 before costs and 0 after (choosing years), 0 after costs (held-out); a gain before costs in 89; average lead −14.10 before costs, −52.31 after, −52.46 held-out; 260.1 trading days a year; its trades averaged −0.02% before costs and gained in 40.2 in 100. Versions beating holding on the choosing years: 2.37 of 24 on average before costs, 0 after. The best on 2015–2021: the 5-minute range and a touch in 1,000 markets; stop at the other side in 474, out at 16:00 in 412; stayed best in 260, average held-out place 2.6; beat holding in 0 markets on the choosing years and 0 on the held-out years. No market had a tie for first place. Of all 24,000 held-out results after costs, none beat holding. How trades ended, counted over all ten years: the 5-minute range, touch, stop at the other side, target: 681,569 at the target, 1,294,337 at the stop, 150,466 at 16:00; with the stop at the middle, 468,837 and 1,611,179 (target first in 22.5 of 100 against the formula's 20). Every version's trades averaged between −0.022% and +0.011% before costs (choosing years).

Honest notes

Where this comes from