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:
| 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.
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. 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:
| 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 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
- Pricing — Cost details and billing
- Strategy Lab Overview — How the optimization engine works
- Backtesting — Understanding backtest results