# ORB vs. the Coin: the study data

These files hold the figures behind Walk Forward's study of the opening range breakout
(https://walkforwardhq.com/orb). Every figure comes from the study's own output. Nothing is
rounded for presentation, selected or ranked. The files are CSV, UTF-8, comma-separated, with a
header row.

Questions or a mistake to report: hello@walkforwardhq.com.

## The study in brief

- **Strategy.** The opening range breakout (ORB), in 12 documented variations (`variation_index.csv`).
  Every variation was run in three entry modes: `mode=0` trades with the break, `mode=1` trades
  against it (a fade), `mode=2` waits for a break to fail, then trades the reversal after a
  one-minute bar closes back inside the range.
- **Markets.** Seven: EURUSD, GBPUSD, USDJPY, XAUUSD (gold), NAS100 (Nasdaq 100), US30 (Dow) and
  US500 (S&P 500). The opening range is taken at three session opens: `tokyo`, `london` and
  `us_rth` (New York).
- **Settings.** Every combination of session, entry mode and stop placement, each at 512
  spread-out samples of the other settings (range length, break buffer, range size limits, cutoff
  and flatten time, stop size), with every target and every filter of the variation.
  47,555,893 combinations in all (`funnel_by_variation.csv`, `parameter_arithmetic.csv`).
- **Prices and costs.** Tick data (bid and ask) from Dukascopy (`tick_data_physical.csv`). Every
  trade pays the spread at its fill, commission where the market charges one, and slippage on
  stop exits (`cost_model_by_symbol.csv`).
- **Three rounds** (`windows.csv`). Round one (in-sample, `is`), round two (validation, `val`,
  the next four years), round three (out-of-sample, `oos`, the last two years). Round three was
  never used to optimise, rank or pick anything.
- **The bar.** To pass a round, a configuration's average net result per trade had to clear the
  market's cost floor (about 1/12 R), and it had to trade at least 12 times a year
  (`gates_by_symbol.csv`). A **survivor** passed all three rounds: 1,073 did.
- **The coin test.** A sign-flip luck test. Each trading day's gross result is flipped by a coin
  (heads kept, tails reversed) while costs are still charged, and every configuration that traded
  that day gets the same coin. Survivors are counted again, 2,000 times. The p-value is
  (1 + draws at least as good as the real result) / (1 + draws). Pairs of market and variation are
  tested together under Benjamini-Hochberg at q = 0.10 (78 pairs had something to test). Four
  versions of the coin were run (see "Versions of the coin test").
- **Long-only run.** A second run on the three US indices with only buys allowed. Ten of the
  twelve variations can run that way; ORB-1.22 and ORB-1.26 are left out, and the files give the
  reason on their rows (`exclusion_reason`).

## Units and conventions

- `R`: one unit of risk. A trade risking R and gaining 2R scores +2.
- `usd_on_10k`: dollars on a $10,000 account at 1 R = $100 (1% risk per trade). An assumption for
  illustration, not a measurement.
- `expectancy`: mean R per trade. `total_R`: sum of R over the window.
- `max_drawdown`: in R, peak to trough of the R equity curve, unless the column says `pct` or `usd`.
- `win_rate`, `frac_*`, `share_*` and `*_share`: fractions from 0 to 1 unless the name says `pct`.
- Prefixes `is_`, `val_`, `oos_`: rounds one, two and three.
- Booleans are 0/1 or True/False. An empty cell means the figure does not exist for that row
  (for example an excluded variation, or a ratio with no positive denominator).
- Times are UTC.

## Words used in the files

- **configuration**: one fully specified version of the strategy on one market: `variation`, `cell`
  (which of the 512 setting samples), `concept_label`, `target` and `filter`.
- **concept_label**: `anchor` (session) | `mode` (entry mode, above) | `stop_mode` (`or_mid`: stop
  sized from half the opening range; `opposite_side`: stop past the far side of the range).
- **target**: the exit target as `type@value`: `r_multiple@k` (k times the stop distance),
  `atr@k` (k times the average daily range), `or_projection@k` (k times the range beyond its edge),
  `opposite_boundary@k` (fades: toward the far side of the range, 1 = that side), `pdh_pdl@k`
  (k of the way to the previous day's high or low), `vwap_band@k` (VWAP plus or minus k standard
  deviations).
- **filter**: the variation's day filter, as `variation_rule`, for example `ORB-1.18_gap_fade_q75`.
- **clearer**: a configuration that cleared the bar in a round. **fate** (`is_clearers_all.csv`):
  `died_VAL`, `died_OOS` or `survived`.
- **null**, `luck_*`, `null_*`: the coin test's distribution over its 2,000 draws (mean, sd,
  percentiles `p05`, `p50`/`median`, `p95`, `p99`).
