TL;DR
Walk-forward testing kept the genetic algorithm from overfitting in the usual sense. Across 256 folds on 8 of my strategies, the median drop from training Sharpe to out-of-sample Sharpe was between -0.13 and 0.23 for every variant. The large losses had a different cause. When mutation could turn puts into calls or set an order to thousands of contracts, 12 folds lost more than 30%, and one lost everything. After I locked the option structure and order units, none did in that test. In a follow-up of 96 folds, letting the GA flip comparisons (> to <) raised median out-of-sample Sharpe at high mutation from 0.03 and -0.36 to 0.56 and 0.61.
Out-of-sample return of every fold, by mutation rule
Main test: 8 strategies, 4 folds each, optimizing Sharpe and return, population 6 for 6 generations. Locked means option type, direction, expirations and order units cannot mutate.
Show the table · 256 rows, 9 columns
Scroll sideways to compare all columns. Select a heading to sort.
| Unrestricted mutation, run A | 0.1 | SPY iron condor | 1 | 0.09 | -0.67 | -9.0% | -12.15 | -0.7% |
| Unrestricted mutation, run A | 0.1 | SPY iron condor | 2 | -2.69 | -3.79 | -1.3% | -40.56 | -0.1% |
| Unrestricted mutation, run A | 0.1 | SPY iron condor | 3 | 0.76 | -0.73 | -41.8% | -77.93 | +0.0% |
| Unrestricted mutation, run A | 0.1 | SPY iron condor | 4 | -0.13 | 0.25 | -54.0% | -17.22 | -0.4% |
| Unrestricted mutation, run A | 0.1 | IWM RSI oversold | 1 | 1.14 | -0.06 | -99.9% | -1.69 | +2.0% |
| Unrestricted mutation, run A | 0.1 | IWM RSI oversold | 2 | -0.18 | -0.49 | -2.1% | -1.63 | +0.1% |
| Unrestricted mutation, run A | 0.1 | IWM RSI oversold | 3 | 0.39 | -0.60 | -10.6% | -0.37 | +1.6% |
| Unrestricted mutation, run A | 0.1 | IWM RSI oversold | 4 | -0.33 | 0.85 | +9.0% | 0.85 | +9.0% |
| Unrestricted mutation, run A | 0.1 | congress 2-buyer | 1 | 0.54 | 0.84 | +19.9% | 0.74 | +10.9% |
| Unrestricted mutation, run A | 0.1 | congress 2-buyer | 2 | 0.55 | 0.16 | +3.9% | 0.02 | +1.1% |
| Unrestricted mutation, run A | 0.1 | congress 2-buyer | 3 | 0.62 | -0.55 | -3.8% | -0.38 | -2.1% |
| Unrestricted mutation, run A | 0.1 | congress 2-buyer | 4 | 0.60 | 1.09 | +14.9% | 0.79 | +11.7% |
| Unrestricted mutation, run A | 0.1 | insider officer-director | 1 | 0.28 | 1.03 | +11.0% | 0.99 | +10.7% |
| Unrestricted mutation, run A | 0.1 | insider officer-director | 2 | 0.52 | 0.50 | +10.2% | 0.06 | +2.3% |
| Unrestricted mutation, run A | 0.1 | insider officer-director | 3 | 0.10 | 0.34 | +5.0% | 0.34 | +5.0% |
| Unrestricted mutation, run A | 0.1 | insider officer-director | 4 | 0.54 | 0.91 | +13.5% | 0.27 | +4.7% |
| Unrestricted mutation, run A | 0.1 | 13F accumulation | 1 | -0.01 | 1.08 | +14.8% | 1.23 | +28.1% |
| Unrestricted mutation, run A | 0.1 | 13F accumulation | 2 | -0.03 | 0.29 | +6.0% | 0.03 | +1.4% |
| Unrestricted mutation, run A | 0.1 | 13F accumulation | 3 | 0.05 | 1.24 | +22.4% | 1.49 | +30.7% |
| Unrestricted mutation, run A | 0.1 | 13F accumulation | 4 | 0.68 | -0.27 | -4.7% | -0.12 | -8.5% |
| Unrestricted mutation, run A | 0.1 | sentiment tech | 1 | -0.08 | -0.45 | -4.0% | 0.68 | +12.0% |
| Unrestricted mutation, run A | 0.1 | sentiment tech | 2 | 0.05 | 0.04 | +0.9% | 0.16 | +3.5% |
| Unrestricted mutation, run A | 0.1 | sentiment tech | 3 | 0.06 | 0.58 | +9.9% | -0.02 | +0.4% |
| Unrestricted mutation, run A | 0.1 | sentiment tech | 4 | 0.39 | -0.31 | -9.3% | -0.63 | -11.3% |
| Unrestricted mutation, run A | 0.1 | SP500 top-50 | 1 | 0.34 | 0.95 | +12.7% | 1.13 | +13.3% |
| Unrestricted mutation, run A | 0.1 | SP500 top-50 | 2 | 0.34 | -0.22 | -2.7% | 0.59 | +10.7% |
| Unrestricted mutation, run A | 0.1 | SP500 top-50 | 3 | 0.45 | 0.70 | +8.1% | 0.70 | +8.1% |
| Unrestricted mutation, run A | 0.1 | SP500 top-50 | 4 | 0.59 | 0.57 | +7.7% | 0.22 | +4.3% |
| Unrestricted mutation, run A | 0.1 | IWM put credit spread | 1 | 0.29 | 0.39 | +4.7% | 0.22 | +4.3% |
| Unrestricted mutation, run A | 0.1 | IWM put credit spread | 2 | -0.05 | -1.43 | -7.5% | -1.42 | -6.3% |
| Unrestricted mutation, run A | 0.1 | IWM put credit spread | 3 | 0.17 | -1.16 | +1.7% | 1.11 | +6.4% |
| Unrestricted mutation, run A | 0.1 | IWM put credit spread | 4 | 0.21 | 0.36 | +4.3% | -0.14 | +0.8% |
| Unrestricted mutation, run B | 0.1 | SPY iron condor | 1 | 1.11 | 1.31 | +25.6% | -12.15 | -0.7% |
| Unrestricted mutation, run B | 0.1 | SPY iron condor | 2 | 0.51 | -1.03 | -82.4% | -40.56 | -0.1% |
| Unrestricted mutation, run B | 0.1 | SPY iron condor | 3 | 0.94 | -3.23 | -82.3% | -77.93 | +0.0% |
| Unrestricted mutation, run B | 0.1 | SPY iron condor | 4 | 0.30 | -0.01 | -40.5% | -17.22 | -0.4% |
| Unrestricted mutation, run B | 0.1 | IWM RSI oversold | 1 | -0.34 | 0.43 | +5.8% | -1.69 | +2.0% |
| Unrestricted mutation, run B | 0.1 | IWM RSI oversold | 2 | 0.67 | -0.55 | -25.6% | -1.63 | +0.1% |
| Unrestricted mutation, run B | 0.1 | IWM RSI oversold | 3 | 0.02 | -0.37 | +0.6% | -0.37 | +1.6% |
| Unrestricted mutation, run B | 0.1 | IWM RSI oversold | 4 | -0.04 | 0.38 | -100.0% | 0.85 | +9.0% |
| Unrestricted mutation, run B | 0.1 | congress 2-buyer | 1 | 0.95 | 0.09 | +1.5% | 0.74 | +10.9% |
| Unrestricted mutation, run B | 0.1 | congress 2-buyer | 2 | 0.54 | -0.23 | -4.5% | 0.02 | +1.1% |
| Unrestricted mutation, run B | 0.1 | congress 2-buyer | 3 | 0.65 | -0.27 | -0.2% | -0.38 | -2.1% |
| Unrestricted mutation, run B | 0.1 | congress 2-buyer | 4 | 0.58 | 1.16 | +18.9% | 0.79 | +11.7% |
| Unrestricted mutation, run B | 0.1 | insider officer-director | 1 | 0.40 | 0.14 | +4.1% | 0.99 | +10.7% |
| Unrestricted mutation, run B | 0.1 | insider officer-director | 2 | 0.30 | 0.09 | +2.7% | 0.06 | +2.3% |
| Unrestricted mutation, run B | 0.1 | insider officer-director | 3 | 0.37 | 0.63 | +8.0% | 0.34 | +5.0% |
| Unrestricted mutation, run B | 0.1 | insider officer-director | 4 | 0.27 | 0.50 | +7.0% | 0.27 | +4.7% |
| Unrestricted mutation, run B | 0.1 | 13F accumulation | 1 | -0.26 | 1.65 | +29.2% | 1.23 | +28.1% |
| Unrestricted mutation, run B | 0.1 | 13F accumulation | 2 | 0.78 | 0.51 | +11.4% | 0.03 | +1.4% |
| Unrestricted mutation, run B | 0.1 | 13F accumulation | 3 | 0.60 | 1.05 | +17.1% | 1.49 | +30.7% |
| Unrestricted mutation, run B | 0.1 | 13F accumulation | 4 | 0.35 | 0.05 | -3.3% | -0.12 | -8.5% |
| Unrestricted mutation, run B | 0.1 | sentiment tech | 1 | -0.07 | 1.90 | +27.5% | 0.68 | +12.0% |
| Unrestricted mutation, run B | 0.1 | sentiment tech | 2 | 0.14 | 0.31 | +6.6% | 0.16 | +3.5% |
| Unrestricted mutation, run B | 0.1 | sentiment tech | 3 | 0.03 | 0.83 | +14.2% | -0.02 | +0.4% |
| Unrestricted mutation, run B | 0.1 | sentiment tech | 4 | 0.27 | -0.51 | -12.9% | -0.63 | -11.3% |
| Unrestricted mutation, run B | 0.1 | SP500 top-50 | 1 | 0.36 | 0.93 | +12.3% | 1.13 | +13.3% |
| Unrestricted mutation, run B | 0.1 | SP500 top-50 | 2 | 0.37 | -0.21 | -2.3% | 0.59 | +10.7% |
| Unrestricted mutation, run B | 0.1 | SP500 top-50 | 3 | 0.45 | 0.70 | +8.1% | 0.70 | +8.1% |
| Unrestricted mutation, run B | 0.1 | SP500 top-50 | 4 | 0.56 | 0.58 | +9.2% | 0.22 | +4.3% |
| Unrestricted mutation, run B | 0.1 | IWM put credit spread | 1 | 0.20 | 0.49 | +5.7% | 0.22 | +4.3% |
| Unrestricted mutation, run B | 0.1 | IWM put credit spread | 2 | -0.05 | -1.43 | -7.5% | -1.42 | -6.3% |
| Unrestricted mutation, run B | 0.1 | IWM put credit spread | 3 | 0.92 | -0.80 | +2.0% | 1.11 | +6.4% |
| Unrestricted mutation, run B | 0.1 | IWM put credit spread | 4 | 0.75 | -0.86 | +0.0% | -0.14 | +0.8% |
| Structure locks | 0.1 | SPY iron condor | 1 | -2.65 | -2.47 | +0.1% | -12.15 | -0.7% |
| Structure locks | 0.1 | SPY iron condor | 2 | 0.23 | -2.58 | +0.9% | -40.56 | -0.1% |
| Structure locks | 0.1 | SPY iron condor | 3 | -0.81 | -0.43 | -2.8% | -77.93 | +0.0% |
| Structure locks | 0.1 | SPY iron condor | 4 | -1.83 | -2.84 | +0.8% | -17.22 | -0.4% |
| Structure locks | 0.1 | IWM RSI oversold | 1 | -3.14 | -6.10 | -12.7% | -1.69 | +2.0% |
| Structure locks | 0.1 | IWM RSI oversold | 2 | 0.19 | -1.50 | -1.2% | -1.63 | +0.1% |
| Structure locks | 0.1 | IWM RSI oversold | 3 | -0.36 | -0.37 | +1.6% | -0.37 | +1.6% |
| Structure locks | 0.1 | IWM RSI oversold | 4 | 0.03 | 0.82 | +8.7% | 0.85 | +9.0% |
| Structure locks | 0.1 | congress 2-buyer | 1 | 0.56 | 0.81 | +11.5% | 0.74 | +10.9% |
| Structure locks | 0.1 | congress 2-buyer | 2 | 0.55 | -0.04 | -0.1% | 0.02 | +1.1% |
| Structure locks | 0.1 | congress 2-buyer | 3 | 0.69 | 0.32 | +5.2% | -0.38 | -2.1% |
| Structure locks | 0.1 | congress 2-buyer | 4 | 0.66 | 1.44 | +21.3% | 0.79 | +11.7% |
| Structure locks | 0.1 | insider officer-director | 1 | 0.58 | 0.76 | +10.8% | 0.99 | +10.7% |
| Structure locks | 0.1 | insider officer-director | 2 | 0.55 | 0.47 | +9.7% | 0.06 | +2.3% |
| Structure locks | 0.1 | insider officer-director | 3 | 0.46 | 0.33 | +5.5% | 0.34 | +5.0% |
| Structure locks | 0.1 | insider officer-director | 4 | 0.54 | 0.74 | +10.8% | 0.27 | +4.7% |
| Structure locks | 0.1 | 13F accumulation | 1 | 0.62 | 0.17 | +4.6% | 1.23 | +28.1% |
| Structure locks | 0.1 | 13F accumulation | 2 | 0.21 | 0.21 | +4.5% | 0.03 | +1.4% |
| Structure locks | 0.1 | 13F accumulation | 3 | 1.01 | 0.63 | +9.8% | 1.49 | +30.7% |
| Structure locks | 0.1 | 13F accumulation | 4 | 0.80 | 0.39 | +8.1% | -0.12 | -8.5% |
| Structure locks | 0.1 | sentiment tech | 1 | 0.03 | 0.83 | +13.6% | 0.68 | +12.0% |
| Structure locks | 0.1 | sentiment tech | 2 | 0.15 | 0.58 | +12.8% | 0.16 | +3.5% |
| Structure locks | 0.1 | sentiment tech | 3 | 0.08 | 0.36 | +6.7% | -0.02 | +0.4% |
| Structure locks | 0.1 | sentiment tech | 4 | 0.38 | -0.21 | -4.6% | -0.63 | -11.3% |
| Structure locks | 0.1 | SP500 top-50 | 1 | 0.33 | 0.88 | +12.1% | 1.13 | +13.3% |
| Structure locks | 0.1 | SP500 top-50 | 2 | 0.37 | -0.29 | -3.7% | 0.59 | +10.7% |
| Structure locks | 0.1 | SP500 top-50 | 3 | 0.46 | 0.64 | +7.6% | 0.70 | +8.1% |
| Structure locks | 0.1 | SP500 top-50 | 4 | 0.63 | 0.61 | +9.5% | 0.22 | +4.3% |
| Structure locks | 0.1 | IWM put credit spread | 1 | 0.21 | 0.22 | +4.3% | 0.22 | +4.3% |
| Structure locks | 0.1 | IWM put credit spread | 2 | -0.19 | -1.42 | -6.3% | -1.42 | -6.3% |
| Structure locks | 0.1 | IWM put credit spread | 3 | 0.05 | 0.38 | +3.8% | 1.11 | +6.4% |
| Structure locks | 0.1 | IWM put credit spread | 4 | 0.21 | 0.67 | +3.9% | -0.14 | +0.8% |
| Structure locks + worst-window fitness | 0.1 | SPY iron condor | 1 | -11.43 | -8.07 | -0.3% | -12.15 | -0.7% |
| Structure locks + worst-window fitness | 0.1 | SPY iron condor | 2 | -0.80 | -0.75 | -8.6% | -40.56 | -0.1% |
| Structure locks + worst-window fitness | 0.1 | SPY iron condor | 3 | -10.77 | -21.33 | -0.0% | -77.93 | +0.0% |
| Structure locks + worst-window fitness | 0.1 | SPY iron condor | 4 | -0.67 | -1.51 | -25.8% | -17.22 | -0.4% |
| Structure locks + worst-window fitness | 0.1 | IWM RSI oversold | 1 | -2.61 | -4.12 | -8.3% | -1.69 | +2.0% |
| Structure locks + worst-window fitness | 0.1 | IWM RSI oversold | 2 | 0.13 | -2.64 | -27.0% | -1.63 | +0.1% |
| Structure locks + worst-window fitness | 0.1 | IWM RSI oversold | 3 | -0.36 | -0.37 | +1.6% | -0.37 | +1.6% |
| Structure locks + worst-window fitness | 0.1 | IWM RSI oversold | 4 | -0.38 | 0.20 | +4.1% | 0.85 | +9.0% |
| Structure locks + worst-window fitness | 0.1 | congress 2-buyer | 1 | 0.50 | 0.63 | +9.1% | 0.74 | +10.9% |
| Structure locks + worst-window fitness | 0.1 | congress 2-buyer | 2 | 0.55 | -0.04 | -0.1% | 0.02 | +1.1% |
| Structure locks + worst-window fitness | 0.1 | congress 2-buyer | 3 | 0.56 | -0.57 | -2.8% | -0.38 | -2.1% |
| Structure locks + worst-window fitness | 0.1 | congress 2-buyer | 4 | 0.72 | 1.11 | +16.1% | 0.79 | +11.7% |
| Structure locks + worst-window fitness | 0.1 | insider officer-director | 1 | 0.43 | 1.20 | +14.2% | 0.99 | +10.7% |
| Structure locks + worst-window fitness | 0.1 | insider officer-director | 2 | 0.45 | 0.15 | +3.6% | 0.06 | +2.3% |
| Structure locks + worst-window fitness | 0.1 | insider officer-director | 3 | 0.48 | 0.03 | +2.3% | 0.34 | +5.0% |
| Structure locks + worst-window fitness | 0.1 | insider officer-director | 4 | 0.54 | 0.57 | +7.8% | 0.27 | +4.7% |
| Structure locks + worst-window fitness | 0.1 | 13F accumulation | 1 | -0.03 | -0.16 | +1.4% | 1.23 | +28.1% |
| Structure locks + worst-window fitness | 0.1 | 13F accumulation | 2 | 0.63 | 0.50 | +10.3% | 0.03 | +1.4% |
| Structure locks + worst-window fitness | 0.1 | 13F accumulation | 3 | 0.63 | 0.02 | +1.6% | 1.49 | +30.7% |
| Structure locks + worst-window fitness | 0.1 | 13F accumulation | 4 | 0.32 | -0.13 | -0.3% | -0.12 | -8.5% |
| Structure locks + worst-window fitness | 0.1 | sentiment tech | 1 | 0.05 | 0.98 | +15.9% | 0.68 | +12.0% |
| Structure locks + worst-window fitness | 0.1 | sentiment tech | 2 | 0.06 | 0.38 | +7.9% | 0.16 | +3.5% |
| Structure locks + worst-window fitness | 0.1 | sentiment tech | 3 | -0.07 | -0.16 | -1.9% | -0.02 | +0.4% |
| Structure locks + worst-window fitness | 0.1 | sentiment tech | 4 | 0.29 | -0.13 | -5.9% | -0.63 | -11.3% |
| Structure locks + worst-window fitness | 0.1 | SP500 top-50 | 1 | 0.24 | 0.90 | +10.6% | 1.13 | +13.3% |
| Structure locks + worst-window fitness | 0.1 | SP500 top-50 | 2 | 0.31 | 0.50 | +9.0% | 0.59 | +10.7% |
| Structure locks + worst-window fitness | 0.1 | SP500 top-50 | 3 | 0.47 | 0.56 | +6.8% | 0.70 | +8.1% |
| Structure locks + worst-window fitness | 0.1 | SP500 top-50 | 4 | 0.59 | 0.59 | +7.4% | 0.22 | +4.3% |
| Structure locks + worst-window fitness | 0.1 | IWM put credit spread | 1 | 0.66 | 2.08 | +14.1% | 0.22 | +4.3% |
| Structure locks + worst-window fitness | 0.1 | IWM put credit spread | 2 | 0.24 | -0.70 | -9.1% | -1.42 | -6.3% |
| Structure locks + worst-window fitness | 0.1 | IWM put credit spread | 3 | 0.26 | -8.02 | +0.4% | 1.11 | +6.4% |
| Structure locks + worst-window fitness | 0.1 | IWM put credit spread | 4 | 0.02 | 0.80 | +7.5% | -0.14 | +0.8% |
| Unrestricted mutation, run A | 0.9 | SPY iron condor | 1 | -0.98 | 0.58 | +10.1% | -12.15 | -0.7% |
| Unrestricted mutation, run A | 0.9 | SPY iron condor | 2 | 0.76 | 0.33 | -2.1% | -40.56 | -0.1% |
| Unrestricted mutation, run A | 0.9 | SPY iron condor | 3 | 0.26 | -1.54 | -92.4% | -77.93 | +0.0% |
| Unrestricted mutation, run A | 0.9 | SPY iron condor | 4 | -1.20 | -3.54 | -6.0% | -17.22 | -0.4% |
| Unrestricted mutation, run A | 0.9 | IWM RSI oversold | 1 | 0.41 | 0.61 | +10.9% | -1.69 | +2.0% |
| Unrestricted mutation, run A | 0.9 | IWM RSI oversold | 2 | 0.62 | -0.39 | -3.9% | -1.63 | +0.1% |
| Unrestricted mutation, run A | 0.9 | IWM RSI oversold | 3 | 0.04 | -1.47 | -49.0% | -0.37 | +1.6% |
| Unrestricted mutation, run A | 0.9 | IWM RSI oversold | 4 | 0.10 | -0.85 | -29.0% | 0.85 | +9.0% |
| Unrestricted mutation, run A | 0.9 | congress 2-buyer | 1 | 0.40 | 0.29 | +6.5% | 0.74 | +10.9% |
| Unrestricted mutation, run A | 0.9 | congress 2-buyer | 2 | 0.53 | -0.05 | +0.1% | 0.02 | +1.1% |
| Unrestricted mutation, run A | 0.9 | congress 2-buyer | 3 | 0.64 | 0.21 | +4.1% | -0.38 | -2.1% |
| Unrestricted mutation, run A | 0.9 | congress 2-buyer | 4 | 0.64 | 1.14 | +17.5% | 0.79 | +11.7% |
| Unrestricted mutation, run A | 0.9 | insider officer-director | 1 | 0.44 | 0.62 | +8.4% | 0.99 | +10.7% |
| Unrestricted mutation, run A | 0.9 | insider officer-director | 2 | 0.47 | 0.54 | +10.8% | 0.06 | +2.3% |
| Unrestricted mutation, run A | 0.9 | insider officer-director | 3 | 0.50 | 0.28 | +4.9% | 0.34 | +5.0% |
| Unrestricted mutation, run A | 0.9 | insider officer-director | 4 | 0.27 | 0.50 | +7.0% | 0.27 | +4.7% |
| Unrestricted mutation, run A | 0.9 | 13F accumulation | 1 | 0.30 | 1.64 | +20.6% | 1.23 | +28.1% |
| Unrestricted mutation, run A | 0.9 | 13F accumulation | 2 | 0.29 | 0.32 | +6.8% | 0.03 | +1.4% |
| Unrestricted mutation, run A | 0.9 | 13F accumulation | 3 | 0.17 | 0.11 | +3.1% | 1.49 | +30.7% |
| Unrestricted mutation, run A | 0.9 | 13F accumulation | 4 | 0.41 | 1.42 | +23.2% | -0.12 | -8.5% |
| Unrestricted mutation, run A | 0.9 | sentiment tech | 1 | -0.08 | -0.30 | -1.2% | 0.68 | +12.0% |
| Unrestricted mutation, run A | 0.9 | sentiment tech | 2 | 0.04 | 0.44 | +9.5% | 0.16 | +3.5% |
| Unrestricted mutation, run A | 0.9 | sentiment tech | 3 | 0.23 | 0.94 | +14.9% | -0.02 | +0.4% |
| Unrestricted mutation, run A | 0.9 | sentiment tech | 4 | 0.26 | -0.28 | -7.9% | -0.63 | -11.3% |
| Unrestricted mutation, run A | 0.9 | SP500 top-50 | 1 | 0.33 | 0.80 | +11.5% | 1.13 | +13.3% |
| Unrestricted mutation, run A | 0.9 | SP500 top-50 | 2 | 0.35 | -0.21 | -2.7% | 0.59 | +10.7% |
| Unrestricted mutation, run A | 0.9 | SP500 top-50 | 3 | 0.46 | 0.34 | +5.0% | 0.70 | +8.1% |
| Unrestricted mutation, run A | 0.9 | SP500 top-50 | 4 | 0.56 | 0.58 | +9.2% | 0.22 | +4.3% |
| Unrestricted mutation, run A | 0.9 | IWM put credit spread | 1 | -0.43 | 0.19 | +4.2% | 0.22 | +4.3% |
| Unrestricted mutation, run A | 0.9 | IWM put credit spread | 2 | 0.44 | -2.97 | -19.1% | -1.42 | -6.3% |
| Unrestricted mutation, run A | 0.9 | IWM put credit spread | 3 | 0.48 | -0.91 | +1.9% | 1.11 | +6.4% |
| Unrestricted mutation, run A | 0.9 | IWM put credit spread | 4 | 0.16 | -0.80 | -6.8% | -0.14 | +0.8% |
| Unrestricted mutation, run B | 0.9 | SPY iron condor | 1 | 0.53 | -1.01 | -68.0% | -12.15 | -0.7% |
| Unrestricted mutation, run B | 0.9 | SPY iron condor | 2 | 1.75 | 1.62 | -42.0% | -40.56 | -0.1% |
| Unrestricted mutation, run B | 0.9 | SPY iron condor | 3 | 1.21 | 0.39 | -4.6% | -77.93 | +0.0% |
| Unrestricted mutation, run B | 0.9 | SPY iron condor | 4 | 0.76 | 0.55 | +12.0% | -17.22 | -0.4% |
| Unrestricted mutation, run B | 0.9 | IWM RSI oversold | 1 | -4.13 | -1.69 | +2.0% | -1.69 | +2.0% |
| Unrestricted mutation, run B | 0.9 | IWM RSI oversold | 2 | -0.46 | -1.63 | +0.1% | -1.63 | +0.1% |
| Unrestricted mutation, run B | 0.9 | IWM RSI oversold | 3 | -1.20 | -1.51 | -34.8% | -0.37 | +1.6% |
| Unrestricted mutation, run B | 0.9 | IWM RSI oversold | 4 | -0.88 | 0.85 | +9.0% | 0.85 | +9.0% |
| Unrestricted mutation, run B | 0.9 | congress 2-buyer | 1 | 0.62 | 1.14 | +17.2% | 0.74 | +10.9% |
| Unrestricted mutation, run B | 0.9 | congress 2-buyer | 2 | 0.54 | 0.08 | +2.1% | 0.02 | +1.1% |
| Unrestricted mutation, run B | 0.9 | congress 2-buyer | 3 | 0.59 | -0.38 | -2.1% | -0.38 | -2.1% |
| Unrestricted mutation, run B | 0.9 | congress 2-buyer | 4 | 0.55 | 1.05 | +15.9% | 0.79 | +11.7% |
| Unrestricted mutation, run B | 0.9 | insider officer-director | 1 | 0.44 | 0.97 | +12.2% | 0.99 | +10.7% |
| Unrestricted mutation, run B | 0.9 | insider officer-director | 2 | 0.29 | 0.14 | +3.5% | 0.06 | +2.3% |
| Unrestricted mutation, run B | 0.9 | insider officer-director | 3 | 0.37 | 0.74 | +8.7% | 0.34 | +5.0% |
| Unrestricted mutation, run B | 0.9 | insider officer-director | 4 | 0.31 | 0.22 | +4.3% | 0.27 | +4.7% |
| Unrestricted mutation, run B | 0.9 | 13F accumulation | 1 | 0.25 | 1.41 | +18.9% | 1.23 | +28.1% |
| Unrestricted mutation, run B | 0.9 | 13F accumulation | 2 | 0.44 | -1.27 | -17.8% | 0.03 | +1.4% |
| Unrestricted mutation, run B | 0.9 | 13F accumulation | 3 | -0.09 | 0.69 | +13.2% | 1.49 | +30.7% |
| Unrestricted mutation, run B | 0.9 | 13F accumulation | 4 | 1.35 | -1.22 | -16.8% | -0.12 | -8.5% |
| Unrestricted mutation, run B | 0.9 | sentiment tech | 1 | -0.03 | -0.46 | -3.7% | 0.68 | +12.0% |
| Unrestricted mutation, run B | 0.9 | sentiment tech | 2 | 0.06 | 0.39 | +8.1% | 0.16 | +3.5% |
| Unrestricted mutation, run B | 0.9 | sentiment tech | 3 | -0.09 | 0.00 | +0.8% | -0.02 | +0.4% |
| Unrestricted mutation, run B | 0.9 | sentiment tech | 4 | 0.32 | -0.28 | -8.0% | -0.63 | -11.3% |
| Unrestricted mutation, run B | 0.9 | SP500 top-50 | 1 | 0.29 | 1.08 | +13.0% | 1.13 | +13.3% |
| Unrestricted mutation, run B | 0.9 | SP500 top-50 | 2 | 0.31 | 0.51 | +8.4% | 0.59 | +10.7% |
| Unrestricted mutation, run B | 0.9 | SP500 top-50 | 3 | 0.48 | 0.70 | +8.2% | 0.70 | +8.1% |
| Unrestricted mutation, run B | 0.9 | SP500 top-50 | 4 | 0.58 | 0.56 | +8.0% | 0.22 | +4.3% |
| Unrestricted mutation, run B | 0.9 | IWM put credit spread | 1 | 0.20 | 0.49 | +5.7% | 0.22 | +4.3% |
| Unrestricted mutation, run B | 0.9 | IWM put credit spread | 2 | -0.19 | -1.42 | -6.3% | -1.42 | -6.3% |
| Unrestricted mutation, run B | 0.9 | IWM put credit spread | 3 | 0.45 | -1.64 | +1.3% | 1.11 | +6.4% |
| Unrestricted mutation, run B | 0.9 | IWM put credit spread | 4 | 0.12 | 1.00 | +8.9% | -0.14 | +0.8% |
| Structure locks | 0.9 | SPY iron condor | 1 | -9.87 | -8.84 | -0.6% | -12.15 | -0.7% |
| Structure locks | 0.9 | SPY iron condor | 2 | -1.66 | -0.72 | -5.9% | -40.56 | -0.1% |
| Structure locks | 0.9 | SPY iron condor | 3 | -0.64 | -0.19 | +1.6% | -77.93 | +0.0% |
| Structure locks | 0.9 | SPY iron condor | 4 | -6.49 | -5.72 | -0.7% | -17.22 | -0.4% |
| Structure locks | 0.9 | IWM RSI oversold | 1 | -25.25 | -3.51 | +1.4% | -1.69 | +2.0% |
| Structure locks | 0.9 | IWM RSI oversold | 2 | -0.46 | -1.63 | +0.1% | -1.63 | +0.1% |
| Structure locks | 0.9 | IWM RSI oversold | 3 | -0.36 | -0.37 | +1.6% | -0.37 | +1.6% |
| Structure locks | 0.9 | IWM RSI oversold | 4 | -0.40 | 0.20 | +4.1% | 0.85 | +9.0% |
| Structure locks | 0.9 | congress 2-buyer | 1 | 0.49 | 0.93 | +11.6% | 0.74 | +10.9% |
| Structure locks | 0.9 | congress 2-buyer | 2 | 0.55 | -0.04 | -0.1% | 0.02 | +1.1% |
| Structure locks | 0.9 | congress 2-buyer | 3 | 0.59 | -0.38 | -2.1% | -0.38 | -2.1% |
| Structure locks | 0.9 | congress 2-buyer | 4 | 0.73 | 1.30 | +17.6% | 0.79 | +11.7% |
| Structure locks | 0.9 | insider officer-director | 1 | 0.48 | 0.75 | +10.5% | 0.99 | +10.7% |
| Structure locks | 0.9 | insider officer-director | 2 | 0.51 | -0.12 | -1.1% | 0.06 | +2.3% |
| Structure locks | 0.9 | insider officer-director | 3 | 0.44 | -0.19 | +0.3% | 0.34 | +5.0% |
| Structure locks | 0.9 | insider officer-director | 4 | 0.59 | 1.29 | +15.5% | 0.27 | +4.7% |
| Structure locks | 0.9 | 13F accumulation | 1 | 0.60 | -0.13 | +0.7% | 1.23 | +28.1% |
| Structure locks | 0.9 | 13F accumulation | 2 | 0.78 | 0.79 | +17.1% | 0.03 | +1.4% |
| Structure locks | 0.9 | 13F accumulation | 3 | 0.89 | 0.50 | +8.4% | 1.49 | +30.7% |
| Structure locks | 0.9 | 13F accumulation | 4 | 0.93 | -0.96 | -14.6% | -0.12 | -8.5% |
| Structure locks | 0.9 | sentiment tech | 1 | 0.06 | 1.10 | +21.0% | 0.68 | +12.0% |
| Structure locks | 0.9 | sentiment tech | 2 | 0.14 | -0.17 | -4.7% | 0.16 | +3.5% |
| Structure locks | 0.9 | sentiment tech | 3 | 0.07 | 0.85 | +15.8% | -0.02 | +0.4% |
| Structure locks | 0.9 | sentiment tech | 4 | 0.38 | -0.42 | -10.8% | -0.63 | -11.3% |
| Structure locks | 0.9 | SP500 top-50 | 1 | 0.32 | 1.09 | +11.2% | 1.13 | +13.3% |
| Structure locks | 0.9 | SP500 top-50 | 2 | 0.38 | -0.32 | -3.9% | 0.59 | +10.7% |
| Structure locks | 0.9 | SP500 top-50 | 3 | 0.45 | 0.70 | +8.1% | 0.70 | +8.1% |
| Structure locks | 0.9 | SP500 top-50 | 4 | 0.60 | 0.36 | +6.1% | 0.22 | +4.3% |
| Structure locks | 0.9 | IWM put credit spread | 1 | 0.44 | 1.18 | +8.6% | 0.22 | +4.3% |
| Structure locks | 0.9 | IWM put credit spread | 2 | -14.33 | -968.92 | +0.0% | -1.42 | -6.3% |
| Structure locks | 0.9 | IWM put credit spread | 3 | 0.37 | 2.16 | +7.8% | 1.11 | +6.4% |
| Structure locks | 0.9 | IWM put credit spread | 4 | 0.33 | -0.74 | -4.4% | -0.14 | +0.8% |
| Structure locks + worst-window fitness | 0.9 | SPY iron condor | 1 | 0.42 | 0.12 | +4.1% | -12.15 | -0.7% |
| Structure locks + worst-window fitness | 0.9 | SPY iron condor | 2 | -0.60 | -0.85 | -13.0% | -40.56 | -0.1% |
| Structure locks + worst-window fitness | 0.9 | SPY iron condor | 3 | 0.12 | 1.37 | +14.3% | -77.93 | +0.0% |
| Structure locks + worst-window fitness | 0.9 | SPY iron condor | 4 | -0.43 | -0.14 | +0.8% | -17.22 | -0.4% |
| Structure locks + worst-window fitness | 0.9 | IWM RSI oversold | 1 | -3.65 | -1.15 | +2.0% | -1.69 | +2.0% |
| Structure locks + worst-window fitness | 0.9 | IWM RSI oversold | 2 | -0.46 | -1.63 | +0.1% | -1.63 | +0.1% |
| Structure locks + worst-window fitness | 0.9 | IWM RSI oversold | 3 | -0.36 | -0.37 | +1.6% | -0.37 | +1.6% |
| Structure locks + worst-window fitness | 0.9 | IWM RSI oversold | 4 | -0.67 | 0.22 | +4.0% | 0.85 | +9.0% |
| Structure locks + worst-window fitness | 0.9 | congress 2-buyer | 1 | 0.42 | 0.30 | +6.4% | 0.74 | +10.9% |
| Structure locks + worst-window fitness | 0.9 | congress 2-buyer | 2 | 0.50 | 0.02 | +1.1% | 0.02 | +1.1% |
| Structure locks + worst-window fitness | 0.9 | congress 2-buyer | 3 | 0.59 | 0.43 | +6.8% | -0.38 | -2.1% |
| Structure locks + worst-window fitness | 0.9 | congress 2-buyer | 4 | 0.60 | 2.09 | +28.8% | 0.79 | +11.7% |
| Structure locks + worst-window fitness | 0.9 | insider officer-director | 1 | 0.60 | 0.97 | +12.5% | 0.99 | +10.7% |
| Structure locks + worst-window fitness | 0.9 | insider officer-director | 2 | 0.52 | 0.52 | +9.5% | 0.06 | +2.3% |
| Structure locks + worst-window fitness | 0.9 | insider officer-director | 3 | 0.37 | 0.77 | +9.7% | 0.34 | +5.0% |
| Structure locks + worst-window fitness | 0.9 | insider officer-director | 4 | 0.47 | 0.95 | +12.1% | 0.27 | +4.7% |
| Structure locks + worst-window fitness | 0.9 | 13F accumulation | 1 | 0.21 | 0.04 | +2.0% | 1.23 | +28.1% |
| Structure locks + worst-window fitness | 0.9 | 13F accumulation | 2 | 0.22 | 0.75 | +17.6% | 0.03 | +1.4% |
| Structure locks + worst-window fitness | 0.9 | 13F accumulation | 3 | 0.88 | 0.50 | +8.0% | 1.49 | +30.7% |
| Structure locks + worst-window fitness | 0.9 | 13F accumulation | 4 | 1.25 | -0.88 | -13.4% | -0.12 | -8.5% |
| Structure locks + worst-window fitness | 0.9 | sentiment tech | 1 | -0.01 | 1.22 | +19.3% | 0.68 | +12.0% |
| Structure locks + worst-window fitness | 0.9 | sentiment tech | 2 | 0.04 | 0.16 | +3.5% | 0.16 | +3.5% |
| Structure locks + worst-window fitness | 0.9 | sentiment tech | 3 | 0.08 | -0.55 | -7.8% | -0.02 | +0.4% |
| Structure locks + worst-window fitness | 0.9 | sentiment tech | 4 | 0.25 | -0.28 | -5.0% | -0.63 | -11.3% |
| Structure locks + worst-window fitness | 0.9 | SP500 top-50 | 1 | 0.25 | 0.82 | +9.2% | 1.13 | +13.3% |
| Structure locks + worst-window fitness | 0.9 | SP500 top-50 | 2 | 0.28 | 0.48 | +7.8% | 0.59 | +10.7% |
| Structure locks + worst-window fitness | 0.9 | SP500 top-50 | 3 | 0.47 | 0.00 | +2.6% | 0.70 | +8.1% |
| Structure locks + worst-window fitness | 0.9 | SP500 top-50 | 4 | 0.60 | 0.27 | +4.8% | 0.22 | +4.3% |
| Structure locks + worst-window fitness | 0.9 | IWM put credit spread | 1 | -53.46 | 0.22 | +4.3% | ||
| Structure locks + worst-window fitness | 0.9 | IWM put credit spread | 2 | -0.24 | -2.88 | -16.0% | -1.42 | -6.3% |
| Structure locks + worst-window fitness | 0.9 | IWM put credit spread | 3 | 0.35 | -0.91 | +1.9% | 1.11 | +6.4% |
| Structure locks + worst-window fitness | 0.9 | IWM put credit spread | 4 | 0.05 | 0.31 | +4.8% | -0.14 | +0.8% |
No matching rows. Clear the filter to see all records.
Every fold from the main test. One fold of the worst-window variant at intensity 0.9 has no Sharpe.
All 12 of those losses came from two options strategies: a SPY iron condor and an IWM put spread that opens when RSI is oversold. Left unchanged, both were roughly flat in the same windows. In this test the locked variants also kept each comparison pointing the same way, so the follow-up test let comparisons flip again with the locks still on. Its worst fold was -47.9%, against -100% without locks. Scoring each candidate by its worst training window instead of its average did not change the worst folds.
The candidate that turned $500,000 into $4.23 million
STRATEGY I WROTE
Legs short put delta 0.15, 21-45 DTE
long put $5 OTM, 21-45 DTE
Size 50% of buying power
Enter when Open option spread count (IWM short put vertical) = 0
and 14 Day IWM RSI < 35
and Days Since Strategy Fired >= 5
Exit check Constant 1 > Constant 0
CANDIDATE THE GA PICKED
Legs long call 8.473369% OTM, 34-331 DTE
short call $21.719483 OTM, 13-321 DTE
Size 2,199 contracts
Enter when Open option spread count (IWM short put vertical) < 300918.98146937194
and 806 Day IWM RSI != 46.787602928829
and Days Since Strategy Fired != 0
Exit check Constant 480.9412735783046 = Constant 80.18862589494859- Out-of-sample return
- +745.6%fold 4, 2026-03-17 to 2026-11-23
- Win rate
- 99.7%226 settled trades
The candidate on the right enters almost every day and never exits. Its entry only needs the 806-day RSI to differ from 46.79, and its exit runs only when 480.94 equals 80.19. Mutation also swapped the puts for calls, gave each leg a different expiration and set the size to 2,199 contracts. Validation picked it because a large call position that is never closed made money in a rally.
The backtest handled it correctly: fills used real quotes and buying power capped every order. The GA found a broken strategy that happened to win. This came from my first run, the production GA at intensity 0.1.
One generation, as the optimizer runs it
// 1. Pick parents: binary tournament on Pareto rank, then crowding distance
let parent1 = self.select_parent_tournament(population)?;
let parent2 = self.select_parent_tournament(population)?;
// 2. Breed: crossover swaps genes between parents, then each child mutates
let (mut child1, mut child2) = self.optimization_type.crossover_pair(parent1, parent2)?;
self.optimization_type.mutate(&mut child1, self.mutation_rate, self.mutation_intensity, ..)?;
// 3. Score parents + children on every training window, for every objective
combined_population.calculate_fitness(.., &self.fitness_functions, .., self.num_windows, ..)
// 4. Keep the best: NSGA-II non-dominated sort, then truncate
sorted_population.apply_nsga_ii(&self.fitness_functions, ..);
sorted_population.truncate(self.population_size);The GA starts from the strategy you wrote. Mutation intensity sets how far each gene can move. I tested the two values NexusTrade uses: 0.1 inside walk-forward and 0.9 in the standalone optimizer. The 0.9 runs also added 20% random new candidates each generation.
- Population
- 6walk-forward default
- Generations
- 6per fold
- Training windows
- 3overlapping
- Mutation intensity
- 0.1 / 0.9walk-forward / standalone optimizer
What a mutation may change, before and after this study
Under the old rules, a spread count that started at 0 could reach 300,918 in a few generations, because every step scaled with max(|value|, 100). Mutation intensity limited the size of numeric steps and nothing else, so option type, direction and order units could change at any intensity.
Show the table · 7 rows, 3 columns
Scroll sideways to compare all columns. Select a heading to sort.
| Comparison operator | Redrawn from all six (<, <=, >, >=, =, !=) | Redrawn from all six |
| Constant vs constant condition | Both constants mutate | Both constants mutate |
| Option type and direction | Could flip per leg (put to call, short to long) | Fixed |
| Expiration window | Each leg independently | Legs that share a window keep sharing it |
| Strike distance | Fresh draw from 0 to 30 in any unit | All strikes in a spread move by one relative factor; delta stays 0.01 to 0.99 |
| Order size | Redrawn up to the whole account | Moves relative to its value; unit (contracts, % of cash) fixed |
| Open-ended thresholds | Steps of up to 0.5 x intensity x 10 x max(|value|, 100) | Steps relative to the value |
No matching rows. Clear the filter to see all records.
Code paths in app/src/model/optimizer/optimization_type/parameter.rs and indicators/value.rs. Changes shipped in PRs #1608 and #1615.
How each winner was scored on dates it never saw
Follow the dates in order
Fold 1 of 4, IWM RSI oversold
Training
Mar 7, 2022 – Sep 15, 2023
The GA breeds and scores candidates on 3 overlapping windows of this period.
Embargo
Sep 16, 2023 – Sep 29, 2023
Nothing trades or scores for 14 days, so a trade open at the end of training cannot leak into validation.
Validation
Sep 30, 2023 – Feb 19, 2024
The final population is ranked on these dates and one winner is picked.
Out of sample
Feb 20, 2024 – Oct 28, 2024
The winner runs once on dates it has never seen. This is the reported score.
Dates shown in New York time.
From the stored study. Fold 1 is the -99.9% fold in the first chart (unrestricted mutation, run A, intensity 0.1).
See exact times and technical names
The date ranges above use New York time. These original UTC timestamps preserve the exact boundaries.
- anchored: always starts 2022-03-07
- through
- gap
- through
- last 20% of the development window
- through
- reported result
- through
Fold 1: tested 2024-02-20 to 2024-10-28
Each fold trains, waits out a 14-day embargo, picks a winner on validation, then scores that winner once out of sample.
The training window grows with each fold, and the out-of-sample windows never overlap.
Follow the dates in order
Fold 2 of 4, IWM RSI oversold
Training
Mar 7, 2022 – Apr 4, 2024
The GA breeds and scores candidates on 3 overlapping windows of this period.
Embargo
Apr 5, 2024 – Apr 18, 2024
Nothing trades or scores for 14 days, so a trade open at the end of training cannot leak into validation.
Validation
Apr 19, 2024 – Oct 28, 2024
The final population is ranked on these dates and one winner is picked.
Out of sample
Oct 29, 2024 – Jul 7, 2025
The winner runs once on dates it has never seen. This is the reported score.
Dates shown in New York time.
From the stored study. Fold 1 is the -99.9% fold in the first chart (unrestricted mutation, run A, intensity 0.1).
See exact times and technical names
The date ranges above use New York time. These original UTC timestamps preserve the exact boundaries.
- anchored: always starts 2022-03-07
- through
- gap
- through
- last 20% of the development window
- through
- reported result
- through
Fold 2: tested 2024-10-29 to 2025-07-07
Each fold trains, waits out a 14-day embargo, picks a winner on validation, then scores that winner once out of sample.
The training window grows with each fold, and the out-of-sample windows never overlap.
Follow the dates in order
Fold 3 of 4, IWM RSI oversold
Training
Mar 7, 2022 – Oct 23, 2024
The GA breeds and scores candidates on 3 overlapping windows of this period.
Embargo
Oct 24, 2024 – Nov 6, 2024
Nothing trades or scores for 14 days, so a trade open at the end of training cannot leak into validation.
Validation
Nov 7, 2024 – Jul 7, 2025
The final population is ranked on these dates and one winner is picked.
Out of sample
Jul 8, 2025 – Mar 16, 2026
The winner runs once on dates it has never seen. This is the reported score.
Dates shown in New York time.
From the stored study. Fold 1 is the -99.9% fold in the first chart (unrestricted mutation, run A, intensity 0.1).
See exact times and technical names
The date ranges above use New York time. These original UTC timestamps preserve the exact boundaries.
- anchored: always starts 2022-03-07
- through
- gap
- through
- last 20% of the development window
- through
- reported result
- through
Fold 3: tested 2025-07-08 to 2026-03-16
Each fold trains, waits out a 14-day embargo, picks a winner on validation, then scores that winner once out of sample.
The training window grows with each fold, and the out-of-sample windows never overlap.
Follow the dates in order
Fold 4 of 4, IWM RSI oversold
Training
Mar 7, 2022 – May 12, 2025
The GA breeds and scores candidates on 3 overlapping windows of this period.
Embargo
May 13, 2025 – May 26, 2025
Nothing trades or scores for 14 days, so a trade open at the end of training cannot leak into validation.
Validation
May 27, 2025 – Mar 16, 2026
The final population is ranked on these dates and one winner is picked.
Out of sample
Mar 17, 2026 – Nov 23, 2026
The winner runs once on dates it has never seen. This is the reported score.
Dates shown in New York time.
From the stored study. Fold 1 is the -99.9% fold in the first chart (unrestricted mutation, run A, intensity 0.1).
See exact times and technical names
The date ranges above use New York time. These original UTC timestamps preserve the exact boundaries.
- anchored: always starts 2022-03-07
- through
- gap
- through
- last 20% of the development window
- through
- reported result
- through
Fold 4: tested 2026-03-17 to 2026-11-23
Each fold trains, waits out a 14-day embargo, picks a winner on validation, then scores that winner once out of sample.
The training window grows with each fold, and the out-of-sample windows never overlap.
Every result on this page is a fold's out-of-sample score, compared with the unchanged strategy on the same dates. The 8 strategies were a SPY iron condor, an IWM put spread on oversold RSI, an IWM put credit spread, an S&P 500 top-50 book, and books that follow congressional buyers, insider purchases, 13F accumulation and tech sentiment.
Does walk-forward testing stop the GA from overfitting?
Gap = training Sharpe minus out-of-sample Sharpe of the chosen candidate, median over folds.
For every variant, the median drop from training Sharpe to out-of-sample Sharpe was between -0.13 and 0.23. Runs A and B use identical settings with different random draws. At intensity 0.1 their gaps were 0.02 and 0.23, a bigger difference than most variants show against each other. Comparing two GA settings on one run each would mostly measure that randomness.
What happens when the GA can flip > to <
Follow-up test: IWM RSI oversold, S&P 500 top-50 and IWM put credit spread, 4 folds each. The unrestricted rows are the main test's runs on these 3 strategies.
Show the table · 13 rows, 7 columns
Scroll sideways to compare all columns. Select a heading to sort.
| Unrestricted mutation | 0.1 | A | 0.15 | -6.2% | -99.9% | 5 of 12 |
| Unrestricted mutation | 0.1 | B | 0.09 | -7.6% | -100.0% | 4 of 12 |
| Locks, operators keep their direction | 0.1 | A | 0.47 | +4.5% | -6.2% | 5 of 12 |
| Locks, operators keep their direction | 0.1 | B | -0.02 | +2.2% | -13.1% | 4 of 12 |
| Locks, all six operators (current GA) | 0.1 | A | 0.17 | +3.0% | -19.1% | 4 of 12 |
| Locks, all six operators (current GA) | 0.1 | B | -0.13 | -2.1% | -47.9% | 4 of 12 |
| Unrestricted mutation | 0.9 | A | -0.30 | -5.6% | -49.0% | 3 of 12 |
| Unrestricted mutation | 0.9 | B | 0.50 | +2.0% | -34.8% | 3 of 12 |
| Locks, operators keep their direction | 0.9 | A | 0.03 | +0.5% | -27.0% | 3 of 12 |
| Locks, operators keep their direction | 0.9 | B | -0.36 | +0.9% | -24.1% | 4 of 12 |
| Locks, all six operators (current GA) | 0.9 | A | 0.56 | +9.2% | -27.7% | 7 of 12 |
| Locks, all six operators (current GA) | 0.9 | B | 0.61 | +7.0% | -5.1% | 6 of 12 |
| Unchanged strategy | 0.22 | +4.5% |
No matching rows. Clear the filter to see all records.
At intensity 0.9, letting the GA pick any of the six comparisons (<, <=, >, >=, =, !=) beat allowing only a switch between < and <= (or > and >=), in both runs. Median out-of-sample Sharpe was 0.56 and 0.61 against 0.03 and -0.36. Mean return was +9.2% and +7.0% against +0.5% and +0.9%, and 7 and 6 of 12 folds beat the unchanged strategy against 3 and 4.
A flipped comparison lets the GA trade the opposite signal. The same freedom produces rules like the always-true "RSI != 46.79" above, and at intensity 0.1 one run with flips lost 47.9% in a fold. NexusTrade's GA now allows flips and keeps the locks.
How to avoid overfitting when you optimize a trading strategy
These four checks do not depend on NexusTrade. They apply to any genetic optimizer, including the one built into MetaTrader 5's strategy tester: hold out a forward period, and compare the optimized inputs with the originals on that period.
Score the unchanged strategy on the same folds
At intensity 0.1, no GA variant clearly beat the strategy as I wrote it (median out-of-sample Sharpe 0.22). A GA result means little until you compare it with that baseline.
Lock what defines the trade
Option type, direction, expirations and order units decide what the strategy is. In the main test, every fold below -30% came from mutations that changed them.
Run the same search twice
Identical settings moved median out-of-sample Sharpe by up to 0.8 in this study. Treat a smaller difference between two settings as noise.
Read the winning rule before you trust its score
A rule that always enters or never exits can win a fold. The +745.6% candidate above did both.
Limits: one default objective, a small search, 8 strategies
const parseFitnessFunctions = (raw: unknown): FitnessFunction[] => {
if (!Array.isArray(raw) || raw.length === 0) {
return [FitnessFunction.SharpeRatio];
}
...Sharpe only, by default
A walk-forward study with no objectives set optimizes Sharpe alone, so NSGA-II runs with a single objective. My main and follow-up tests used Sharpe and return.
A small search
Each GA ran a population of 6 for 6 generations. I did not test larger searches.
8 strategies and one market history
Stock strategies used 4 anchored folds from 2020 to 2026, and options strategies started in 2022. The follow-up test covers 3 strategies.
Two runs per variant at most
I have not yet run a probability-of-backtest-overfitting test, a deflated Sharpe ratio or an untouched final holdout.
Run the same test on your strategy
Aurora can run a walk-forward study on any of your portfolios and score the unchanged version on the same folds.
No comments yet.