The best result in an optimization table is a selected result. It won a competition against other settings on the same data. That makes it useful for finding hypotheses, but less convincing as evidence than an equally strong result from a rule chosen beforehand. The more alternatives you try, the more opportunities there are to select favorable noise.
A practical optimization process therefore looks beyond the largest profit. It examines nearby settings, trade count, concentration of returns, execution sensitivity and performance on untouched data. A broad region of reasonable results can be more credible than one sharp peak, but even a smooth region is not proof of an edge. The entire region may reflect the same historical coincidence.
Choose the objective before looking at winners
Net profit, profit factor, Sharpe ratio and drawdown measure different properties. A high profit factor from six trades is not directly comparable in evidential strength to a lower value from several hundred. A net-profit objective can favor larger exposure. A drawdown-adjusted objective can become unstable when its denominator is near zero.
Write down the objective, admissible parameter ranges and basic constraints before running the search. For example, compare net profit after costs subject to a predeclared minimum observation requirement and a maximum exposure policy. Do not keep changing the objective until the setting you prefer rises to the top.
If multiple objectives matter, show them together rather than hiding them inside an unexplained composite score. A Pareto comparison identifies settings that cannot improve one chosen metric without worsening another. It still requires a decision about tradeoffs. No ranking formula can remove that judgment.
Read the whole surface, not the winning row
A sharp optimum can arise from favorable noise, one exceptional trade, path-dependent position changes, sample quirks or extensive search. Discrete entry thresholds can also switch trades abruptly for a legitimate reason. A spike is sensitivity to investigate, not proof of overfitting. Conversely, nearby settings can all share the same biased data or lucky period. Smoothness alone does not establish a market mechanism.
The example below constructs 25 coordinates and four score cases. Lookback runs from 10 to 30 bars in steps of five. Threshold runs from 0.10% to 0.30% in steps of 0.05 percentage points. These are parameter labels, not recommended values. Every score is a hypothetical, already-net dollar total on a common exposure and horizon. No market data, trades or trading engine generated these numbers. No additional commission is subtracted.
Sharp Development has a $1,800 peak with losing neighbors. Plateau Development peaks at $1,120 within a nine-cell region above $1,000. Two counterexamples retain the same coordinates: Plateau weak OOS subtracts $1,400 from every plateau score, and Stable loss assigns −$200 everywhere. The negative OOS case is deliberately constructed, not a measured failure probability.
| Lookback (bars) | Threshold (%) | Sharp Development (USD) | Plateau Development (USD) | Plateau weak OOS (USD) | Stable loss (USD) |
|---|---|---|---|---|---|
| 10 | 0.10 | -240 | -140 | -1540 | -200 |
| 10 | 0.15 | -190 | 0 | -1400 | -200 |
| 10 | 0.20 | -140 | 140 | -1260 | -200 |
| 10 | 0.25 | -210 | 0 | -1400 | -200 |
| 10 | 0.30 | -280 | -140 | -1540 | -200 |
| 15 | 0.10 | -160 | 0 | -1400 | -200 |
| 15 | 0.15 | -110 | 1020 | -380 | -200 |
| 15 | 0.20 | -60 | 1060 | -340 | -200 |
| 15 | 0.25 | -130 | 1020 | -380 | -200 |
| 15 | 0.30 | -200 | 0 | -1400 | -200 |
| 20 | 0.10 | -80 | 140 | -1260 | -200 |
| 20 | 0.15 | -30 | 1080 | -320 | -200 |
| 20 | 0.20 | 1800 | 1120 | -280 | -200 |
| 20 | 0.25 | -50 | 1080 | -320 | -200 |
| 20 | 0.30 | -120 | 140 | -1260 | -200 |
| 25 | 0.10 | -120 | 0 | -1400 | -200 |
| 25 | 0.15 | -70 | 1020 | -380 | -200 |
| 25 | 0.20 | -20 | 1060 | -340 | -200 |
| 25 | 0.25 | -90 | 1020 | -380 | -200 |
| 25 | 0.30 | -160 | 0 | -1400 | -200 |
| 30 | 0.10 | -160 | -140 | -1540 | -200 |
| 30 | 0.15 | -110 | 0 | -1400 | -200 |
| 30 | 0.20 | -60 | 140 | -1260 | -200 |
| 30 | 0.25 | -130 | 0 | -1400 | -200 |
| 30 | 0.30 | -200 | -140 | -1540 | -200 |
Exact construction and reproducible files
Let i = row index − 2 and j = column index − 2, using zero-based indexes. Sharp is 1800 at i=j=0, otherwise 20 − 60(|i|+|j|) + 20i − 10j. Plateau is 1120 − 60|i| − 40|j| when max(|i|,|j|) ≤ 1, otherwise 420 − 140(|i|+|j|). Weak OOS is Plateau minus 1400. Stable loss is always −200.
Download fixture.json, the standalone runner and expected.json into one folder. With Node.js 22 or newer, node reproduce.mjs prints the complete result without packages or network access. Run it twice and compare with the expected file. node reproduce.mjs --write-assets regenerates the complete candidate CSV and both SVG figures from the same values. Verification instructions explain the exact assumptions. This is a teaching runner, not the EdgeVeris backtest engine.
Measure the neighborhood without hiding the peak
Inspect the fixed coordinate 20 bars, 0.20% in each case. Here, and only for this public example, neighbors are the directly adjacent horizontal and vertical cells, excluding the center. An interior cell has four, an edge three and a corner two. Diagonals are excluded. No value is invented beyond the grid. Different neighborhood definitions answer different questions and must not be silently interchanged.
| Measure | Definition and units | Interpretation and limit |
|---|---|---|
| Local median | median of neighboring scores, USD. For even counts, mean of the two middle sorted values. | Typical nearby result. Omits the center and hides tails if used alone. |
| Local worst | minimum neighboring score, USD. | Weakest tested immediate neighbor, not a worst future outcome. |
| Neighbor dispersion | maximum minus minimum neighboring score, USD. | Observed range, not a confidence interval. A small range can describe consistently bad neighbors. |
| Center gap | center score minus local median, USD. | How far the chosen point sits above or below its neighborhood. Prevents a lone peak from disappearing inside a neighbors-only dispersion measure. |
| Acceptable-region size and span | Number of cells connected to the inspected point by direct grid steps with score ≥ $1,000. Also report min/max lookback in bars and threshold in %. | Descriptive plateau-width proxy, not a universal quality threshold. Empty if the center fails. Spans do not prove every intermediate value works or form a filled rectangle. |
| Case | Center | Neighbor median | Neighbor worst | Neighbor range | Center gap | Region cells |
|---|---|---|---|---|---|---|
| Sharp Development | $1,800 | −$40 | −$60 | $40 | $1,840 | 1 |
| Plateau Development | $1,120 | $1,070 | $1,060 | $20 | $50 | 9 |
| Plateau weak OOS | −$280 | −$330 | −$340 | $20 | $50 | 0 |
| Stable loss | −$200 | −$200 | −$200 | $0 | $0 | 0 |
Sharp's neighbors are −$60, −$20, −$30 and −$50. Their median is −$40, range only $40, and center gap $1,840. Low neighbor dispersion did not make the center credible. Plateau's neighbors are $1,060, $1,060, $1,080 and $1,080. Their median is $1,070, worst $1,060 and center gap $50.
The $1,000 convention leaves Sharp with one qualifying cell, spanning 20 bars and 0.20% only. Plateau has nine, spanning 15–25 bars and 0.15%–0.25%. Neither component touches the tested boundary. Changing the threshold changes these counts. It must not be tuned afterward to produce a preferred verdict.
The runner returns all tied peak coordinates instead of declaring an arbitrary winner. Stable loss has 25 tied maxima. The fixed center is a comparison point chosen for this construction, not selected by consulting OOS. Boundary metrics use only existing neighbors and flag the boundary. They do not establish stability outside the tested range.
Stability is not the same as profit
- Stable but unprofitable: −$200 at every input has zero dispersion and no profitable setting. Optimizing smoothness alone would miss the economic failure.
- Profitable but unstable: Sharp's center shows +$1,800 while all immediate neighbors lose. That is a reason to inspect the changed trades and mechanism, not an automatic statistical diagnosis.
- Stable in Development, weak OOS: Plateau weak OOS keeps exactly the same shape and ranking after subtracting $1,400. Its best setting now loses $280. Even perfect rank preservation would not rescue its absolute result.
The last case explains why rank consistency and absolute OOS performance answer different questions. If using ranks across periods, disclose ties, common candidates and comparable exposure. Also show the actual results and sample sizes. This surface has no trade-level observations, so it cannot estimate uncertainty, risk-adjusted performance, PBO or DSR.
Define a neighborhood meaningfully
One step in lookback length is not necessarily comparable to one step in a price threshold. A grid with arbitrary spacing can make a surface look smooth or jagged. Choose ranges and increments based on what the inputs mean. For multiplicative quantities, proportional changes may be more meaningful than equal absolute increments.
Categorical inputs require different treatment. Switching a short-selling flag changes a class of trades rather than moving a small distance along a numeric axis. Compare the resulting exposure and sample composition directly. Do not assign artificial numeric distances to unrelated modes merely to draw a smooth surface.
Boundary winners also need attention. If the best result sits at the largest tested lookback, the search has not established an interior optimum. Expanding the range is another experiment and should be counted as such. Repeatedly expanding until a visually satisfying peak appears consumes information from the same development sample.
Keep turnover and costs visible
Suppose setting A has 200 trades and $1,000 net profit under base costs. Setting B has 500 trades and $1,300. An extra $2 of cost per round trip reduces A by $400 to $600 and B by $1,000 to $300. B wins under the base assumption but loses the comparison after a small cost change.
This arithmetic screen assumes the trade list remains unchanged. A full replay may change fills and later position state. Nevertheless, it immediately shows that B depends more heavily on execution. Report average net profit per trade and turnover alongside total profit so the source of the advantage is understandable. The cost-accounting tool checks quantity, per-side fees and already-net inputs without pretending to model real fills.
Do not reward a candidate for unrealistic fractional quantities or fills. Contract rounding, liquidity and simultaneous exposure are part of the tested policy. An optimization that chooses parameters using impossible execution can be mathematically consistent with its own assumptions and still unusable in practice.
Look for concentration in time and direction
Break development results into chronological blocks selected before judging them. Compare whether gains are distributed or dominated by one short interval. Review long and short sides separately, but remember that these are additional views of the same data rather than independent confirmations.
A strategy may legitimately specialize in a regime. The issue is whether that specialization has a defensible definition available before trading, enough observations and an out-of-sample check. Explaining a winning month after seeing it is easy. Turning the explanation into a rule that survives later data is a different task.
Trade counts should accompany subgroup statistics. A high average result from three trades cannot carry the same weight as a stable average across many independent opportunities. Conversely, a large raw trade count may overstate evidence if many trades respond to one event. Sessions or events can be more informative units of uncertainty.
Separate selection from validation
Use development data to choose a small shortlist or one final setting according to the declared process. Evaluate it on validation without changing the rules in response to every result. If validation leads to changes, record that it has become part of development for those decisions.
For example, select setting B because of its neighborhood and execution profile, then discover that validation produces −$400 while A would have produced +$300. Switching to A after inspecting both values is another selection step. You can make that decision, but A's validation result is no longer an untouched test of a preselected rule.
A final holdout should answer a narrow question about a locked strategy. Repeatedly opening it while searching settings defeats that purpose. New parameter labels or code versions do not make the same observations unseen again. Preserve the experimental history and obtain new evidence for later revisions. The walk-forward and reused-holdout example traces exactly when evaluation data begins to influence selection.
Count the research process, not just the final grid
Trying more alternatives creates more opportunities to select a favorable error. It does not make the highest Sharpe necessarily overfit. The relevant issue is how the winner was obtained, how dependent the alternatives are, and how much genuinely separate evidence remains.
A search budget includes candidate inputs, entry ideas, filters, exit rules, timeframes, objective changes and repeated revisions after inspecting results. Record attempted and failed runs, not just the final shortlist. A grid of 25 correlated settings is not 25 independent experiments. Conversely, recording only that grid understates the search if many earlier ideas were discarded. There is no universal safe number of combinations.
PBO and combinatorially symmetric cross-validation examine a selection procedure using aligned performance histories from the candidate set. The in-sample winner is compared with its out-of-sample rank across symmetric partitions. The result depends on the candidate universe, selection rule, partitions and relevant dependence. Missing discarded trials can bias the diagnosis. It is not the probability that a strategy will lose money next month. The original PBO paper also cautions against turning PBO itself into a search objective.
The Deflated Sharpe Ratio addresses an observed Sharpe relative to a selection-adjusted reference, with sampling uncertainty and non-normal returns considered under its assumptions. It needs more than the winning Sharpe: track-record length, return moments and defensible information about the search matter. Correlated trials complicate the effective trial count. DSR is not a general correction for a net-profit objective, does not fix look-ahead or unrealistic fills, and does not establish future profitability.
Neither method can be calculated honestly from this four-column score fixture, which contains no return histories. Do not manufacture diagnostic probabilities from a heatmap. Keep a traceable experiment record, a predeclared selection rule and separate evidence. Exploratory results remain useful for generating ideas when clearly labeled as such.
Use resampling without recycling the answer
Bootstrap or block-bootstrap analysis can examine uncertainty and dependence within a candidate's trade history. If you use that analysis to select the candidate, it becomes part of the selection process. It does not create fresh market observations or erase overfitting from the original search.
For path-dependent metrics such as maximum drawdown, preserve meaningful chronology or dependence when designing the resampling method. Randomly permuting trades answers an ordering question conditional on the same outcomes. Sampling blocks answers a different question. Neither should be called a universal worst-case forecast. The published synthetic dependence study holds trade outcomes fixed while changing sampling assumptions. Use the public Monte Carlo tool to inspect that path-risk distinction, not to validate a parameter plateau by itself.
Stress assumptions rather than optimizing stress scenarios away. If the strategy fails under a modest cost increase, investigate why. Repeatedly changing the strategy until it passes every displayed stress chart can overfit the stress suite too. Reserve some checks for the locked decision and document the rest as development.
A practical selection procedure
- Define the economic idea and the inputs that genuinely need estimation.
- Declare ranges, objective, cost assumptions and evaluation periods.
- Inspect the full surface and the trades behind unusual peaks.
- Compare neighboring settings, turnover and temporal concentration.
- Select a small shortlist using the declared criteria.
- Evaluate the locked choice on separate data and retain all results.
The outcome can be that no setting is convincing. Optimization is not obliged to produce a deployable strategy. Rejecting a fragile surface before paying for execution is a useful result. A platform should make that evidence easy to retain rather than encouraging a search until some row looks green.
When a setting is retained, save its exact inputs and all later analyses under the same identity. Validation, robustness and holdout provide different evidence about that setting. They should not silently inherit results from nearby parameters or from the last candidate opened in the interface.
Apply the distinction in EdgeVeris
- Keep the identity explicit. Start with the strategy code version and exact input set. A saved input label identifies parameters, not a promise that results share the same dates, data, quantity or costs.
- Declare the search. Configure the optimization range or explicit choices and objective. A finite grid can evaluate its combinations. Other search methods may sample the space, so a missing point must not be presented as an observed neighbor.
- Inspect candidate evidence. Review the recorded candidates and their parameter values, not only the winning score. Keep the search scope and execution assumptions with the result.
- Separate selection from later checks. Send the exact selected inputs to Validation and inspect saved Robustness parameter-neighborhood results where available. Boundary and unavailable scenarios are limited evidence, not successful tests.
- Keep later results attached to their actual inputs. A change creates a different setting. Follow the complete validation evidence chain for costs, path risk and final holdout discipline.
These are existing workflow capabilities, not a claim that the platform implements this article's four-neighbor teaching metric or certifies a plateau as safe. The public figures are reproducible methodology evidence, not screenshots of a customer's optimization. No private report is needed to check their arithmetic.
What stability can and cannot tell you
Stability means that a conclusion is not excessively sensitive to reasonable changes in specified assumptions. It does not mean the future will resemble the past. A broad parameter plateau can disappear in a new regime, and a stable historical mean can still have substantial downside uncertainty.
The best optimization result is therefore a defensible decision with a traceable process. You should be able to explain why the chosen setting was preferred, which alternatives were examined, what would invalidate the interpretation and where independent evidence begins. That is a more useful product than the largest number in a table.