- **null_and_block**: which coin. `cost` flips the gross result and still charges costs (the one
  that counts); `zero` flips the net result (a bound only). `day`, `week` or `month` is how many
  days share one coin.
- **main run / long-only run**: the both-sides run of all seven markets, and the buys-only run of
  the three US indices. In the long-only files, `side` is `both` or `long` where both appear.

## Versions of the coin test

`baseline_reproduced` (called `original_reproduced` in the long-only files) is the original test.
`v1_independent_coin_per_symbol` gives each market its own coin. `v2_slippage_swap_as_fixed_cost`
charges slippage and swap as fixed costs instead of flipping them with the gross result.
`v12_independent_coin_and_slippage_swap_as_fixed_cost` does both. All four were run; the settings
files give each version's seed.

## Files

70 CSV files, in groups.


### The grid and the rounds

| File | Rows | What it holds |
|---|---:|---|
| `windows.csv` | 7 | Round one, two and three date ranges per market, half-open [start, end). |
| `variation_index.csv` | 12 | The 12 variations: code, name and the parameters that define each one. |
| `parameter_arithmetic.csv` | 12 | Per variation: the settings documented and the settings swept, the variation's own parameters, filter and target counts, the 512 setting samples, and the designed combination count. |
| `gates_by_symbol.csv` | 7 | Per market: the cost floor in R, the minimum trade rate and counts per round, and how many configurations cleared each round. |

### The funnel

