batch_backtest
Run a parameter sweep over strategy variations to find top performers, ranking by metrics like Sharpe ratio for optimized backtesting.
Instructions
Run a parameter sweep across strategy variations and rank them.
Args: base_strategy: Strategy template with {placeholders} (e.g. "Buy when RSI({period}) < {threshold}") parameter_grid: Dict of param name to list of values (e.g. {"period": [14, 21], "threshold": [25, 30, 35]}) universe: List of tickers or preset period_start: Start date YYYY-MM-DD period_end: End date YYYY-MM-DD capital: Starting capital rank_by: Metric to rank by — "sharpe_ratio", "total_return_pct", or "max_drawdown_pct"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base_strategy | Yes | ||
| parameter_grid | Yes | ||
| universe | No | ||
| period_start | No | ||
| period_end | No | ||
| capital | No | ||
| rank_by | No | sharpe_ratio |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |