What a Trading Model Is Actually Optimised For — Inside a Multi-Factor Fitness Function
A genetic algorithm doesn't find good models — it finds whatever the fitness function tells it to find.
In an evolutionary trading system, the fitness function is not a detail — it is the entire definition of what the system is trying to build. A genetic algorithm does not search for good models in any abstract sense; it searches for models that maximise the number the fitness function returns. If that number rewards the wrong thing, the algorithm will faithfully produce models that excel at the wrong thing. Designing the objective well is therefore the most consequential decision in the whole pipeline.
Why a Single Metric Fails
The temptation is to optimise for one obvious target — total return, say, or win rate. Every single-metric objective has a degenerate solution, and a sufficiently persistent optimiser will find it.
Optimise purely for return and the search gravitates toward models that take enormous risk for occasional large payoffs, because nothing in the objective penalises the drawdown required to get there. Optimise purely for win rate and the search discovers that closing trades the instant they show a tiny profit produces a wonderful-looking win rate attached to a negative expectancy — many small wins wiped out by the occasional large loss. The metric goes up while the model gets worse. This is the central reason a single number is never enough to define quality.
A Composite Objective
darwintIQ scores each model with a composite fitness built from several components that pull in different directions, so that no single degenerate behaviour can dominate the result.
At the core is expectancy — the average outcome per trade, expressed in risk terms. Expectancy is the closest thing to a ground-truth measure of edge, because it already combines win rate and the size of wins against losses into a single per-trade figure. It contributes the largest of the fitness boosts, which keeps the search anchored to genuine per-trade profitability rather than to surface statistics.
Layered on top are a profit factor component, which rewards models whose gross profits comfortably exceed their gross losses, and a return stability component, which rewards models whose results are produced consistently rather than concentrated in a handful of exceptional trades. Stability matters because two models with the same average can have completely different experiences attached to them: one steady, one lurching. The objective deliberately prefers the steady one.
Multipliers That Test Durability
Beyond the core score, fitness is adjusted by multipliers that ask not how good the results were, but how trustworthy they are.
A walk-forward multiplier reflects how the model behaves across rolling out-of-sample folds rather than on a single fitted window — a check on whether the edge repeats rather than appears once. A local robustness multiplier reflects how sensitive the model's results are to small perturbations; a model whose performance collapses under a slight change in its parameters is sitting on a fragile peak rather than a stable plateau, and the multiplier discounts it accordingly. A regime component can further soften fitness when the conditions the model was validated in diverge from those it is now operating in.
These multipliers are what separate a model that scored well by luck from one that scored well by structure. A strong core score multiplied by a weak robustness factor lands lower than a slightly lower core score that holds up under perturbation — which is exactly the ranking you want.
Crucially, the Score Is Train-Only
A composite objective is only as honest as the data it is computed on. In darwintIQ's pipeline the fitness statistics are calculated on the training portion of the evaluation window only, with the most recent slice held out so the optimiser never scores itself on data reserved for validation. A sophisticated objective computed on data the model was free to memorise would simply produce sophisticated overfitting. Keeping the score train-only is what lets the composite fitness measure edge rather than recall.
Final Thoughts
Reading a model's metrics is more intuitive once you know what the search was optimising for. The headline fitness number is not a measure of return — it is a blend of expectancy, profit factor, and stability, scaled by how well those results survive walk-forward testing and parameter perturbation, and computed on training data alone. A model rises to the top of the population not because it found the largest return, but because it scored well across an objective deliberately designed to make single-metric exploits unrewarding. That is the difference between a search that finds edges and one that finds artefacts.
Latest in Trading Model Design
- MACD as Entry Logic — When the Crossover Actually Has an Edge
- Regression Band Touch — Trading Mean Reversion With a Statistical Foundation
- Regime Filters — When a Trading Model Should Sit Out
- The ATR Position Manager — Stops That Move With the Market
- Bollinger Bands as Entry Logic: When the Setup Works and When It Doesn't
Related Articles
- What is a Regime Filter in a Trading Model?
- What Is a Pullback Trading Strategy — and Why Timing the Entry Is the Hard Part
- Drawdown Recovery Time — The Risk Dimension Most Traders Overlook
- Squeeze Breakout Trading — What Happens When Volatility Stops Compressing
- Failed Breakout Trading — When the False Break Is the Signal