| File | Rows | What it holds |
|---|---:|---|
| `funnel_by_variation.csv` | 84 | Per market and variation: combinations scored in round one, how many cleared the bar in round one, round two and round three. |
| `is_clearers_by_symbol.csv` | 7 | Distribution statistics over every round-one clearer, per market. |
| `is_clearers_by_fate.csv` | 3 | The same statistics grouped by what happened next: died_VAL, died_OOS, survived. |
| `lucktest_population_by_symbol.csv` | 7 | Configurations that met the trade-rate floor in rounds two and three (the coin test's population), beside the survivors. |

### The coin test

| File | Rows | What it holds |
|---|---:|---|
| `lucktest_survival_by_variation.csv` | 84 | Per market and variation: survivors, the coin's median, the p-value and the FDR decision. |
| `lucktest_insample_by_variation.csv` | 84 | The same test on the round-one search, over a 2% results-blind sample of configurations. |
| `lucktest_fdr_totals.csv` | 2 | Family sizes and passes for those two tests. |
| `lucktest_flip_by_variation.csv` | 688 | The full coin distributions: each null_and_block x market x variation x stage (`surv`: survived rounds two and three; `val`: cleared round two), with the observed count, mean, sd, percentiles and p-value. `symbol = ALL` rows are all markets together. |
| `lucktest_all_markets.csv` | 4 | All markets together, one row per null_and_block: survivors, the coin's median and 95th percentile, the p-value and the FDR result. |
| `lucktest_flip_fdr.csv` | 4 | FDR family size and passes per null_and_block. |
| `lucktest_settings.csv` | 5 | Draws, seed, population and what each null flips. |

### Versions of the coin test

| File | Rows | What it holds |
|---|---:|---|
| `lucktest_sensitivity_all_markets.csv` | 4 | One row per version, all markets together: survivors and round-two clearers against the coin's median, 5th and 95th percentile, mean, sd and p-value. |
| `lucktest_sensitivity_by_symbol.csv` | 28 | One row per version and market: population, survivors, the coin's median, 5th and 95th percentile and p-value, and the same for round-two clearers. |
| `lucktest_sensitivity_fdr.csv` | 4 | One row per version: family size (78 pairs), passes under Benjamini-Hochberg, the smallest p-value and its pair, and pairs at p <= 0.05 and p <= 0.10. |
| `lucktest_sensitivity_settings.csv` | 13 | Draws, centre, block, day axis, population, p-value and FDR rules, and each version's seed and what it changes. |
| `lucktest_sensitivity_slip_swap_measured.csv` | 14 | Per market and round: configurations, trades, and total and per-trade slippage and swap in R (used by version 2). |

### More luck tests: other statistics and block sizes

| File | Rows | What it holds |
|---|---:|---|
| `lucktest_power_by_variation.csv` | 510 | The coin test with day, week and month blocks and two statistics: `count` (survivors) and `pooled_expectancy` (all configurations' results over rounds two and three divided by their trades). Rows with `variation = ALL` pool a whole market and are not part of the FDR family. |
| `lucktest_power_totals.csv` | 6 | Per block and statistic: pairs tested, FDR passes, the median p-value and the share of pairs at p >= 0.95. |
| `lucktest_power_settings.csv` | 8 | Draws, seed, centre, blocks, statistics, the p-value formula and the FDR rule. |
| `null_width_vs_pvalue.csv` | 156 | Per market, variation and statistic (day block): the observed value, the coin's distribution and widths, the configurations' daily result shape, and the p-value (recomputed on 2,000 draws). |
| `null_width_vs_pvalue_summary.csv` | 131 | Rank correlations and bucket medians relating the coin's width to the p-values across the 78 pairs; `summary_kind` says what each row is. |

### Month concentration

| File | Rows | What it holds |
|---|---:|---|
| `month_concentration_matched.csv` | 70 | The survivors' best month's share of their total, measured over comparable windows inside round two, per window rule, matching rule and market; the `out_of_sample_actual` rows are round three itself. |
| `month_concentration_luck.csv` | 14 | The same measure on coin-flipped versions of round three. |
| `month_concentration_settings.csv` | 25 | The definition, population, window and matching rules, and the coin's settings for these two files. |

### Every strategy, one row each

| File | Rows | What it holds |
|---|---:|---|
| `survivors_all.csv` | 1,073 | One row per survivor (1,073): its configuration, then every metric in all three rounds (`n` trades, `expectancy`, `total_R`, `sd`, `sharpe`, `t_stat`, `sortino`, `profit_factor`, `win_rate`, `max_drawdown`, `stability`, `equity_r2`, `ulcer_index`, `time_in_drawdown`, `top_trade_share`, `total_R_ex_best`, `split_consistency`), then totals and drawdown in dollars. |
| `is_clearers_all.csv` | 128,892 | One row per round-one clearer (128,892): its configuration, the same metrics for rounds one and two, and its `fate`. |
| `metrics_by_variation.csv` | 116 | The same metrics as median, min and max per market, variation and population (`is_clearers` or `survivors_oos`). |
| `rank_conversion.csv` | 420 | Per market and variation: rank round-one clearers by round-one total R and take the top 10, 15, 50, 100 or all; how many made money in round two and how many cleared its bar. |
| `rank_conversion_val_to_oos.csv` | 420 | The same, ranking round-two clearers by round-two total R into round three. |
| `traded_everything.csv` | 16 | The result of trading a whole population: every round-one clearer through round two, and every round-two clearer through round three, per market and in total. |
| `longest_losing_streak_by_survivor.csv` | 1,073 | Per survivor: the longest run of losing months in round three. |

### Checks on the survivors

| File | Rows | What it holds |
|---|---:|---|
| `survivor_controls.csv` | 1,073 | Per survivor: whether another entry mode or session did as well on the same setup; the shape of its settings neighbourhood (`shell_verdict`: PLATEAU, partial or needle); z-scores against the size of the search; month detail; drawdown with overlapping and with strictly sequential trades. |
| `survivor_controls_totals.csv` | 20 | Totals of those checks over all 1,073 survivors. |
| `random_baseline_by_concept.csv` | 119 | Per setup-and-filter group that holds a survivor: 128 random setting samples scored in round three, their mean and median expectancy, the share positive and the share clearing the cost floor. |
| `random_baseline_settings.csv` | 7 | Period, draws, seed and group counts for that baseline. |
| `random_parameter_exposure_by_variation.csv` | 84 | Per market and variation: survivors whose group also made money on random settings. |
| `buy_and_hold_vs_survivors.csv` | 6 | Per market over round three: buy-and-hold return, its dollars on $10,000 and its drawdown, beside the survivors' median result. Price return only: no dividends, no financing. |
| `consistency_survivors_oos.csv` | 13 | Month and half-year consistency over the 1,073 survivors in round three. |
| `consistency_is_clearers.csv` | 13 | The same over every round-one clearer. |
| `survival_rate_by_is_consistency.csv` | 4 | Round-one clearers grouped by the share of round-one half-years they made money in, against how many survived. |

### Costs and tick data

| File | Rows | What it holds |
|---|---:|---|
| `cost_model_by_symbol.csv` | 7 | Per market: measured spread (median and 90th percentile over the full tick history) beside the modelled spread, both in dollars on a $100-risk trade at the minimum stop; commission; swap rates (reference values, not measured); and the cost floor arithmetic. |
| `cost_share_of_gross_is_clearers.csv` | 8 | Per market and pooled: how much of round-one clearers' gross result went on costs, on a 2% results-blind sample. |
| `tick_data_physical.csv` | 8 | Per market and in total: tick count, first and last timestamp, size in bytes, and the data vendor. |
| `tick_vs_ohlc_example.csv` | 5 | One real survivor trade (US500, 20 Oct 2025) reconstructed from raw ticks, from one-minute mid-price bars and from one-minute bid bars: mid bars say +1.5R, bid bars and ticks say -1R. |
| `bar_ambiguous_minute_count.csv` | 8 | Per market: in the survivors' real round-three trades (70,459), how many single minutes reached both the stop and the target, which bar data cannot order. |
| `bar_ambiguous_minute_example.csv` | 6 | The clearest such minute, with the raw ticks that settle which came first and what three bar-only conventions would have assumed. |

### Long-only run (US500, NAS100, US30)

| File | Rows | What it holds |
|---|---:|---|
| `long_only_funnel_us500.csv` | 30 | The funnel per variation for each `side` (`both`, `long`), with three total rows: all variations, without ORB-1.22, and without ORB-1.22 and ORB-1.26. |
| `long_only_funnel_nas100.csv` | 30 | As above, NAS100. |
| `long_only_funnel_us30.csv` | 30 | As above, US30. |
| `long_only_trade_rate_floor_us500.csv` | 2 | Per side: how much of the population the 12-a-year trade-rate floor removes, and how many round-one clearers later fell below it. |
| `long_only_trade_rate_floor_nas100.csv` | 2 | As above, NAS100. |
| `long_only_trade_rate_floor_us30.csv` | 2 | As above, US30. |
| `long_only_expectancy_us500.csv` | 8 | Pooled gross and net result per trade for each side and population (2% round-one sample, its cost-floor clearers, and the round-two and round-three populations). |
| `long_only_expectancy_nas100.csv` | 8 | As above, NAS100. |
| `long_only_expectancy_us30.csv` | 8 | As above, US30. |
| `long_only_lucktest_by_variation.csv` | 80 | The coin test on the long-only population per market, variation and stage, with buy-and-hold beside every market; excluded variations have their reason and no figures. |
| `long_only_lucktest_fdr_extended.csv` | 3 | Benjamini-Hochberg at q = 0.10 over the extended family (78 main-run pairs + 30 long-only pairs = 108), the main-run pairs alone as a check, and the long-only pairs alone for transparency. |
| `long_only_lucktest_fdr_family.csv` | 114 | Every member of the extended family with its p-value, rank, threshold and decision, then the long-only pairs that are not members and why. |
| `long_only_lucktest_settings.csv` | 17 | Draws, seed, block, day axis, population, exclusions, survivor counts and the FDR family. |
| `long_only_buy_and_hold_vs_survivors.csv` | 40 | Per market and variation over round three: buy-and-hold return, dollars and drawdown, beside the long-only survivors' count and median result. |
| `long_only_random_baseline_by_concept.csv` | 111 | The random-settings baseline for each long-only survivor group, beside the group's survivors and the market's buy-and-hold. |
| `long_only_random_baseline_settings.csv` | 13 | Period, draws, seed, what is drawn and the group counts. |
| `long_only_lucktest_sensitivity_by_symbol.csv` | 40 | The four versions of the coin test on the long-only population, per market and all three together. |
| `long_only_lucktest_sensitivity_fdr.csv` | 4 | Per version: the extended family's result, and where the main-run half's p-values come from. |
| `long_only_lucktest_sensitivity_slip_swap_measured.csv` | 6 | Per market and round: slippage and swap in R in the long-only population (used by version 2). |
| `long_only_lucktest_sensitivity_settings.csv` | 15 | Population, exclusions, draws, block, day axis, and each version's seed and what it changes. |

## Notes

- `survivor_controls.csv` z-scores and `survivor_controls_totals.csv` expected maxima use the size of
  the whole search; they are reported beside the coin test, which is the test that counts.
- In the long-only files a `side = both` row comes from the main run and a `side = long` row from
  the long-only run. The two are never summed.
- `cost_share_of_gross_is_clearers.csv` and the round-one rows of the long-only expectancy files
  are measured on a 2% results-blind sample, chosen by a hash of each configuration's identity,
  not by its results.
- Buy-and-hold figures are price return only: no dividends and no financing costs.

The `extras/` folder has the files made for the page and the video from the same results, with its
own README.
