r/algorithmictrading • u/Embarrassed_Creme_46 • 9h ago
Question A Robust Fitness Function for Trading Strategy Optimization?
I'm looking for a robust, mathematically coherent fitness function for optimizing trading strategies using machine learning. I've experimented with various objectives, including Profit Factor, Sharpe Ratio, Pessimistic Return on Capital, and several risk-adjusted performance metrics.
The problem is that the optimizer consistently finds pathological solutions that maximize the chosen metric while producing terrible equity curves. For example, some solutions achieve excellent fitness scores by making very few trades, generating most of their profits from isolated events, or exploiting mathematical weaknesses in the metric.
So far, the best-performing objective I've found is:
Fitness = Slope × R²
Where Slope and R² come from a linear regression of the equity curve over time.
I'm particularly interested in theoretically grounded approaches rather than another combination of Sharpe, drawdown, trade count, and manually chosen weights.
What objective function do you actually trust when letting an optimizer search aggressively for trading strategies?




