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)
  • 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:

SettingDescription
ExchangeThe exchange to pull historical candle data from
Trading PairThe pair to optimize for (e.g., BTC/USDT)
TimeframeCandle timeframe (e.g., 1h, 4h, 1d)
Date RangeHistorical period for training and validation

The date range is automatically split 70/30 for walk-forward validation.

Step 3: Configure Experiments

SettingRangeDefaultDescription
Max Experiments1 - 3010Maximum number of mutation-backtest cycles
Scoring Profile4 optionsBalancedHow improvements are measured

Choosing a Scoring Profile

ProfileChoose When...
BalancedYou want well-rounded performance across all metrics
ConservativeMinimizing drawdown is your top priority
AggressiveYou want maximum return and can tolerate drawdown
ConsistencyYou prefer many small winning trades over fewer large ones

Step 4: Start the Optimization

Click Start Optimization to begin. Strategy Lab will:

  1. Run the initial backtest on your base strategy
  2. Begin the mutation loop — each experiment takes 1-3 minutes depending on the date range
  3. 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. The best version found so far is saved automatically. Billing is prorated — you only pay for experiments that ran.

Step 5: Review Results

After the optimization completes (or is stopped), you get:

OutputDescription
Optimized StrategyThe improved strategy code, saved to your account
Performance ComparisonSide-by-side metrics: original vs. optimized
Experiment HistoryMetrics for every experiment that ran
Validation ResultsOut-of-sample (30%) performance proving the improvements generalize

The optimized strategy is saved as a new version. Your original strategy is preserved unchanged.

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