Optimization

Optimization answers a search question: which configuration of your strategies would have maximized (or minimized) a chosen metric on the backtest, subject to constraints. Two typical asks: "how many contracts of A and B for the highest MAR?" and "pick the subset of strategies that stays under $10,000 of margin and maximizes Sortino." The engine explores the space of integer contracts (weights) or strategy inclusion and returns the configuration that scored best, with how well it holds up out-of-sample.

An optimized configuration is an in-sample result

This is the single most overfitting-prone thing in VECTOR: maximizing a metric on past data also fits noise. The result is framed as "the configuration that would have maximized X on the backtest" — never advice, never a prediction. Always read the out-of-sample hold and the resampling band (below) before trusting the headline number. The decision to trade, and how, is always yours.

Two ways in

The optimizer is one engine with two front-doors that produce the identical result:

This page (manual)
Pick the strategies to vary, the objective and the constraints, then press Optimize. You get the full result: winner, robustness cards, the objective surface and a leaderboard.
Vector AI (chat)
Ask in plain language. Vector AI runs the same engine and answers with a compact proposal card you can Apply, Save as a variant, or Open here pre-filled.

Inputs

Strategies to vary
Tick the strategies to optimize. Each is either Contracts (integer weights in a min/max range at a step) or Inclusion (in or out).
Objective
The metric to maximize (MAR/Calmar, Sortino, Sharpe, CAGR) or minimize (max drawdown, volatility). It is the exact metric shown elsewhere in the app.
Constraints
Optional caps: max margin ($), max drawdown (%), and max number of active strategies (cardinality). A candidate that breaks a constraint is discarded from the search.
Robustness
On by default: adds the out-of-sample split, the Monte Carlo band and the sensitivity check to the result.

Global optimum vs best found

The engine picks the method by the size of the search space, and always tells you which guarantee you got:

Global optimum (small spaces)
The whole space is enumerated — the winner is provably the best. The result shows "Global optimum" and the number of candidates evaluated.
Best found (large spaces)
Beyond a size cap the engine switches to a seeded heuristic search (multi-start local search with swaps for subset problems). The result shows "Best found" and the number of evaluations. It is deterministic (same inputs give the same answer) but not guaranteed to be the global optimum.

Robustness

This is what separates a serious answer from curve-fitting. Every result (with robustness on) carries:

Out-of-sample
The engine optimizes on the first part of the history, then measures that winning configuration on the later part it never saw. A verdict (robust, partial, fragile) flags a configuration that looks great in-sample but collapses out-of-sample.
Monte Carlo band
The winner's daily P/L is resampled (block bootstrap) to show a distribution of outcomes — the p05, p50 and p95 return and the probability of ending at a loss — not a single point.
Sensitivity
Perturbing the winner by one step per variable shows whether the optimum is a broad plateau (robust) or a sharp peak (fragile).

The objective surface

For one or two varied strategies the result includes a heatmap of the objective across the whole grid: colour is the objective value, dimmed cells break the constraints. It reveals whether the best point sits on a broad ridge (robust) or a lonely spike (fragile) — often more telling than the single winning number.

Acting on the result

Apply to session
Writes the winning weights into the live session. It is recorded in the Timeline, so it is undoable.
Save as variant
Freezes the configuration as a variant and pins it to the comparison, without touching the live session — so you can overlay it against your current setup before committing.

How it stays accurate

Same engine as the charts and tables

The optimizer scores every candidate with the same maths that powers the metrics and equity curve, and re-checks the winner through the canonical path before returning it — so the numbers it reports match what the rest of the app would show for that configuration. Nothing is estimated.

Limits to be aware of

Margin needs margin data
The max-margin constraint only means something for strategies whose file carries a margin column (Option Omega). If some active strategies lack it, the margin is undercounted and the constraint is reported as unverifiable rather than a false pass.
Weights, not the Risk Sizing domain
Here a "contract" is an integer weight multiplier on the strategy's P/L. Per-trade sizing under a margin/premium budget lives in Risk Sizing.
Runs in the background
The search executes on the server as a job the page polls, so it survives switching tabs or a reload. Small searches finish in under a second; large heuristic searches take a few seconds.
In-sample by construction
See the warning at the top. Optimization selects on the past; the robustness checks exist precisely because the headline number is optimistic.