ALGOCRUCIBLE ← Help Center
Help Center › Reading your results

How thorough is the optimization? (It samples — it doesn't sweep)

The short answer

It tries about a hundred combinations out of millions.

Take a real search with four parameters:

Parameter Range
Target 80 – 120
Stop 150 – 250
Signal Period 10 – 30
Filter Period 80 – 120

Every combination of those adds up to roughly 3.5 million possible settings. The default search tries 100 of them — around one in every thirty-five thousand. If those 3.5 million combinations were a stack of paper, the search reads the first page or two.

That sounds alarming. It isn't, and the reason is the point of this article.

How it picks the ones it tries

Think of searching a large lake for the best fishing spot.

The first ten casts are blind. The optimizer drops a line in ten places chosen at random, purely to get a feel for the water. No reasoning involved yet.

The rest are aimed. From there it looks at what it has caught so far and picks spots that look promising — closer to good results, away from bad ones. This is what "Bayesian" means in practice: each choice is informed by the previous results, rather than marching through a grid.

It casts several lines at once. Trials are sent to the platform in batches of eight, so it plans eight spots, runs all eight, then studies the results together. Over a 100-trial search that adds up to roughly a dozen moments where it stops and rethinks. Within a batch, the eight are chosen without knowing what the others found — that's the price of keeping the backtest engine busy, and it's why more trials help more than you'd guess.

Two things that surprise people

You get the same answer every time. The randomness is fixed deliberately, so a search is reproducible — same strategy, same data, same ranges gives the identical set of trials. Nothing new gets explored on a re-run.

This has a practical consequence worth remembering: raising the trial count continues the same search rather than starting a different one. If a result looks stuck, widening the ranges is what makes the optimizer look somewhere genuinely new.

Unusable attempts still cost you a trial. A combination that produces fewer than the minimum trade count is thrown out — it can't be judged fairly on a handful of trades — but it has already used one of your 100.

Why it isn't exhaustive on purpose

Searching harder is not automatically better, and past a point it actively hurts.

If you tested all 3.5 million combinations and took the single best, you would almost certainly have found a fluke: a combination that happens to fit the past very precisely and falls apart on data it hasn't seen. The more combinations you try, the more likely the winner is a fluke rather than an edge. This is the core problem the whole pipeline exists to catch.

What you actually want is not the tallest peak but a broad region where many nearby settings all work. A strategy sitting in the middle of such a region survives the market moving slightly. One sitting on a lone spike does not. You don't need exhaustive coverage to find a broad region — a well-aimed sample finds it perfectly well.

That's also why the optimization result is the weakest evidence in AlgoCrucible, not the strongest. The real tests come after: walk-forward checks the edge on data it never saw, the audit fixes one setting and grades it on two unseen periods, and perturbation nudges every parameter to see whether you're on a plateau or a cliff edge.

What to change, and when

The default is 100 trials, which suits a search over three or four parameters.

The one-line version

It's a smart sample, not a sweep — a few dozen well-chosen attempts, never full coverage. The question of whether it found something real is settled by walk-forward, audit and perturbation, not by the optimization itself.

← Help CenterCompare timeframes →

Risk Disclosure: Futures and forex trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing one's financial security or lifestyle. Only risk capital should be used for trading and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results.

Hypothetical Performance Disclosure: Hypothetical performance results have many inherent limitations, some of which are described below. No representation is being made that any account will or is likely to achieve profits or losses similar to those shown; in fact, there are frequently sharp differences between hypothetical performance results and the actual results subsequently achieved by any particular trading program. One of the limitations of hypothetical performance results is that they are generally prepared with the benefit of hindsight. In addition, hypothetical trading does not involve financial risk, and no hypothetical trading record can completely account for the impact of financial risk of actual trading. For example, the ability to withstand losses or to adhere to a particular trading program in spite of trading losses are material points which can also adversely affect actual trading results. There are numerous other factors related to the markets in general or to the implementation of any specific trading program which cannot be fully accounted for in the preparation of hypothetical performance results and all of which can adversely affect trading results.