Backtesting vs Forward-Testing | DNA Evolution Strategy Results | Genetic Programming Trading
Loading...
The Performance Score (also called "fitness" in evolution terminology) is a combined grade from 0 to 1 measuring how well a strategy performed in backtesting (testing against historical price data). It blends:
| Component | Weight | What It Measures |
|---|---|---|
| Win Rate | 30% | How often does the strategy make money? (winning trades / total trades) |
| Sharpe Ratio | 25% | How consistent are returns compared to risk? Higher = steadier profits |
| Profit Factor | 20% | Total money won divided by total money lost. Above 1.5 is good |
| Max Drawdown | 15% | The worst peak-to-trough loss. Smaller is better (penalty) |
| Trade Count | 10% | Did it trade enough times to be statistically meaningful? |
Important: These scores are from backtesting (historical simulation). Forward-testing performance (real-time paper trading) is tracked separately in the portfolios below and typically shows some decay vs backtested results — this is normal and expected.
Backtesting = testing strategies against past price data (750 hourly candles). Forward-testing = tracking live paper-trading picks in real-time. Forward results are always the true measure of a strategy's worth.
| Metric | GENESIS (GP) | ATLAS (MAPE) | NEXUS (Ensemble) | LEGION (Coevol) | HELIX (Classic) | CORTEX (NEAT) | ADAPT (Hyper) |
|---|---|---|---|---|---|---|---|
| Win Rate (BACKTEST - historical) | 65-76% | 55-75% | 68% (proxy) | 50-60% | 62-72% | 55-70% | 60-72% |
| Win Rate (FORWARD - live paper trading) | Tracking... | Tracking... | Tracking... | Tracking... | 58-68% | Tracking... | Tracking... |
| Sharpe Ratio (BACKTEST) | 17-42 | 0.3-0.7 | 1.8 | 0.4-0.5 | 1.5-2.5 | 0.5-1.2 | 1.0-2.0 |
| Sharpe Ratio (FORWARD - live) | Tracking... | Tracking... | Tracking... | Tracking... | 1.2-1.8 | Tracking... | Tracking... |
| Max Drawdown (Backtest) | -8% to -15% | -10% to -20% | -12% | -15% to -25% | -12% to -18% | -10% to -20% | -8% to -15% |
| Avg Holding Time | 4-24 bars | Varies by niche | N/A (meta) | 6-18 bars | 4-12h | 6-24 bars | 4-18 bars |
| DNA Type | Expression trees | Expression trees (archived) | Weight vectors | Team composition | Parameter genes | Neural topologies | Self-adaptive params |
| Strategies Evolved | 200+ | 35+ niches | 40+ source weights | 20+ ensembles | 1000+ combos | 8+ networks | 8+ configs |
Loading picks from DNA evolution engines...
Loading portfolio data...
| Feature | HELIX (Classic) | GENESIS (GP) | ATLAS (MAPE) | NEXUS (Ensemble) | LEGION (Coevol) | CORTEX (NEAT) | ADAPT (Hyper) |
|---|---|---|---|---|---|---|---|
| What DNA Evolves | Strategy parameters | Indicator formulas | Diverse niches | System trust weights | Voting teams | Neural topologies | Strategy parameters |
| DNA Representation | Gene array (floats) | Expression tree (nodes) | Expression tree + behavior | Weight vector (softmax) | Team + weights + consensus | Node + connection genes | Params + mutation rates |
| Evolution Type | Parameter tuning | Formula invention | Niche illumination | Meta-optimization | Cooperative coevolution | Topology complexification | Self-adaptive mutation |
| Crossover | Gene swap | Subtree exchange | Subtree + archive | Single-point vector | Member exchange | Innovation-aligned | Param + rate crossover |
| Mutation | Parameter perturbation | Subtree replacement | Subtree + rate adapt | Gaussian noise | Weight/member/consensus | Add node/connection | Epigenetic adaptation |
| Selection | Tournament (k=3) | Tournament (k=5) | Random archive elite | Tournament (k=2) | Tournament (k=3) | Species-based fitness | Tournament (k=3) |
| Output Type | 1 optimal config | Novel indicators | Diverse archive | Source weightings | Voting ensembles | Neural networks | Optimized configs |
| Lines of Code | 1,074 | 978 | 617 | 335 | 833 | 607 | 582 |
GENESIS evolves expression trees representing mathematical formulas. Each tree node is either a binary operator (add, sub, mul, div, max, min, gt, lt), a unary operator (neg, abs, sin, cos, tanh, log, sqrt, clip), an input feature (26 available: OHLCV, RSI, EMA, BB, MACD, ATR, OBV, VWAP), or a random constant.
The buy and sell signals are separate trees. Crossover swaps random subtrees between parents. Mutation replaces a random subtree with a freshly grown random tree. Adaptive mutation increases the rate from 0.15 to 0.40 when evolution stagnates for 3+ generations.
Fitness = weighted combination of win_rate, sharpe_ratio, profit_factor, max_drawdown, and trade_count. Hall of Fame seeding persists winners in SQLite across runs for cumulative improvement.
Based on Mouret & Clune (2015), MAP-Elites maintains a 5-dimensional archive grid (5x5x3x3x3 = 675 cells) where each cell holds the best strategy for a specific behavioral niche. Dimensions: trade frequency, risk profile, direction bias, regime preference, and formula complexity.
Instead of converging to one optimum, ATLAS illuminates the entire behavior space, discovering diverse strategy types: scalpers, swing traders, conservative, aggressive, mean-reversion, trend-following, etc. The QD Score (sum of all cell fitnesses) measures quality AND diversity simultaneously.
NEXUS evolves a weight vector of length 40+ (one per audit source system). The genome is in logit space; fitness evaluation applies softmax normalization to get positive weights summing to 1. Fitness combines: (1) weighted signal strength per symbol (direction x confidence x historical WR), (2) diversity reward (1 - std(weights)), and (3) entropy bonus (-sum(w * log(w))).
This is unique because it doesn't need market data directly — it reads existing pick files from all 40+ trading systems and evolves the optimal way to combine their opinions.
LEGION evolves teams of 3-8 strategies that vote together. The DNA encodes: member selection, voting weights, consensus mechanism (majority/weighted/unanimous/cascade/bayesian), veto powers, and participation thresholds. Fitness is evaluated at the ensemble level — the team's collective trading performance, not any individual member's.
Crossover swaps members between parent ensembles. Mutation can: perturb weights, add/remove members, switch consensus mechanism, or adjust thresholds. A mediocre strategy might be valuable if it provides unique perspective to the team.
Based on Stanley & Miikkulainen (2002), CORTEX evolves neural network topologies — both structure and weights simultaneously. Networks start minimal (inputs directly connected to outputs) and complexify over generations by adding nodes and connections through structural mutations.
Innovation numbers (historical markings) enable meaningful crossover between networks with different topologies. Species-based evolution protects new structural innovations from premature elimination, giving novel topologies time to optimize their weights. Each pick includes node count, connection complexity, species ID, and generation.
ADAPT evolves 20 strategy parameters (TP/SL multipliers, position sizing, regime sensitivity, indicator periods, etc.) with a unique twist: each parameter carries its own evolving mutation rate. Parameters that strongly affect fitness develop higher mutation rates (more exploration), while stable parameters converge (lower mutation rates).
Epigenetic importance tracking measures each parameter's sensitivity to fitness changes. High-importance parameters (like stop-loss multiplier) get fine-tuned more carefully, while low-importance ones are explored broadly. This self-adaptive mechanism outperforms fixed mutation rates in complex parameter spaces.
Instead of humans designing trading strategies, we use biological evolution to automatically discover profitable approaches. The DARWIN ENGINE runs 4 different types of DNA evolution simultaneously:
Each engine produces trading picks that are tracked in separate paper portfolios starting at $10,000. Over time, the engines that produce the best forward-testing results earn more capital allocation.
Imagine breeding dogs, but for trading strategies:
All of these run automatically every 30 minutes, testing thousands of possibilities and keeping only the winners. It's survival of the fittest — Darwin's evolution, but for trading strategies. That's why we call it the DARWIN ENGINE.
| Module | Lines | Purpose | DNA Type |
|---|---|---|---|
| genetic_programmer.py | 978 | GENESIS: Expression tree DNA evolution | GPNode trees |
| mape_evolver.py | 617 | ATLAS: Quality-diversity DNA evolution | Archived trees |
| audit_ensemble_evolver.py | 335 | NEXUS: Meta-weight DNA evolution | Weight vectors |
| ensemble_evolver.py | 833 | LEGION: Team DNA coevolution | Ensemble DNA |
| dna_engine.py | 1,074 | HELIX: Classic parameter DNA evolution | Gene arrays |
| neat_neural_evolver.py | 607 | CORTEX: NEAT topology DNA evolution | Node + connection genes |
| hyperparameter_dna_evolver.py | 582 | ADAPT: Self-adaptive parameter DNA evolution | Params + mutation rates |
| universal_evolver.py | 356 | Orchestrates all DNA evolution engines | All |
| darwin_portfolio_tracker.py | 280 | Paper portfolio per DNA evolution family | N/A |
| dna_backtester.py | 1,001 | Walk-forward DNA backtesting | All |
| quality_engine.py | 577 | 10-dimension DNA signal scoring | All |
| strategy_registry.py | 996 | Central DNA strategy registry | All |
| Total | 20,400+ | 38 modules | 7 DNA evolution engines | |