DocsOptimization

Running Optimization

Parameter optimization is available in the Optimization tab of the Research Lab right dock.

Prerequisites

Before running optimization, your strategy needs:

  • At least one parameter defined in the define() function with min and max bounds
  • A working backtest that completes without errors

Setting Up Parameter Ranges

Each parameter defined in define() appears in the optimization panel with:

FieldDescription
MinMinimum value to search
MaxMaximum value to search
StepIncrement between values
IncludeWhether to optimize this parameter (toggle)

Parameters without explicit bounds in define() will use their defaults.

Example

If your strategy defines:

function define(ctx) { ctx.param('period', { type: 'int', default: 14, min: 5, max: 50 }); ctx.param('threshold', { type: 'float', default: 0.5, min: 0.1, max: 2.0 }); }

The optimizer will search across all combinations of period (5 to 50) and threshold (0.1 to 2.0).

Selecting the Target Metric

Choose what the optimizer should maximize. Sharpe Ratio is the default and usually the best choice because it balances return against risk.

Running the Job

Click Run Optimization. The job runs in the background — you can continue working while it completes. Progress is shown via a real-time progress indicator.

Optimization jobs can take from seconds to several minutes depending on the parameter space size. The platform will estimate the number of combinations before you start.

Baseline Scan

For broader validation, use Baseline Scan to test your strategy across multiple asset groups simultaneously. This reveals whether your strategy idea works on one symbol or generalizes across markets.

Next Steps

optimizationrunconfigureparameter searchgridui