Sweep parameters, honestly
optimize_strategySearch a strategy's declared params for the best combination, then report how much of that result is explained by the search itself. Searches on the first 60% of the window, chooses on the next 20%, and confirms on the last 20%, which it never looked at; rejects candidates that barely traded; and discounts the winning score by the number of attempts. Frequently concludes that the winner is not worth trading — that is the tool working, not failing. Uses 20 backtests from the quota, whatever its size.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | Yes | The strategy spec object — see get_strategy_spec_rules | |
| minTrades | No | Candidates with fewer training trades cannot win. Lowering it invites noise. | |
| objective | No | What to maximise. net_pnl rewards whichever run risked the most. | sharpe |
| pointsPerParam | No | ||
| maxCombinations | No |