Running a Strategy Lab Optimization
This guide walks you through starting an AI optimization in Strategy Lab, from selecting a strategy to reviewing results.
Prerequisites
- A TradeStaq account with wallet balance (optimizations cost $0.50 per experiment; multi-pair runs add a small amount per extra pair)
- At least one strategy to optimize, or a description for creating a new one
- A connected exchange (for market data during backtesting)
Step 1: Choose Your Strategy
You have two starting points:
Optimize an Existing Strategy
Select a strategy you already own from your strategy list. Strategy Lab will mutate and improve the existing code while preserving the core trading logic.
Create a New Strategy
Provide a plain-English description of your trading idea. Strategy Lab uses FORGE to generate the initial strategy, then optimizes it through the mutation loop.
Example descriptions:
- "A mean-reversion strategy using RSI and Bollinger Bands on 4h candles"
- "Trend following with EMA crossover and ATR-based stops"
- "Scalping strategy for BTC/USDT on 5-minute timeframe"
Step 2: Select Exchange and Trading Pair
Choose the exchange and trading pair for backtesting:
| Setting | Description |
|---|---|
| Exchange | The exchange to pull historical candle data from |
| Trading Pair | The pair to optimize for (e.g., BTC/USDT) |
| Timeframe | Candle timeframe (e.g., 1h, 4h, 1d) |
| Date Range | Historical period for training and validation |
The date range is automatically split 70/30 for walk-forward validation.
Testing on Several Pairs (Multi-Pair Runs)
If multi-pair runs are available on your plan, Strategy Lab can test every candidate on a small basket of pairs instead of one. A strategy that only works on one coin is then less likely to win.
- Default basket: your pair plus BTC, ETH and SOL, in the same market format as your pair (spot with spot, perpetual with perpetual). You can remove pairs or add others.
- Basket size: your plan sets the maximum number of pairs: Free 1, Pro 3, Trader 4, Whale 5. The system limit is 5.
- Same setup for every pair: all pairs use one exchange account, one timeframe and one market type.
A candidate is kept only if it beats the original on most pairs, does not badly hurt any pair, and has a better overall "robustness score" across the pairs. The run still produces one strategy version and one preset per scoring profile. Bots still trade one pair each.
Before the run starts, the confirm step shows:
- the maximum price for the run (you are never charged more; see Pricing)
- the estimated minutes the run will take
- the number of experiments, with about N expected to fit in the time limit
Multi-pair runs are limited to 180 active minutes. If your settings would take longer, the number of experiments is cut to what fits (never below 5). If even 5 do not fit, the request is refused with suggestions, such as fewer pairs or a shorter date range. Preset search works with single-pair runs only.
Step 3: Configure Experiments
| Setting | Range | Default | Description |
|---|---|---|---|
| Max Experiments | 1 - 30 | 10 | Maximum number of mutation-backtest cycles |
| Scoring Profile | 4 options | Balanced | How improvements are measured |
Choosing a Scoring Profile
| Profile | Choose When... |
|---|---|
| Balanced | You want well-rounded performance across all metrics |
| Conservative | Minimizing drawdown is your top priority |
| Aggressive | You want maximum return and can tolerate drawdown |
| Consistency | You prefer many small winning trades over fewer large ones |
Step 4: Start the Optimization
Click Start Optimization to begin. Strategy Lab will:
- Run the initial backtest on your base strategy
- Begin the mutation loop — each experiment takes 1-3 minutes depending on the date range
- Show real-time progress with metrics for each experiment
During Optimization
You can monitor:
- Current experiment number out of total
- Best score so far and which experiment achieved it
- Performance metrics (return, drawdown, win rate, Sharpe ratio) for each experiment
- Comparison of current best vs. the original strategy
Stopping Early
You can stop the optimization at any time. Billing is prorated — you only pay for experiments that ran. The best version found so far is saved, but it is held because it was never checked on unseen data (see Held Results below). If you want it, click Use this version anyway.
Step 5: Review Results
After the optimization completes (or is stopped), you get:
| Output | Description |
|---|---|
| Optimized Strategy | The improved strategy code, saved to your account |
| Performance Comparison | Side-by-side metrics: original vs. optimized |
| Experiment History | Metrics for every experiment that ran |
| Validation Results | Out-of-sample (30%) performance of the best version against the original |
The optimized strategy is saved as a new version. Your original strategy is preserved unchanged.
Held Results
At the end of a run, the best version is checked once on the unseen (out-of-sample) part of the date range against the original. A result that fails this check is held:
- It does not become your strategy's latest version.
- Your bots, and other users' bots on this strategy, keep running the version they run now.
- The next optimization does not start from it.
The run card shows why the result was held. If you still want it, click Use this version anyway on the run card or on the strategy's Versions tab. This works at any time, even after the run has left the queue.
For single-pair runs, an "unverified" result (too few trades on unseen data to judge) still becomes your latest version, as before. It never activates a preset or promotes itself to stable.
Lab presets are measured at 1x leverage. Higher leverage scales both gains and losses.
Deploying on a Pair the Optimizer Did Not Test
If you deploy an optimized version or lab preset on a pair, exchange or market type it was not tested on, you see a warning like this:
This preset was tested on ETH/USDT:USDT, BTC/USDT:USDT and SOL/USDT:USDT, not on DOGE/USDT:USDT. How it does there is unknown.
Click Backtest it on DOGE/USDT:USDT first to open a backtest of that exact version on that pair, or Deploy anyway. You can still deploy either way.
The warning is not shown once you have a completed backtest of the same version on that pair, on the same exchange (any of your accounts on it) and market type, with a return above 0, a profit factor above 1, and at least the profile's minimum number of trades (10, or 30 for Consistency).
Tips for Better Results
- Use enough data — at least 3-6 months of historical data gives the AI more to work with
- Pick the right timeframe — match the timeframe to your trading style (scalping: 1m-15m, swing: 1h-4h, position: 1d)
- Start with 10 experiments — run more only if the optimization is still improving by experiment 10
- Try different scoring profiles — the same strategy can optimize differently under Conservative vs. Aggressive scoring
Next Steps
- Pricing — Cost details and billing
- Strategy Lab Overview — How the optimization engine works
- Backtesting — Understanding backtest results