Strategy Lab Overview
Strategy Lab is TradeStaq's AI-powered strategy optimization engine. It takes an existing trading strategy (or a plain-English description) and iteratively improves it through automated mutation, backtesting, and scoring — producing a battle-tested strategy with proven out-of-sample performance.
What Strategy Lab Does
Strategy Lab runs an optimization loop:
┌──────────────────────────────────────────────────────────────┐
│ STRATEGY LAB │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Original │──▶│ AI Mutates│──▶│ Backtest │──▶│ Compare │ │
│ │ Strategy │ │ Code │ │ (70/30) │ │ Scores │ │
│ └──────────┘ └─────┬────┘ └──────────┘ └────┬─────┘ │
│ ▲ │ │ │
│ │ │ ┌──────────┐ │ │
│ └───────────────┴─────────│ Keep or │◀───────┘ │
│ (next experiment) │ Revert │ │
│ └──────────┘ │
└──────────────────────────────────────────────────────────────┘
- Start with a strategy (existing code or a description)
- AI mutates the strategy code — adjusting indicators, thresholds, risk parameters
- Backtest the mutated version on historical data using walk-forward validation
- Compare the new version against the current best using the selected scoring profile
- Keep or revert — if the mutation improves the score, it becomes the new baseline
- Repeat for up to 30 experiments
Each improvement is saved automatically, so the process is crash-safe.
Scoring Profiles
Strategy Lab offers 4 scoring profiles that weight performance metrics differently:
| Profile | Focus | Best For |
|---|---|---|
| Balanced | Equal weight across return, drawdown, win rate, and consistency | General-purpose optimization |
| Conservative | Prioritizes low drawdown and steady returns | Risk-averse traders |
| Aggressive | Prioritizes total return and profit factor | Growth-focused strategies |
| Consistency | Prioritizes win rate and Sortino ratio | Strategies with frequent small wins |
Choose the profile that matches your risk tolerance and trading style.
Walk-Forward Validation
Strategy Lab does not just optimize on historical data and call it done. It uses walk-forward validation to guard against overfitting:
| Split | Data | Purpose |
|---|---|---|
| Training (70%) | Earlier portion of the date range | AI optimizes against this data |
| Validation (30%) | Later portion of the date range | Tests that improvements generalize |
A mutation is only accepted if it improves performance on both the training and validation sets. This ensures the optimized strategy performs well on unseen data, not just the data it was trained on.
Two Modes
| Mode | Input | Output |
|---|---|---|
| Optimize Existing | An existing TradeStaq strategy | Improved version of the same strategy |
| Create New | A plain-English description | A new strategy built and optimized from scratch |
What the AI Knows
During each experiment, the AI mutation engine receives:
- Current strategy code
- Performance metrics from the latest backtest
- Indicator snapshots for each trade (what the indicators looked like at entry/exit)
- Market context (volatility, trend direction)
- Equity curve samples
- Trades from the last failed experiment (to avoid repeating mistakes)
This rich context allows the AI to make targeted, informed mutations rather than random changes.
Next Steps
- Running an Optimization — Step-by-step guide to starting an optimization
- Pricing — Cost per experiment and billing details
- AI Strategy Builder — Create strategies from scratch with FORGE
- Backtesting — Understand backtest results